on iko/ghcjs-patch-master help sign in
Use `pkgs.lib` instead of `stdenv.lib` (#1031)
89f50a9Hamish Mackenzie
@@ -33,7 +33,7 @@ in rec {
33 # are not pure).
33 # are not pure).
34 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
34 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
35 update-hackage = import ./scripts/update-hackage.nix {
35 update-hackage = import ./scripts/update-hackage.nix {
36− inherit (pkgs) stdenv writeScript coreutils glibc git
36+ inherit (pkgs) stdenv lib writeScript coreutils glibc git
37 openssh nix-prefetch-git gawk bash curl findutils;
37 openssh nix-prefetch-git gawk bash curl findutils;
38 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
38 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
39 nix-tools = haskell.internal-nix-tools;
39 nix-tools = haskell.internal-nix-tools;
@@ -41,7 +41,7 @@ in rec {
41 inherit (haskell) update-index-state-hashes;
41 inherit (haskell) update-index-state-hashes;
42 };
42 };
43 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
43 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
44− inherit (pkgs) stdenv writeScript coreutils glibc git
44+ inherit (pkgs) stdenv lib writeScript coreutils glibc git
45 openssh nix-prefetch-git gawk bash curl findutils;
45 openssh nix-prefetch-git gawk bash curl findutils;
46 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
46 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
47 nix-tools = haskell.internal-nix-tools;
47 nix-tools = haskell.internal-nix-tools;
builder/comp-builder.nix+1−1
@@ -296,7 +296,7 @@ let
296 homepage = package.homepage or "";
296 homepage = package.homepage or "";
297 description = package.synopsis or "";
297 description = package.synopsis or "";
298 license = haskellLib.cabalToNixpkgsLicense package.license;
298 license = haskellLib.cabalToNixpkgsLicense package.license;
299− platforms = if platforms == null then stdenv.lib.platforms.all else platforms;
299+ platforms = if platforms == null then lib.platforms.all else platforms;
300 };
300 };
301
301
302 propagatedBuildInputs =
302 propagatedBuildInputs =
builder/setup-builder.nix+1−1
@@ -56,7 +56,7 @@ let
56 homepage = package.homepage or "";
56 homepage = package.homepage or "";
57 description = package.synopsis or "";
57 description = package.synopsis or "";
58 license = haskellLib.cabalToNixpkgsLicense package.license;
58 license = haskellLib.cabalToNixpkgsLicense package.license;
59− platforms = if component.platforms == null then stdenv.lib.platforms.all else component.platforms;
59+ platforms = if component.platforms == null then lib.platforms.all else component.platforms;
60 };
60 };
61
61
62 phases = ["unpackPhase" "patchPhase" "buildPhase" "installPhase"];
62 phases = ["unpackPhase" "patchPhase" "buildPhase" "installPhase"];
compiler/bootstrap/cabal-install.nix+2−2
@@ -1,4 +1,4 @@
1−{ fetchurl, hackage, stdenv, ghc, zlib, src, version }:
1+{ fetchurl, hackage, stdenv, lib, ghc, zlib, src, version }:
2let dependencies =
2let dependencies =
3 [ { name = "deepseq"; version = "1.4.3.0"; }
3 [ { name = "deepseq"; version = "1.4.3.0"; }
4 { name = "binary"; version = "0.8.5.1"; }
4 { name = "binary"; version = "0.8.5.1"; }
@@ -42,7 +42,7 @@ in stdenv.mkDerivation ({
42 };
42 };
43
43
44 meta = {
44 meta = {
45− platforms = stdenv.lib.platforms.all;
45+ platforms = lib.platforms.all;
46 };
46 };
47
47
48 nativeBuildInputs = [ ghc zlib ];
48 nativeBuildInputs = [ ghc zlib ];
compiler/ghc/configured-src.nix+19−19
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl
1+{ stdenv, lib, fetchurl
2, ghc-version, ghc-version-date, ghc-patches, src-spec
2, ghc-version, ghc-version-date, ghc-patches, src-spec
3, targetPrefix
3, targetPrefix
4, targetPlatform, hostPlatform
4, targetPlatform, hostPlatform
@@ -25,7 +25,7 @@ stdenv.mkDerivation (rec {
25 nativeBuildInputs = [
25 nativeBuildInputs = [
26 perl autoconf automake m4 python3 sphinx
26 perl autoconf automake m4 python3 sphinx
27 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
27 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
28− ] ++ stdenv.lib.optional (patches != []) autoreconfHook;
28+ ] ++ lib.optional (patches != []) autoreconfHook;
29
29
30 # For building runtime libs
30 # For building runtime libs
31 depsBuildTarget = toolsForTarget;
31 depsBuildTarget = toolsForTarget;
@@ -33,10 +33,10 @@ stdenv.mkDerivation (rec {
33 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
33 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
34
34
35 propagatedBuildInputs = [ targetPackages.stdenv.cc ]
35 propagatedBuildInputs = [ targetPackages.stdenv.cc ]
36− ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
36+ ++ lib.optional useLLVM llvmPackages.llvm;
37
37
38− depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
38+ depsTargetTarget = map lib.getDev (libDeps targetPlatform);
39− depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
39+ depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
40
40
41 postPatch = "patchShebangs .";
41 postPatch = "patchShebangs .";
42
42
@@ -54,7 +54,7 @@ stdenv.mkDerivation (rec {
54 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
54 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
55 export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
55 export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
56 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
56 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
57− export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
57+ export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString targetPlatform.isAarch32 ".gold"}"
58 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
58 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
59 export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
59 export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
60 export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
60 export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
@@ -64,13 +64,13 @@ stdenv.mkDerivation (rec {
64
64
65 echo -n "${buildMK}" > mk/build.mk
65 echo -n "${buildMK}" > mk/build.mk
66 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
66 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
67− '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
67+ '' + lib.optionalString (!stdenv.isDarwin) ''
68 export NIX_LDFLAGS+=" -rpath $out/lib/${targetPrefix}ghc-${version}"
68 export NIX_LDFLAGS+=" -rpath $out/lib/${targetPrefix}ghc-${version}"
69− '' + stdenv.lib.optionalString stdenv.isDarwin ''
69+ '' + lib.optionalString stdenv.isDarwin ''
70 export NIX_LDFLAGS+=" -no_dtrace_dof"
70 export NIX_LDFLAGS+=" -no_dtrace_dof"
71− '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
71+ '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
72 sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
72 sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
73− '' + stdenv.lib.optionalString targetPlatform.isMusl ''
73+ '' + lib.optionalString targetPlatform.isMusl ''
74 echo "patching llvm-targets for musl targets..."
74 echo "patching llvm-targets for musl targets..."
75 echo "Cloning these existing '*-linux-gnu*' targets:"
75 echo "Cloning these existing '*-linux-gnu*' targets:"
76 grep linux-gnu llvm-targets | sed 's/^/ /'
76 grep linux-gnu llvm-targets | sed 's/^/ /'
@@ -86,10 +86,10 @@ stdenv.mkDerivation (rec {
86 --replace '*-android*|*-gnueabi*)' \
86 --replace '*-android*|*-gnueabi*)' \
87 '*-android*|*-gnueabi*|*-musleabi*)'
87 '*-android*|*-gnueabi*|*-musleabi*)'
88 done
88 done
89− '' + stdenv.lib.optionalString (src-spec.version != ghc-version) ''
89+ '' + lib.optionalString (src-spec.version != ghc-version) ''
90 substituteInPlace configure --replace 'RELEASE=YES' 'RELEASE=NO'
90 substituteInPlace configure --replace 'RELEASE=YES' 'RELEASE=NO'
91 echo '${ghc-version}' > VERSION
91 echo '${ghc-version}' > VERSION
92− '' + stdenv.lib.optionalString (ghc-version-date != null) ''
92+ '' + lib.optionalString (ghc-version-date != null) ''
93 substituteInPlace configure --replace 'RELEASE=YES' 'RELEASE=NO'
93 substituteInPlace configure --replace 'RELEASE=YES' 'RELEASE=NO'
94 echo '${ghc-version-date}' > VERSION_DATE
94 echo '${ghc-version-date}' > VERSION_DATE
95 '';
95 '';
@@ -99,16 +99,16 @@ stdenv.mkDerivation (rec {
99 configureFlags = [
99 configureFlags = [
100 "--datadir=$doc/share/doc/ghc"
100 "--datadir=$doc/share/doc/ghc"
101 "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
101 "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
102− ] ++ stdenv.lib.optionals (targetLibffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetLibffi.dev}/include" "--with-ffi-libraries=${targetLibffi.out}/lib"
102+ ] ++ lib.optionals (targetLibffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetLibffi.dev}/include" "--with-ffi-libraries=${targetLibffi.out}/lib"
103− ] ++ stdenv.lib.optional (!enableIntegerSimple) [
103+ ] ++ lib.optional (!enableIntegerSimple) [
104 "--with-gmp-includes=${targetGmp.dev}/include" "--with-gmp-libraries=${targetGmp.out}/lib"
104 "--with-gmp-includes=${targetGmp.dev}/include" "--with-gmp-libraries=${targetGmp.out}/lib"
105− ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
105+ ] ++ lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
106 "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
106 "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
107− ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
107+ ] ++ lib.optionals (targetPlatform != hostPlatform) [
108 "--enable-bootstrap-with-devel-snapshot"
108 "--enable-bootstrap-with-devel-snapshot"
109− ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
109+ ] ++ lib.optionals (disableLargeAddressSpace) [
110 "--disable-large-address-space"
110 "--disable-large-address-space"
111− ] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
111+ ] ++ lib.optionals (targetPlatform.isAarch32) [
112 "CFLAGS=-fuse-ld=gold"
112 "CFLAGS=-fuse-ld=gold"
113 "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
113 "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
114 "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
114 "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
@@ -116,7 +116,7 @@ stdenv.mkDerivation (rec {
116
116
117 outputs = [ "out" ];
117 outputs = [ "out" ];
118 phases = [ "unpackPhase" "patchPhase" ]
118 phases = [ "unpackPhase" "patchPhase" ]
119− ++ stdenv.lib.optional (ghc-patches != []) "autoreconfPhase"
119+ ++ lib.optional (ghc-patches != []) "autoreconfPhase"
120 ++ [ "configurePhase" "installPhase" ];
120 ++ [ "configurePhase" "installPhase" ];
121 installPhase = "cp -r . $out";
121 installPhase = "cp -r . $out";
122})
122})
compiler/ghc/default.nix+28−28
@@ -3,7 +3,7 @@
3# haskell.nix ships its own version of the ghc expression as it needs more
3# haskell.nix ships its own version of the ghc expression as it needs more
4# control over the expression to isolate it against varying <nixpkgs> and
4# control over the expression to isolate it against varying <nixpkgs> and
5# allow us to customize it to the way haskell.nix works.
5# allow us to customize it to the way haskell.nix works.
6−{ stdenv, haskell-nix, targetPackages
6+{ stdenv, lib, haskell-nix, targetPackages
7
7
8# build-tools
8# build-tools
9, bootPkgs
9, bootPkgs
@@ -26,7 +26,7 @@
26
26
27, # If enabled, GHC will be built with the GPL-free but slower integer-simple
27, # If enabled, GHC will be built with the GPL-free but slower integer-simple
28 # library instead of the faster but GPLed integer-gmp library.
28 # library instead of the faster but GPLed integer-gmp library.
29− enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
29+ enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
30
30
31, # If enabled, use -fPIC when compiling static libs.
31, # If enabled, use -fPIC when compiling static libs.
32 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform && !stdenv.targetPlatform.isAarch32
32 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform && !stdenv.targetPlatform.isAarch32
@@ -42,7 +42,7 @@
42
42
43, # What flavour to build. An empty string indicates no
43, # What flavour to build. An empty string indicates no
44 # specific flavour and falls back to ghc default values.
44 # specific flavour and falls back to ghc default values.
45− ghcFlavour ? stdenv.lib.optionalString haskell-nix.haskellLib.isCrossTarget (
45+ ghcFlavour ? lib.optionalString haskell-nix.haskellLib.isCrossTarget (
46 if useLLVM
46 if useLLVM
47 then "perf-cross"
47 then "perf-cross"
48 else "perf-cross-ncg"
48 else "perf-cross-ncg"
@@ -82,7 +82,7 @@ let
82 targetGmp = targetPackages.gmp or gmp;
82 targetGmp = targetPackages.gmp or gmp;
83
83
84 # TODO(@Ericson2314) Make unconditional
84 # TODO(@Ericson2314) Make unconditional
85− targetPrefix = stdenv.lib.optionalString
85+ targetPrefix = lib.optionalString
86 (targetPlatform != hostPlatform)
86 (targetPlatform != hostPlatform)
87 "${targetPlatform.config}-";
87 "${targetPlatform.config}-";
88
88
@@ -93,52 +93,52 @@ let
93 endif
93 endif
94 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
94 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
95 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
95 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
96− '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
96+ '' + lib.optionalString (targetPlatform != hostPlatform) ''
97 CrossCompilePrefix = ${targetPrefix}
97 CrossCompilePrefix = ${targetPrefix}
98− '' + stdenv.lib.optionalString isCrossTarget ''
98+ '' + lib.optionalString isCrossTarget ''
99 Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
99 Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
100 HADDOCK_DOCS = NO
100 HADDOCK_DOCS = NO
101 BUILD_SPHINX_HTML = NO
101 BUILD_SPHINX_HTML = NO
102 BUILD_SPHINX_PDF = NO
102 BUILD_SPHINX_PDF = NO
103− '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
103+ '' + lib.optionalString enableRelocatedStaticLibs ''
104 GhcLibHcOpts += -fPIC
104 GhcLibHcOpts += -fPIC
105 GhcRtsHcOpts += -fPIC
105 GhcRtsHcOpts += -fPIC
106− '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
106+ '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
107 EXTRA_CC_OPTS += -std=gnu99
107 EXTRA_CC_OPTS += -std=gnu99
108− '' + stdenv.lib.optionalString (!enableTerminfo) ''
108+ '' + lib.optionalString (!enableTerminfo) ''
109 WITH_TERMINFO=NO
109 WITH_TERMINFO=NO
110 ''
110 ''
111 # musl doesn't have a system-linker. Only on x86, and on x86 we need it, as
111 # musl doesn't have a system-linker. Only on x86, and on x86 we need it, as
112 # our elf linker for x86_64 is broken.
112 # our elf linker for x86_64 is broken.
113− + stdenv.lib.optionalString (targetPlatform.isMusl && !targetPlatform.isx86) ''
113+ + lib.optionalString (targetPlatform.isMusl && !targetPlatform.isx86) ''
114 compiler_CONFIGURE_OPTS += --flags=-dynamic-system-linker
114 compiler_CONFIGURE_OPTS += --flags=-dynamic-system-linker
115 ''
115 ''
116 # While split sections are now enabled by default in ghc 8.8 for windows,
116 # While split sections are now enabled by default in ghc 8.8 for windows,
117 # the seem to lead to `too many sections` errors when building base for
117 # the seem to lead to `too many sections` errors when building base for
118 # profiling.
118 # profiling.
119− + stdenv.lib.optionalString targetPlatform.isWindows ''
119+ + lib.optionalString targetPlatform.isWindows ''
120 SplitSections = NO
120 SplitSections = NO
121− '' + stdenv.lib.optionalString (!enableLibraryProfiling) ''
121+ '' + lib.optionalString (!enableLibraryProfiling) ''
122 BUILD_PROF_LIBS = NO
122 BUILD_PROF_LIBS = NO
123 '';
123 '';
124
124
125 # Splicer will pull out correct variations
125 # Splicer will pull out correct variations
126− libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
126+ libDeps = platform: lib.optional enableTerminfo [ ncurses ]
127 ++ [targetLibffi]
127 ++ [targetLibffi]
128− ++ stdenv.lib.optional (!enableIntegerSimple) gmp
128+ ++ lib.optional (!enableIntegerSimple) gmp
129− ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
129+ ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
130− ++ stdenv.lib.optional (platform.isLinux && !platform.isAarch32) numactl;
130+ ++ lib.optional (platform.isLinux && !platform.isAarch32) numactl;
131
131
132 toolsForTarget =
132 toolsForTarget =
133 if hostPlatform == buildPlatform then
133 if hostPlatform == buildPlatform then
134− [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm
134+ [ targetPackages.stdenv.cc ] ++ lib.optional useLLVM llvmPackages.llvm
135 else assert targetPlatform == hostPlatform; # build != host == target
135 else assert targetPlatform == hostPlatform; # build != host == target
136− [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
136+ [ stdenv.cc ] ++ lib.optional useLLVM buildLlvmPackages.llvm;
137
137
138 targetCC = builtins.head toolsForTarget;
138 targetCC = builtins.head toolsForTarget;
139
139
140 configured-src = import ./configured-src.nix {
140 configured-src = import ./configured-src.nix {
141− inherit stdenv fetchurl
141+ inherit stdenv lib fetchurl
142 ghc-version ghc-version-date ghc-patches src-spec
142 ghc-version ghc-version-date ghc-patches src-spec
143 targetPrefix
143 targetPrefix
144 targetPlatform hostPlatform
144 targetPlatform hostPlatform
@@ -212,7 +212,7 @@ stdenv.mkDerivation (rec {
212 nativeBuildInputs = [
212 nativeBuildInputs = [
213 perl autoconf automake m4 python3 sphinx
213 perl autoconf automake m4 python3 sphinx
214 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
214 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
215− ] ++ stdenv.lib.optional (patches != []) autoreconfHook;
215+ ] ++ lib.optional (patches != []) autoreconfHook;
216
216
217 # For building runtime libs
217 # For building runtime libs
218 depsBuildTarget = toolsForTarget;
218 depsBuildTarget = toolsForTarget;
@@ -220,14 +220,14 @@ stdenv.mkDerivation (rec {
220 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
220 buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
221
221
222 propagatedBuildInputs = [ targetPackages.stdenv.cc ]
222 propagatedBuildInputs = [ targetPackages.stdenv.cc ]
223− ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
223+ ++ lib.optional useLLVM llvmPackages.llvm;
224
224
225− depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
225+ depsTargetTarget = map lib.getDev (libDeps targetPlatform);
226− depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
226+ depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
227
227
228 # required, because otherwise all symbols from HSffi.o are stripped, and
228 # required, because otherwise all symbols from HSffi.o are stripped, and
229 # that in turn causes GHCi to abort
229 # that in turn causes GHCi to abort
230− stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
230+ stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
231
231
232 # See #63511 - the only unstripped file is the debug rts which isn't meant to
232 # See #63511 - the only unstripped file is the debug rts which isn't meant to
233 # be stripped.
233 # be stripped.
@@ -236,8 +236,8 @@ stdenv.mkDerivation (rec {
236 checkTarget = "test";
236 checkTarget = "test";
237
237
238 hardeningDisable = [ "format" ]
238 hardeningDisable = [ "format" ]
239− ++ stdenv.lib.optional stdenv.targetPlatform.isAarch32 "pic"
239+ ++ lib.optional stdenv.targetPlatform.isAarch32 "pic"
240− ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
240+ ++ lib.optional stdenv.targetPlatform.isMusl "pie";
241
241
242 postInstall = ''
242 postInstall = ''
243 # Install the bash completion file.
243 # Install the bash completion file.
@@ -250,7 +250,7 @@ stdenv.mkDerivation (rec {
250 # The ghcprog fixup is for musl (where runhaskell script just needs to point to the correct
250 # The ghcprog fixup is for musl (where runhaskell script just needs to point to the correct
251 # ghc program to work).
251 # ghc program to work).
252 sed -i \
252 sed -i \
253− -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' \
253+ -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' \
254 -e 's/ghcprog="ghc-/ghcprog="${targetPrefix}ghc-/' \
254 -e 's/ghcprog="ghc-/ghcprog="${targetPrefix}ghc-/' \
255 $i
255 $i
256 done
256 done
@@ -324,7 +324,7 @@ stdenv.mkDerivation (rec {
324 inherit (ghc.meta) license platforms;
324 inherit (ghc.meta) license platforms;
325 };
325 };
326
326
327−} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
327+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
328 dontStrip = true;
328 dontStrip = true;
329 dontPatchELF = true;
329 dontPatchELF = true;
330 noAuditTmpdir = true;
330 noAuditTmpdir = true;
compiler/old-ghc-nix/default.nixdeleted−10
@@ -1,10 +0,0 @@
1−{ pkgs ? import <nixpkgs> {} }:
2−let
3− fetch = jsonFile:
4− with builtins;
5− let spec = fromJSON (readFile jsonFile);
6− in pkgs.fetchgit {
7− name = "old-ghc-nix";
8− inherit (spec) sha256 url rev;
9− };
10−in import (fetch ./old-ghc-nix.json) { inherit pkgs; }
compiler/old-ghc-nix/old-ghc-nix.jsondeleted−7
@@ -1,7 +0,0 @@
1−{
2− "url": "https://github.com/angerman/old-ghc-nix",
3− "rev": "2a41a09127f6dc7a6384823d1acd51ba257f95bd",
4− "date": "2020-06-03T12:50:09+08:00",
5− "sha256": "1cp6aksb6ldgjb5zyqikyjrjij79n9z7wd86migph0wp19vmszkf",
6− "fetchSubmodules": false
7−}
docs/tutorials/cross-compilation.md+1−1
@@ -90,7 +90,7 @@ executables you must add package overrides to:
90```nix
90```nix
91{
91{
92 packages.bench.components.exes.bench.configureFlags =
92 packages.bench.components.exes.bench.configureFlags =
93− stdenv.lib.optionals stdenv.hostPlatform.isMusl [
93+ lib.optionals stdenv.hostPlatform.isMusl [
94 "--disable-executable-dynamic"
94 "--disable-executable-dynamic"
95 "--disable-shared"
95 "--disable-shared"
96 "--ghc-option=-optl=-pthread"
96 "--ghc-option=-optl=-pthread"
nix/sources.json+14
@@ -119,6 +119,7 @@
119 },
119 },
120 "nixpkgs-unstable": {
120 "nixpkgs-unstable": {
121 "branch": "nixpkgs-unstable",
121 "branch": "nixpkgs-unstable",
122+ "builtin": false,
122 "description": "Nix Packages collection",
123 "description": "Nix Packages collection",
123 "homepage": "",
124 "homepage": "",
124 "owner": "NixOS",
125 "owner": "NixOS",
@@ -128,5 +129,18 @@
128 "type": "tarball",
129 "type": "tarball",
129 "url": "https://github.com/NixOS/nixpkgs/archive/410bbd828cdc6156aecd5bc91772ad3a6b1099c7.tar.gz",
130 "url": "https://github.com/NixOS/nixpkgs/archive/410bbd828cdc6156aecd5bc91772ad3a6b1099c7.tar.gz",
130 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
131 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
132+ },
133+ "old-ghc-nix": {
134+ "branch": "master",
135+ "builtin": false,
136+ "description": "Old and New GHC",
137+ "homepage": null,
138+ "owner": "angerman",
139+ "repo": "old-ghc-nix",
140+ "rev": "131ce9ae27d7b7afdd1d3ce8c3a74483e60b91bb",
141+ "sha256": "0n62qr7hrqmy6h80736ji47ln759sk845g43f9cprpmcs9m4wl9i",
142+ "type": "tarball",
143+ "url": "https://github.com/angerman/old-ghc-nix/archive/131ce9ae27d7b7afdd1d3ce8c3a74483e60b91bb.tar.gz",
144+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
131 }
145 }
132}
146}
nix/sources.nix+86−46
@@ -6,52 +6,63 @@ let
6 # The fetchers. fetch_<type> fetches specs of type <type>.
6 # The fetchers. fetch_<type> fetches specs of type <type>.
7 #
7 #
8
8
9− fetch_file = pkgs: spec:
9+ fetch_file = pkgs: name: spec:
10+ let
11+ name' = sanitizeName name + "-src";
12+ in
10− if spec.builtin or true then
13+ if spec.builtin or true then
11− builtins_fetchurl { inherit (spec) url sha256; }
14+ builtins_fetchurl { inherit (spec) url sha256; name = name'; }
12− else
15+ else
13− pkgs.fetchurl { inherit (spec) url sha256; };
16+ pkgs.fetchurl { inherit (spec) url sha256; name = name'; };
14−
15− fetch_tarball = pkgs: spec:
16− if spec.builtin or true then
17− builtins_fetchTarball { inherit (spec) url sha256; }
18− else
19− pkgs.fetchzip { inherit (spec) url sha256; };
20
17
21− fetch_git = pkgs: spec:
18+ fetch_tarball = pkgs: name: spec:
22− pkgs.fetchgit { url = spec.repo; inherit (spec) rev deepClone sha256; };
19+ let
20+ name' = sanitizeName name + "-src";
21+ in
22+ if spec.builtin or true then
23+ builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
24+ else
25+ pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
23
26
24− fetch_builtin-tarball = spec:
27+ fetch_git = name: spec:
25− builtins.trace
28+ let
26− ''
29+ ref =
27− WARNING:
30+ if spec ? ref then spec.ref else
28− The niv type "builtin-tarball" will soon be deprecated. You should
31+ if spec ? branch then "refs/heads/${spec.branch}" else
29− instead use `builtin = true`.
32+ if spec ? tag then "refs/tags/${spec.tag}" else
33+ abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
34+ in
35+ builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };
30
36
31− $ niv modify <package> -a type=tarball -a builtin=true
37+ fetch_local = spec: spec.path;
32− ''
33− builtins_fetchTarball { inherit (spec) url sha256; };
34
38
35− fetch_builtin-url = spec:
39+ fetch_builtin-tarball = name: throw
36− builtins.trace
37− ''
38− WARNING:
39− The niv type "builtin-url" will soon be deprecated. You should
40+ ''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`.
40− instead use `builtin = true`.
41+ $ niv modify ${name} -a type=tarball -a builtin=true'';
41
42
43+ fetch_builtin-url = name: throw
44+ ''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`.
42− $ niv modify <package> -a type=file -a builtin=true
45+ $ niv modify ${name} -a type=file -a builtin=true'';
43− ''
44− (builtins_fetchurl { inherit (spec) url sha256; });
45
46
46 #
47 #
47 # Various helpers
48 # Various helpers
48 #
49 #
49
50
51+ # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695
52+ sanitizeName = name:
53+ (
54+ concatMapStrings (s: if builtins.isList s then "-" else s)
55+ (
56+ builtins.split "[^[:alnum:]+._?=-]+"
57+ ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name)
58+ )
59+ );
60+
50 # The set of packages used when specs are fetched using non-builtins.
61 # The set of packages used when specs are fetched using non-builtins.
51− mkPkgs = sources:
62+ mkPkgs = sources: system:
52 let
63 let
53 sourcesNixpkgs =
64 sourcesNixpkgs =
54− import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {};
65+ import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; };
55 hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
66 hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
56 hasThisAsNixpkgsPath = <nixpkgs> == ./.;
67 hasThisAsNixpkgsPath = <nixpkgs> == ./.;
57 in
68 in
@@ -71,14 +82,27 @@ let
71
82
72 if ! builtins.hasAttr "type" spec then
83 if ! builtins.hasAttr "type" spec then
73 abort "ERROR: niv spec ${name} does not have a 'type' attribute"
84 abort "ERROR: niv spec ${name} does not have a 'type' attribute"
74− else if spec.type == "file" then fetch_file pkgs spec
85+ else if spec.type == "file" then fetch_file pkgs name spec
75− else if spec.type == "tarball" then fetch_tarball pkgs spec
86+ else if spec.type == "tarball" then fetch_tarball pkgs name spec
76− else if spec.type == "git" then fetch_git pkgs spec
87+ else if spec.type == "git" then fetch_git name spec
88+ else if spec.type == "local" then fetch_local spec
77− else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec
89+ else if spec.type == "builtin-tarball" then fetch_builtin-tarball name
78− else if spec.type == "builtin-url" then fetch_builtin-url spec
90+ else if spec.type == "builtin-url" then fetch_builtin-url name
79 else
91 else
80 abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
92 abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
81
93
94+ # If the environment variable NIV_OVERRIDE_${name} is set, then use
95+ # the path directly as opposed to the fetched source.
96+ replace = name: drv:
97+ let
98+ saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name;
99+ ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
100+ in
101+ if ersatz == "" then drv else
102+ # this turns the string into an actual Nix path (for both absolute and
103+ # relative paths)
104+ if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";
105+
82 # Ports of functions for older nix versions
106 # Ports of functions for older nix versions
83
107
84 # a Nix version of mapAttrs if the built-in doesn't exist
108 # a Nix version of mapAttrs if the built-in doesn't exist
@@ -87,23 +111,37 @@ let
87 listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
111 listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
88 );
112 );
89
113
114+ # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
115+ range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);
116+
117+ # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
118+ stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
119+
120+ # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269
121+ stringAsChars = f: s: concatStrings (map f (stringToCharacters s));
122+ concatMapStrings = f: list: concatStrings (map f list);
123+ concatStrings = builtins.concatStringsSep "";
124+
125+ # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331
126+ optionalAttrs = cond: as: if cond then as else {};
127+
90 # fetchTarball version that is compatible between all the versions of Nix
128 # fetchTarball version that is compatible between all the versions of Nix
91− builtins_fetchTarball = { url, sha256 }@attrs:
129+ builtins_fetchTarball = { url, name ? null, sha256 }@attrs:
92 let
130 let
93 inherit (builtins) lessThan nixVersion fetchTarball;
131 inherit (builtins) lessThan nixVersion fetchTarball;
94 in
132 in
95 if lessThan nixVersion "1.12" then
133 if lessThan nixVersion "1.12" then
96− fetchTarball { inherit url; }
134+ fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
97 else
135 else
98 fetchTarball attrs;
136 fetchTarball attrs;
99
137
100 # fetchurl version that is compatible between all the versions of Nix
138 # fetchurl version that is compatible between all the versions of Nix
101− builtins_fetchurl = { url, sha256 }@attrs:
139+ builtins_fetchurl = { url, name ? null, sha256 }@attrs:
102 let
140 let
103 inherit (builtins) lessThan nixVersion fetchurl;
141 inherit (builtins) lessThan nixVersion fetchurl;
104 in
142 in
105 if lessThan nixVersion "1.12" then
143 if lessThan nixVersion "1.12" then
106− fetchurl { inherit url; }
144+ fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
107 else
145 else
108 fetchurl attrs;
146 fetchurl attrs;
109
147
@@ -115,14 +153,15 @@ let
115 then abort
153 then abort
116 "The values in sources.json should not have an 'outPath' attribute"
154 "The values in sources.json should not have an 'outPath' attribute"
117 else
155 else
118− spec // { outPath = fetch config.pkgs name spec; }
156+ spec // { outPath = replace name (fetch config.pkgs name spec); }
119 ) config.sources;
157 ) config.sources;
120
158
121 # The "config" used by the fetchers
159 # The "config" used by the fetchers
122 mkConfig =
160 mkConfig =
123− { sourcesFile ? ./sources.json
161+ { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null
124− , sources ? builtins.fromJSON (builtins.readFile sourcesFile)
162+ , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile)
163+ , system ? builtins.currentSystem
125− , pkgs ? mkPkgs sources
164+ , pkgs ? mkPkgs sources system
126 }: rec {
165 }: rec {
127 # The sources, i.e. the attribute set of spec name to spec
166 # The sources, i.e. the attribute set of spec name to spec
128 inherit sources;
167 inherit sources;
@@ -130,5 +169,6 @@ let
130 # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
169 # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
131 inherit pkgs;
170 inherit pkgs;
132 };
171 };
172+
133in
173in
134mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }
174mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }
overlays/armv6l-linux.nix+7−7
@@ -34,16 +34,16 @@ final: prev:
34 in {
34 in {
35 packages = {
35 packages = {
36 # clock 0.7.2 needs to be patched to support cross compilation.
36 # clock 0.7.2 needs to be patched to support cross compilation.
37− clock.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isAarch32 [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
37+ clock.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isAarch32 [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
38 # nix calls this package crypto
38 # nix calls this package crypto
39− # cryptonite-openssl.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
39+ # cryptonite-openssl.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
40
40
41− # http-client.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.5.14" then ./patches/http-client-0.5.14.patch else null) ];
41+ # http-client.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.5.14" then ./patches/http-client-0.5.14.patch else null) ];
42
42
43− # conduit.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if builtins.compareVersions version "1.3.1.1" < 0 then ./patches/conduit-1.3.0.2.patch else null) ];
43+ # conduit.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if builtins.compareVersions version "1.3.1.1" < 0 then ./patches/conduit-1.3.0.2.patch else null) ];
44− # streaming-commons.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/streaming-commons-0.2.0.0.patch ];
44+ # streaming-commons.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/streaming-commons-0.2.0.0.patch ];
45− # x509-system.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
45+ # x509-system.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
46− # file-embed-lzma.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
46+ # file-embed-lzma.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
47
47
48 # Set all of these to [], as these form the
48 # Set all of these to [], as these form the
49 # dependency graph of the libiserv, iserv-proxy, and iserv-remote
49 # dependency graph of the libiserv, iserv-proxy, and iserv-remote
overlays/bootstrap.nix+1−1
@@ -735,7 +735,7 @@ in {
735 isHaskellNixBootCompiler = true;
735 isHaskellNixBootCompiler = true;
736 }
736 }
737 )
737 )
738− (import ../compiler/old-ghc-nix { pkgs = final; });
738+ (import sources.old-ghc-nix { pkgs = final; });
739
739
740 packages = {
740 packages = {
741 # now that we have nix-tools and hpack, we can just
741 # now that we have nix-tools and hpack, we can just
overlays/emscripten/binaryen.nix+3−3
@@ -1,4 +1,4 @@
1−{ stdenv, cmake, python3, fetchFromGitHub, emscriptenRev ? null, substituteAll }:
1+{ stdenv, lib, cmake, python3, fetchFromGitHub, emscriptenRev ? null, substituteAll }:
2
2
3let
3let
4 defaultVersion = "93";
4 defaultVersion = "93";
@@ -29,14 +29,14 @@ stdenv.mkDerivation rec {
29 inherit rev;
29 inherit rev;
30 };
30 };
31
31
32− patches = stdenv.lib.optional (emscriptenRev != null) (substituteAll {
32+ patches = lib.optional (emscriptenRev != null) (substituteAll {
33 src = ./0001-Get-rid-of-git-dependency.patch;
33 src = ./0001-Get-rid-of-git-dependency.patch;
34 emscriptenv = "1.39.1";
34 emscriptenv = "1.39.1";
35 });
35 });
36
36
37 nativeBuildInputs = [ cmake python3 ];
37 nativeBuildInputs = [ cmake python3 ];
38
38
39− meta = with stdenv.lib; {
39+ meta = with lib; {
40 homepage = "https://github.com/WebAssembly/binaryen";
40 homepage = "https://github.com/WebAssembly/binaryen";
41 description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
41 description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
42 platforms = platforms.all;
42 platforms = platforms.all;
overlays/emscripten/default.nix+3−3
@@ -1,4 +1,4 @@
1−{ emscriptenVersion, stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler
1+{ emscriptenVersion, stdenv, lib, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler
2, jre, binaryen, enableWasm ? true , cmake, emscriptenBackend ? emscriptenfastcomp
2, jre, binaryen, enableWasm ? true , cmake, emscriptenBackend ? emscriptenfastcomp
3}:
3}:
4
4
@@ -45,7 +45,7 @@ stdenv.mkDerivation {
45 echo "SPIDERMONKEY_ENGINE = []" >> $out/${appdir}/config
45 echo "SPIDERMONKEY_ENGINE = []" >> $out/${appdir}/config
46 echo "EMCC_FAST_COMPILER = 0" >> $out/${appdir}/config
46 echo "EMCC_FAST_COMPILER = 0" >> $out/${appdir}/config
47 ''
47 ''
48− + stdenv.lib.optionalString enableWasm ''
48+ + lib.optionalString enableWasm ''
49 echo "BINARYEN_ROOT = '${binaryenVersioned}'" >> $out/share/emscripten/config
49 echo "BINARYEN_ROOT = '${binaryenVersioned}'" >> $out/share/emscripten/config
50 ''
50 ''
51 +
51 +
@@ -61,7 +61,7 @@ stdenv.mkDerivation {
61 echo "--------------- /running test -----------------"
61 echo "--------------- /running test -----------------"
62 '';
62 '';
63
63
64− meta = with stdenv.lib; {
64+ meta = with lib; {
65 homepage = "https://github.com/emscripten-core/emscripten";
65 homepage = "https://github.com/emscripten-core/emscripten";
66 description = "An LLVM-to-JavaScript Compiler";
66 description = "An LLVM-to-JavaScript Compiler";
67 platforms = platforms.all;
67 platforms = platforms.all;
overlays/emscripten/fastcomp/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ newScope, stdenv, binutils, wrapCCWith, symlinkJoin }:
1+{ newScope, stdenv, lib, binutils, wrapCCWith, symlinkJoin }:
2let
2let
3 callPackage = newScope (self // {inherit stdenv;});
3 callPackage = newScope (self // {inherit stdenv;});
4
4
@@ -15,7 +15,7 @@ let
15 '';
15 '';
16 };
16 };
17 emscriptenfastcomp = symlinkJoin {
17 emscriptenfastcomp = symlinkJoin {
18− name = "emscriptenfastcomp-${stdenv.lib.getVersion self.emscriptenfastcomp-unwrapped}";
18+ name = "emscriptenfastcomp-${lib.getVersion self.emscriptenfastcomp-unwrapped}";
19 paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
19 paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
20 preferLocalBuild = false;
20 preferLocalBuild = false;
21 allowSubstitutes = true;
21 allowSubstitutes = true;
overlays/emscripten/fastcomp/emscripten-fastcomp.nix+4−4
@@ -1,4 +1,4 @@
1−{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, ... }:
1+{ emscriptenVersion, stdenv, lib, fetchFromGitHub, cmake, python, gtest, ... }:
2
2
3let
3let
4 rev = emscriptenVersion;
4 rev = emscriptenVersion;
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
34 #"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
34 #"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
35 "-DLLVM_BUILD_TESTS=ON"
35 "-DLLVM_BUILD_TESTS=ON"
36 "-DCLANG_INCLUDE_TESTS=ON"
36 "-DCLANG_INCLUDE_TESTS=ON"
37− ] ++ (stdenv.lib.optional stdenv.isLinux
37+ ] ++ (lib.optional stdenv.isLinux
38 # necessary for clang to find crtend.o
38 # necessary for clang to find crtend.o
39 "-DGCC_INSTALL_PREFIX=${gcc}"
39 "-DGCC_INSTALL_PREFIX=${gcc}"
40 );
40 );
@@ -45,11 +45,11 @@ stdenv.mkDerivation rec {
45 inherit gcc;
45 inherit gcc;
46 };
46 };
47
47
48− meta = with stdenv.lib; {
48+ meta = with lib; {
49 homepage = "https://github.com/emscripten-core/emscripten-fastcomp";
49 homepage = "https://github.com/emscripten-core/emscripten-fastcomp";
50 description = "Emscripten LLVM";
50 description = "Emscripten LLVM";
51 platforms = platforms.all;
51 platforms = platforms.all;
52 maintainers = with maintainers; [ qknight matthewbauer ];
52 maintainers = with maintainers; [ qknight matthewbauer ];
53− license = stdenv.lib.licenses.ncsa;
53+ license = lib.licenses.ncsa;
54 };
54 };
55}
55}
overlays/emscripten/upstream/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ newScope, stdenv, binutils, wrapCCWith, symlinkJoin }:
1+{ newScope, stdenv, lib, binutils, wrapCCWith, symlinkJoin }:
2let
2let
3 callPackage = newScope (self // {inherit stdenv;});
3 callPackage = newScope (self // {inherit stdenv;});
4
4
@@ -15,7 +15,7 @@ let
15 '';
15 '';
16 };
16 };
17 emscriptenupstream = symlinkJoin {
17 emscriptenupstream = symlinkJoin {
18− name = "emscriptenupstream-${stdenv.lib.getVersion self.emscriptenupstream-unwrapped}";
18+ name = "emscriptenupstream-${lib.getVersion self.emscriptenupstream-unwrapped}";
19 paths = [ self.emscriptenupstream-wrapped self.emscriptenupstream-unwrapped ];
19 paths = [ self.emscriptenupstream-wrapped self.emscriptenupstream-unwrapped ];
20 preferLocalBuild = false;
20 preferLocalBuild = false;
21 allowSubstitutes = true;
21 allowSubstitutes = true;
overlays/emscripten/upstream/emscripten-upstream.nix+4−4
@@ -1,4 +1,4 @@
1−{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, ... }:
1+{ emscriptenVersion, stdenv, lib, fetchFromGitHub, cmake, python, gtest, ... }:
2
2
3let
3let
4 gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
4 gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
39 #"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
39 #"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
40 "-DLLVM_BUILD_TESTS=ON"
40 "-DLLVM_BUILD_TESTS=ON"
41 "-DCLANG_INCLUDE_TESTS=OFF"
41 "-DCLANG_INCLUDE_TESTS=OFF"
42− ] ++ (stdenv.lib.optional stdenv.isLinux
42+ ] ++ (lib.optional stdenv.isLinux
43 # necessary for clang to find crtend.o
43 # necessary for clang to find crtend.o
44 "-DGCC_INSTALL_PREFIX=${gcc}"
44 "-DGCC_INSTALL_PREFIX=${gcc}"
45 );
45 );
@@ -50,11 +50,11 @@ stdenv.mkDerivation rec {
50 inherit gcc;
50 inherit gcc;
51 };
51 };
52
52
53− meta = with stdenv.lib; {
53+ meta = with lib; {
54 homepage = "http://github.com/llvm/llvm-project";
54 homepage = "http://github.com/llvm/llvm-project";
55 description = "LLVM";
55 description = "LLVM";
56 platforms = platforms.all;
56 platforms = platforms.all;
57 maintainers = with maintainers; [ ];
57 maintainers = with maintainers; [ ];
58− license = stdenv.lib.licenses.ncsa;
58+ license = lib.licenses.ncsa;
59 };
59 };
60}
60}
overlays/haskell.nix+1−1
@@ -266,7 +266,7 @@ final: prev: {
266
266
267 update-index-state-hashes = import ../scripts/update-index-state-hashes.nix {
267 update-index-state-hashes = import ../scripts/update-index-state-hashes.nix {
268 inherit (final.haskell-nix) indexStateHashesPath;
268 inherit (final.haskell-nix) indexStateHashesPath;
269− inherit (final) coreutils nix writeShellScriptBin stdenv curl;
269+ inherit (final) coreutils nix writeShellScriptBin stdenv lib curl;
270 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
270 # Update scripts use the internal nix-tools and cabal-install (compiled with a fixed GHC version)
271 nix-tools = final.haskell-nix.internal-nix-tools;
271 nix-tools = final.haskell-nix.internal-nix-tools;
272 };
272 };
overlays/windows.nix+10−10
@@ -17,11 +17,11 @@ final: prev:
17 # });
17 # });
18
18
19 mfpr = prev.mfpr.overrideAttrs (drv: {
19 mfpr = prev.mfpr.overrideAttrs (drv: {
20− configureFlags = (drv.configureFlags or []) ++ prev.stdenv.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
20+ configureFlags = (drv.configureFlags or []) ++ prev.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
21 });
21 });
22
22
23 libmpc = prev.libmpc.overrideAttrs (drv: {
23 libmpc = prev.libmpc.overrideAttrs (drv: {
24− configureFlags = (drv.configureFlags or []) ++ prev.stdenv.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
24+ configureFlags = (drv.configureFlags or []) ++ prev.lib.optional prev.stdenv.hostPlatform.isWindows "--enable-static --disable-shared" ;
25 });
25 });
26
26
27 binutils-unwrapped = prev.binutils-unwrapped.overrideAttrs (attrs: {
27 binutils-unwrapped = prev.binutils-unwrapped.overrideAttrs (attrs: {
@@ -72,7 +72,7 @@ final: prev:
72 # figuring out which libraries we need for the build (walking the
72 # figuring out which libraries we need for the build (walking the
73 # dependencies) and then placing them somewhere where wine+remote-iserv
73 # dependencies) and then placing them somewhere where wine+remote-iserv
74 # will find them.
74 # will find them.
75− remote-iserv.postInstall = pkgs.stdenv.lib.optionalString pkgs.stdenv.hostPlatform.isWindows (
75+ remote-iserv.postInstall = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isWindows (
76 let extra-libs = [ pkgs.openssl.bin pkgs.libffi pkgs.gmp pkgs.libsodium ]; in ''
76 let extra-libs = [ pkgs.openssl.bin pkgs.libffi pkgs.gmp pkgs.libsodium ]; in ''
77 for p in ${lib.concatStringsSep " "extra-libs}; do
77 for p in ${lib.concatStringsSep " "extra-libs}; do
78 find "$p" -iname '*.dll' -exec cp {} $out/bin/ \;
78 find "$p" -iname '*.dll' -exec cp {} $out/bin/ \;
@@ -91,20 +91,20 @@ final: prev:
91 # else null)) ];
91 # else null)) ];
92
92
93 # clock 0.7.2 needs to be patched to support cross compilation.
93 # clock 0.7.2 needs to be patched to support cross compilation.
94− clock.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
94+ clock.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: (if version == "0.7.2" then ./patches/clock-0.7.2.patch else null)) ];
95 # nix calls this package crypto
95 # nix calls this package crypto
96− cryptonite-openssl.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
96+ cryptonite-openssl.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.7" then ./patches/cryptonite-openssl-0.7.patch else null) ];
97
97
98 # this patch seems to be rather flaky and highly dependent on
98 # this patch seems to be rather flaky and highly dependent on
99 # the network library. I think we might need to respin that in
99 # the network library. I think we might need to respin that in
100 # a better way that doesn't just delete some code, but makes
100 # a better way that doesn't just delete some code, but makes
101 # the bounds checks stricter.
101 # the bounds checks stricter.
102− # http-client.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.5.14" then ./patches/http-client-0.5.14.patch else null) ];
102+ # http-client.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if version == "0.5.14" then ./patches/http-client-0.5.14.patch else null) ];
103
103
104− conduit.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if builtins.compareVersions version "1.3.1.1" < 0 then ./patches/conduit-1.3.0.2.patch else null) ];
104+ conduit.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ({ version, revision }: if builtins.compareVersions version "1.3.1.1" < 0 then ./patches/conduit-1.3.0.2.patch else null) ];
105− streaming-commons.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/streaming-commons-0.2.0.0.patch ];
105+ streaming-commons.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/streaming-commons-0.2.0.0.patch ];
106− x509-system.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
106+ x509-system.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
107− file-embed-lzma.patches = pkgs.stdenv.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
107+ file-embed-lzma.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
108
108
109 # Set all of these to [], as these form the
109 # Set all of these to [], as these form the
110 # dependency graph of the libiserv, iserv-proxy, and iserv-remote
110 # dependency graph of the libiserv, iserv-proxy, and iserv-remote
scripts/check-closure-size.nix+2−2
@@ -1,9 +1,9 @@
1−{ stdenv, writeScript, coreutils, gawk, nix
1+{ stdenv, lib, writeScript, coreutils, gawk, nix
2, nix-tools
2, nix-tools
3, limitMB ? 525
3, limitMB ? 525
4}:
4}:
5
5
6−with stdenv.lib;
6+with lib;
7
7
8writeScript "check-closure-size.sh" ''
8writeScript "check-closure-size.sh" ''
9 #!${stdenv.shell}
9 #!${stdenv.shell}
scripts/check-hydra.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, writeScript, coreutils, time, gnutar, gzip, hydra-migration, jq }:
1+{ stdenv, lib, writeScript, coreutils, time, gnutar, gzip, hydra-migration, jq }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5writeScript "check-hydra.sh" ''
5writeScript "check-hydra.sh" ''
6 #!${stdenv.shell}
6 #!${stdenv.shell}
scripts/check-materialization-concurrency/check.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, writeScript }:
1+{ stdenv, lib, writeScript }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5writeScript "check-materialization-concurrency.sh" ''
5writeScript "check-materialization-concurrency.sh" ''
6 #!${stdenv.shell}
6 #!${stdenv.shell}
scripts/check-path-support.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, writeScript, coreutils, gnutar, gzip, nix }:
1+{ stdenv, lib, writeScript, coreutils, gnutar, gzip, nix }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5writeScript "check-path-supprot.sh" ''
5writeScript "check-path-supprot.sh" ''
6 #!${stdenv.shell}
6 #!${stdenv.shell}
scripts/update-docs.nix+2−2
@@ -1,7 +1,7 @@
1−{ stdenv, writeScript, coreutils, glibc, git, openssh, gnused, mkdocs
1+{ stdenv, lib, writeScript, coreutils, glibc, git, openssh, gnused, mkdocs
2, generatedOptions }:
2, generatedOptions }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 repo = "git@github.com:input-output-hk/haskell.nix.git";
7 repo = "git@github.com:input-output-hk/haskell.nix.git";
scripts/update-external.nix+2−2
@@ -1,10 +1,10 @@
1−{ stdenv, writeScript, glibc, coreutils, git, openssh
1+{ stdenv, lib, writeScript, glibc, coreutils, git, openssh
2, nix-tools, cabal-install, nix-prefetch-git
2, nix-tools, cabal-install, nix-prefetch-git
3, bash, curl, findutils, gawk }:
3, bash, curl, findutils, gawk }:
4
4
5{ name, script }:
5{ name, script }:
6
6
7−with stdenv.lib;
7+with lib;
8
8
9let
9let
10 repoHTTPS = "https://github.com/input-output-hk/${name}.nix";
10 repoHTTPS = "https://github.com/input-output-hk/${name}.nix";
scripts/update-hackage.nix+1−1
@@ -1,4 +1,4 @@
1−{ stdenv, writeScript, coreutils, glibc, git, openssh
1+{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
2, nix-tools, cabal-install, nix-prefetch-git
2, nix-tools, cabal-install, nix-prefetch-git
3, gawk, bash, curl, findutils
3, gawk, bash, curl, findutils
4, update-index-state-hashes }@args:
4, update-index-state-hashes }@args:
scripts/update-index-state-hashes.nix+2−2
@@ -1,6 +1,6 @@
1−{ indexStateHashesPath, nix-tools, coreutils, nix, writeShellScriptBin, stdenv, curl }:
1+{ indexStateHashesPath, nix-tools, coreutils, nix, writeShellScriptBin, stdenv, lib, curl }:
2with builtins;
2with builtins;
3−with stdenv.lib;
3+with lib;
4writeShellScriptBin "update-index-state-hashes" ''
4writeShellScriptBin "update-index-state-hashes" ''
5 export PATH="${makeBinPath [ coreutils nix-tools nix curl ]}"
5 export PATH="${makeBinPath [ coreutils nix-tools nix curl ]}"
6
6
scripts/update-pins.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, writeScript, coreutils, glibc, git, openssh }@args:
1+{ stdenv, lib, writeScript, coreutils, glibc, git, openssh }@args:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 repo = "git@github.com:input-output-hk/haskell.nix.git";
6 repo = "git@github.com:input-output-hk/haskell.nix.git";
scripts/update-stackage.nix+1−1
@@ -1,4 +1,4 @@
1−{ stdenv, writeScript, coreutils, glibc, git, openssh
1+{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
2, nix-tools, cabal-install, nix-prefetch-git
2, nix-tools, cabal-install, nix-prefetch-git
3, gawk, bash, curl, findutils }@args:
3, gawk, bash, curl, findutils }@args:
4
4
test/buildable/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/builder-haddock/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ mkCabalProjectPkgSet, stdenv, testSrc }:
1+{ mkCabalProjectPkgSet, stdenv, lib, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 pkgSet = mkCabalProjectPkgSet {
6 pkgSet = mkCabalProjectPkgSet {
test/cabal-22/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, mkCabalProjectPkgSet, cabalProject', haskellLib, util, recurseIntoAttrs, testSrc, compiler-nix-name }:
1+{ stdenv, lib, mkCabalProjectPkgSet, cabalProject', haskellLib, util, recurseIntoAttrs, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/cabal-hpack/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 modules = [
7 modules = [
test/cabal-simple-prof/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 modules = [
7 modules = [
test/cabal-simple/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 modules = [
7 modules = [
test/cabal-source-repo-comments/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/cabal-source-repo/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/cabal-sublib/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 modules = [
7 modules = [
test/call-cabal-project-to-nix/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, mkCabalProjectPkgSet, callCabalProjectToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
1+{ stdenv, lib, mkCabalProjectPkgSet, callCabalProjectToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 # This test could use cabalProject', but it does so that it
6 # This test could use cabalProject', but it does so that it
test/call-stack-to-nix/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, mkStackPkgSet, callStackToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc }:
1+{ stdenv, lib, mkStackPkgSet, callStackToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 callProjectResults = callStackToNix {
6 callProjectResults = callStackToNix {
test/compiler-nix-name/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, haskell-nix, recurseIntoAttrs, testSrc }:
1+{ stdenv, lib, haskell-nix, recurseIntoAttrs, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = haskell-nix.cabalProject' {
6 project = haskell-nix.cabalProject' {
test/coverage-golden/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, fetchFromGitHub, recurseIntoAttrs, runCommand, testSrc, compiler-nix-name, buildPackages, sources }:
1+{ stdenv, lib, fetchFromGitHub, recurseIntoAttrs, runCommand, testSrc, compiler-nix-name, buildPackages, sources }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 # Using buildPackages.buildPackages here because buildPackages.git
6 # Using buildPackages.buildPackages here because buildPackages.git
test/coverage-no-libs/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabal-install, cabalProject', stackProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabal-install, cabalProject', stackProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 projectArgs = {
6 projectArgs = {
test/coverage/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabal-install, cabalProject', stackProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabal-install, cabalProject', stackProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 projectArgs = {
6 projectArgs = {
test/exe-only/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, haskell-nix, recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, haskell-nix, recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 project = haskell-nix.cabalProject' {
7 project = haskell-nix.cabalProject' {
test/extra-hackage/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6
6
test/fully-static/default.nix+2−2
@@ -1,11 +1,11 @@
1{ stackProject'
1{ stackProject'
2−, stdenv, gmp6, openssl, zlib, libffi
2+, stdenv, lib, gmp6, openssl, zlib, libffi
3, buildPackages
3, buildPackages
4, recurseIntoAttrs
4, recurseIntoAttrs
5, testSrc
5, testSrc
6}:
6}:
7
7
8−with stdenv.lib;
8+with lib;
9
9
10let
10let
11 # Grab the compiler name from stack-to-nix output.
11 # Grab the compiler name from stack-to-nix output.
test/ghc-options/cabal.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/ghc-options/stack.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
1+{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = stackProject' {
6 project = stackProject' {
test/githash/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, haskell-nix, recurseIntoAttrs, testSrc, compiler-nix-name, runCommand, gitMinimal, buildPackages }:
1+{ stdenv, lib, haskell-nix, recurseIntoAttrs, testSrc, compiler-nix-name, runCommand, gitMinimal, buildPackages }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 src = testSrc "githash";
6 src = testSrc "githash";
test/index-state/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, testSrc, tool, compiler-nix-name }:
2+{ stdenv, lib, testSrc, tool, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 # The hackage-security 0.6.0.1 was uploaded at 2020-04-06T20:54:35Z
7 # The hackage-security 0.6.0.1 was uploaded at 2020-04-06T20:54:35Z
test/project-flags/cabal.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabalProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/project-flags/stack.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
1+{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = stackProject' {
6 project = stackProject' {
test/setup-deps/default.nix+1−1
@@ -1,7 +1,7 @@
1{ pkgs, compiler-nix-name }:
1{ pkgs, compiler-nix-name }:
2
2
3with pkgs;
3with pkgs;
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 project = haskell-nix.cabalProject' {
7 project = haskell-nix.cabalProject' {
test/shell-for-setup-deps/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabal-install, cabalProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
1+{ stdenv, lib, cabal-install, cabalProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
test/shell-for/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, cabal-install, mkCabalProjectPkgSet, recurseIntoAttrs, runCommand, testSrc }:
1+{ stdenv, lib, cabal-install, mkCabalProjectPkgSet, recurseIntoAttrs, runCommand, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 pkgSet = mkCabalProjectPkgSet {
6 pkgSet = mkCabalProjectPkgSet {
test/snapshots/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, haskellPackages, snapshots, recurseIntoAttrs, runCommand, testSrc }:
1+{ stdenv, lib, haskellPackages, snapshots, recurseIntoAttrs, runCommand, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 env = snapshots."lts-14.13".ghcWithHoogle
6 env = snapshots."lts-14.13".ghcWithHoogle
test/stack-simple/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, pkgs, mkStackPkgSet, haskellLib, testSrc }:
1+{ stdenv, lib, pkgs, mkStackPkgSet, haskellLib, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4
4
5let
5let
6 # ./pkgs.nix and ./stack-simple.nix are generated by running
6 # ./pkgs.nix and ./stack-simple.nix are generated by running
test/sublib-docs/default.nix+2−2
@@ -1,7 +1,7 @@
1# Test a package set
1# Test a package set
2−{ stdenv, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
2+{ stdenv, lib, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3
3
4−with stdenv.lib;
4+with lib;
5
5
6let
6let
7 project = cabalProject' {
7 project = cabalProject' {
test/with-packages/default.nix+2−2
@@ -1,6 +1,6 @@
1−{ stdenv, util, mkPkgSet, recurseIntoAttrs, testSrc }:
1+{ stdenv, lib, util, mkPkgSet, recurseIntoAttrs, testSrc }:
2
2
3−with stdenv.lib;
3+with lib;
4with util;
4with util;
5
5
6let
6let