on iko/ghcjs-patch-master help sign in
Add support for pathes
4437439Moritz Angermann
builder/comp-builder.nix+3−2
@@ -8,6 +8,7 @@
8, src
8, src
9, flags
9, flags
10, cabalFile
10, cabalFile
11+, patches ? []
11}:
12}:
12
13
13let
14let
@@ -79,7 +80,7 @@ let
79 ) ++ component.configureFlags
80 ) ++ component.configureFlags
80 );
81 );
81
82
82−in stdenv.mkDerivation {
83+in stdenv.mkDerivation ({
83 name = fullName;
84 name = fullName;
84
85
85 inherit src;
86 inherit src;
@@ -142,4 +143,4 @@ in stdenv.mkDerivation {
142 ${ghc.targetPrefix}ghc-pkg --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
143 ${ghc.targetPrefix}ghc-pkg --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
143 ''}
144 ''}
144 '';
145 '';
145−}
146+} // lib.optionalAttrs (patches != []) { inherit patches; })
builder/default.nix+2−1
@@ -9,6 +9,7 @@
9, src
9, src
10, revision
10, revision
11, revisionSha256
11, revisionSha256
12+, patches
12
13
13, ...
14, ...
14}@config:
15}@config:
@@ -57,7 +58,7 @@ let
57 comp-builder = haskellLib.weakCallPackage pkgs ./comp-builder.nix { inherit ghc haskellLib nonReinstallablePkgs; };
58 comp-builder = haskellLib.weakCallPackage pkgs ./comp-builder.nix { inherit ghc haskellLib nonReinstallablePkgs; };
58
59
59 buildComp = componentId: component: comp-builder {
60 buildComp = componentId: component: comp-builder {
60− inherit componentId component package name src flags setup cabalFile;
61+ inherit componentId component package name src flags setup cabalFile patches;
61 };
62 };
62
63
63in {
64in {
modules/package.nix+4
@@ -177,5 +177,9 @@ in {
177 type = nullOr str;
177 type = nullOr str;
178 default = null;
178 default = null;
179 };
179 };
180+ patches = mkOption {
181+ type = listOf path;
182+ default = [];
183+ };
180 };
184 };
181}
185}