on iko/ghcjs-patch-master help sign in
remove creation of relative links in package db (#569)
49cbd34Hamish Mackenzie
@@ -16,16 +16,17 @@ let
16in rec {
16in rec {
17 tests = import ./test/default.nix { inherit pkgs ifdLevel; };
17 tests = import ./test/default.nix { inherit pkgs ifdLevel; };
18
18
19− tools = pkgs.recurseIntoAttrs
19+ tools = pkgs.lib.optionalAttrs (ifdLevel >= 3)
20+ (pkgs.recurseIntoAttrs
20− (pkgs.lib.mapAttrs (_: ghc:
21+ (pkgs.lib.mapAttrs (_: ghc:
21− let
22+ let
22− tool = name: version: pkgs.buildPackages.haskell-nix.tool name { inherit version ghc; };
23+ tool = name: version: pkgs.buildPackages.haskell-nix.tool name { inherit version ghc; };
23− in pkgs.recurseIntoAttrs {
24+ in pkgs.recurseIntoAttrs {
24− cabal-32 = tool "cabal" "3.2.0.0";
25+ cabal-32 = tool "cabal" "3.2.0.0";
25− ghcide = tool "ghcide" "object-code";
26+ ghcide = tool "ghcide" "object-code";
26− } // pkgs.lib.optionalAttrs (ghc.version == "8.6.5") {
27+ } // pkgs.lib.optionalAttrs (ghc.version == "8.6.5") {
27− cabal-30 = tool "cabal" "3.0.0.0";
28+ cabal-30 = tool "cabal" "3.0.0.0";
28− }) { inherit (pkgs.buildPackages.haskell-nix.compiler) ghc865 ghc883; });
29+ }) { inherit (pkgs.buildPackages.haskell-nix.compiler) ghc865 ghc883; }));
29
30
30 # Scripts for keeping Hackage and Stackage up to date, and CI tasks.
31 # Scripts for keeping Hackage and Stackage up to date, and CI tasks.
31 # The dontRecurseIntoAttrs prevents these from building on hydra
32 # The dontRecurseIntoAttrs prevents these from building on hydra
builder/make-config-files.nix−4
@@ -179,9 +179,5 @@ in { identifier, component, fullName, flags ? {} }:
179 sed -i -E "/^ ./{H;$!d} ; x ; s,^dynamic-library-dirs:.*,dynamic-library-dirs: $dynamicLinksDir," $f
179 sed -i -E "/^ ./{H;$!d} ; x ; s,^dynamic-library-dirs:.*,dynamic-library-dirs: $dynamicLinksDir," $f
180 done
180 done
181 '' + ''
181 '' + ''
182− # Use ''${pkgroot} relative paths so that we can relocate the package database
183− # along with referenced packages and still have it work on systems with
184− # or without nix installed.
185− sed -i 's|/nix/store/|''${pkgroot}/../../../|' $out/${packageCfgDir}/*.conf
186 ${target-pkg} -v0 --package-db $out/${packageCfgDir} recache
182 ${target-pkg} -v0 --package-db $out/${packageCfgDir} recache
187 '')
183 '')
ci.nix+27−8
@@ -37,31 +37,50 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
37 let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
37 let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
38 build = import ./build.nix { inherit pkgs ifdLevel; };
38 build = import ./build.nix { inherit pkgs ifdLevel; };
39 platformFilter = platformFilterGeneric pkgs system;
39 platformFilter = platformFilterGeneric pkgs system;
40+ compilers = {
41+ inherit (pkgs.haskell-nix.compiler) ghc865 ghc883;
42+ };
40 in filterAttrsOnlyRecursive (_: v: platformFilter v) {
43 in filterAttrsOnlyRecursive (_: v: platformFilter v) {
41 # Native builds
44 # Native builds
42 # TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
45 # TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
43− native = pkgs.recurseIntoAttrs {
46+ native = pkgs.recurseIntoAttrs ({
44 inherit (build) tests tools maintainer-scripts maintainer-script-cache;
47 inherit (build) tests tools maintainer-scripts maintainer-script-cache;
48+ ghc = pkgs.recurseIntoAttrs compilers;
49+ } // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
50+ iserv-proxy = pkgs.recurseIntoAttrs (
51+ pkgs.lib.mapAttrs (ghcName: _:
52+ pkgs.ghc-extra-packages."${ghcName}".iserv-proxy.components.exes.iserv-proxy
53+ ) compilers);
54+ } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
45 hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
55 hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
46− iserv-proxy = pkgs.ghc-extra-packages.ghc865.iserv-proxy.components.exes.iserv-proxy;
47− ghc = pkgs.recurseIntoAttrs pkgs.haskell-nix.compiler;
48− };
56+ });
49 }
57 }
50 //
58 //
51 dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
59 dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
52 # Cross builds
60 # Cross builds
53 let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
61 let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
54 build = import ./build.nix { inherit pkgs ifdLevel; };
62 build = import ./build.nix { inherit pkgs ifdLevel; };
55− in pkgs.recurseIntoAttrs {
63+ in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
64+ ghc = pkgs.recurseIntoAttrs compilers;
56 # TODO: look into making tools work when cross compiling
65 # TODO: look into making tools work when cross compiling
57 # inherit (build) tools;
66 # inherit (build) tools;
67+ } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
68+ remote-iserv = pkgs.recurseIntoAttrs (
69+ pkgs.lib.mapAttrs (ghcName: _:
70+ pkgs.ghc-extra-packages."${ghcName}".remote-iserv.components.exes.remote-iserv
71+ ) compilers);
72+ iserv-proxy = pkgs.recurseIntoAttrs (
73+ pkgs.lib.mapAttrs (ghcName: _:
74+ pkgs.ghc-extra-packages."${ghcName}".iserv-proxy.components.exes.iserv-proxy
75+ ) compilers);
76+ } // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
58 hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
77 hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
59− iserv-proxy = pkgs.ghc-extra-packages.ghc865.iserv-proxy.components.exes.iserv-proxy;
60− remote-iserv = pkgs.ghc-extra-packages.ghc865.remote-iserv.components.exes.remote-iserv;
61 }
78 }
62 //
79 //
63 # Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
80 # Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
64− pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") { inherit (build) tests; }
81+ pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") {
82+ inherit (build) tests;
83+ })
65 )
84 )
66 )
85 )
67)
86)
overlays/haskell.nix−1
@@ -501,7 +501,6 @@ self: super: {
501 happy = self.buildPackages.haskell-nix.bootstrap.packages.happy;
501 happy = self.buildPackages.haskell-nix.bootstrap.packages.happy;
502 hscolour = self.buildPackages.haskell-nix.bootstrap.packages.hscolour;
502 hscolour = self.buildPackages.haskell-nix.bootstrap.packages.hscolour;
503 ghc865 = self.buildPackages.haskell-nix.compiler.ghc865;
503 ghc865 = self.buildPackages.haskell-nix.compiler.ghc865;
504− ghc882 = self.buildPackages.haskell-nix.compiler.ghc882;
505 ghc883 = self.buildPackages.haskell-nix.compiler.ghc883;
504 ghc883 = self.buildPackages.haskell-nix.compiler.ghc883;
506 ghc-boot-packages-nix = self.recurseIntoAttrs
505 ghc-boot-packages-nix = self.recurseIntoAttrs
507 (builtins.mapAttrs (_: self.recurseIntoAttrs)
506 (builtins.mapAttrs (_: self.recurseIntoAttrs)