on iko/ghcjs-patch-master help sign in
add LGPL-2.1; and allow hsPkgs extra overrides
commit87cfc7579067e6262d48c861955395cdf8fff2bb authorMoritz Angermann <moritz.angermann@gmail.com> dateTue 31 Jul 2018, 11:43 (8 years ago) parent61bf383
2 files changed+8−5
compat/cabal-licenses.nix+1 compat/driver.nix+7−5
compat/cabal-licenses.nix+1
@@ -3,6 +3,7 @@ stdenv: with stdenv.lib.licenses;
33 BSD-2-Clause = bsd2;
44 MIT = mit;
55 ISC = isc;
6+ "LGPL-2.1-only" = lgpl21;
67 "LGPL-3.0-only" = lgpl3;
78 "GPL-3.0-only" = gpl3;
89 "Apache-2.0" = asl20;
compat/driver.nix+7−5
@@ -14,12 +14,14 @@ with rec {
1414 # cabal os, arch and compilers.
1515 cabal = import ./cabal-os-arch-comp.nix;
1616
17− expr0 = flags: let e = cabalexpr {
17+ expr0 = flags: extraHsPkgs: let e = cabalexpr {
1818 inherit flags;
1919 # null out self references. Tests, Benchmarks, ...
2020 # naturally depend on the package (as a library), but
2121 # we don't want those dependencies.
22− hsPkgs = pkgs.haskellPackages // { ${e.package.identifier.name} = null; };
22+ hsPkgs = pkgs.haskellPackages
23+ // { ${e.package.identifier.name} = null; }
24+ // extraHsPkgs;
2325 # We also need to do some system pkgs -> haskell pkgs
2426 # resolution.
2527 pkgs = pkgs
@@ -72,8 +74,8 @@ with rec {
7274# These are the keys that <pkg>.override can override.
7375# the ... is used to allow to override all potential
7476# other keys, that the builder understands.
75−{ mkDerivation, stdenv, flags ? {}, ... }@args:
76−let expr = expr0 flags;
77+{ mkDerivation, stdenv, flags ? {}, hsPkgs ? {}, ... }@args:
78+let expr = expr0 flags hsPkgs;
7779 pname = expr.package.identifier.name;
7880 pversion = expr.package.identifier.version;
7981 builderArgs = {
@@ -105,7 +107,7 @@ let expr = expr0 flags;
105107 inherit (expr) src;
106108 } // pkgs.lib.optionalAttrs (builtins.hasAttr "postUnpack" expr) {
107109 inherit (expr) postUnpack;
108− } // builtins.removeAttrs args [ "mkDerivation" "stdenv" "flags" ];
110+ } // builtins.removeAttrs args [ "mkDerivation" "stdenv" "flags" "hsPkgs" ];
109111in mkDerivation (builderArgs // pkgs.lib.optionalAttrs (expr.cabal-generator or "" == "hpack")
110112 { preConfigure = "hpack;" + (builderArgs.preConfigure or "");
111113 libraryToolDepends = builderArgs.libraryToolDepends ++ [ pkgs.haskellPackages.hpack ]; })