File tree Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -235,10 +235,16 @@ let
235
235
"--ghc-options=-j1"
236
236
) ;
237
237
238
+ # the build-tools version might be depending on the version of the package, similarly to patches
238
239
executableToolDepends =
239
240
( lib . concatMap ( c : if c . isHaskell or false
240
241
then builtins . attrValues ( c . components . exes or { } )
241
- else [ c ] ) build-tools ) ++
242
+ else [ c ] )
243
+ ( builtins . filter ( x : ! ( isNull x ) )
244
+ ( map
245
+ ( p : if builtins . isFunction p
246
+ then p { inherit ( package . identifier ) version ; inherit revision ; }
247
+ else p ) build-tools ) ) ) ++
242
248
lib . optional ( pkgconfig != [ ] ) buildPackages . cabalPkgConfigWrapper ;
243
249
244
250
# Unfortunately, we need to wrap ghc commands for cabal builds to
Original file line number Diff line number Diff line change 34
34
;
35
35
} ;
36
36
37
- executableToolDepends =
37
+ # the build-tools version might be depending on the version of the package, similarly to patches
38
+ executableToolDepends =
39
+ let inherit ( component ) pkgconfig build-tools ; in
38
40
( lib . concatMap ( c : if c . isHaskell or false
39
41
then builtins . attrValues ( c . components . exes or { } )
40
- else [ c ] ) component . build-tools ) ++
41
- lib . optional ( component . pkgconfig != [ ] ) buildPackages . cabalPkgConfigWrapper ;
42
+ else [ c ] )
43
+ ( builtins . filter ( x : ! ( isNull x ) )
44
+ ( map
45
+ ( p : if builtins . isFunction p
46
+ then p { inherit ( package . identifier ) version ; inherit revision ; }
47
+ else p ) build-tools ) ) ) ++
48
+ lib . optional ( pkgconfig != [ ] ) buildPackages . cabalPkgConfigWrapper ;
42
49
43
50
drv =
44
51
stdenv . mkDerivation ( {
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ concatMap (dep:
98
98
else builtins . fetchGit ( {
99
99
inherit ( dep ) url rev ;
100
100
submodules = true ;
101
+ allRefs = true ;
101
102
} // evalPackages . lib . optionalAttrs ( branch != null ) { ref = branch ; } ) ;
102
103
in map ( subdir : {
103
104
name = cabalName "${ pkgsrc } /${ subdir } " ;
Original file line number Diff line number Diff line change 91
91
92
92
packages . discount . components . library . libs = pkgs . lib . mkForce [ pkgs . discount ] ;
93
93
94
- packages . llvm-hs . components . library . build-tools = pkgs . lib . mkForce [ pkgs . llvm ] ;
94
+ packages . llvm-hs . components . library . build-tools = pkgs . lib . mkForce [
95
+ ( fromUntil "5.0.0" "6" pkgs . llvmPackages_5 . llvm )
96
+ ( fromUntil "6.0.0" "7" pkgs . llvmPackages_6 . llvm )
97
+ ( fromUntil "7.0.0" "8" pkgs . llvmPackages_7 . llvm )
98
+ ( fromUntil "8.0.0" "9" pkgs . llvmPackages_8 . llvm )
99
+ ( fromUntil "9.0.0" "12" pkgs . llvmPackages_9 . llvm )
100
+ ( fromUntil "12.0.0" "15" pkgs . llvmPackages_12 . llvm )
101
+ # NOTE: we currently don't have a llvm versoin > 12 that has a tag
102
+ # in nixpkgs, so we probably can't build `llvm-hs > 12`, there
103
+ # is however a head version of llvm in nixpkgs, which we might
104
+ # be able to use if that case were to occur
105
+ ] ;
95
106
96
107
packages . BNFC . components . tests . doctests . build-tools = [
97
108
config . hsPkgs . buildPackages . alex
You can’t perform that action at this time.
0 commit comments