idrisPackages: Fix overrides not applying

Previously when overriding idrisPackages, it wouldn't work properly because it
took idrisPackages from the pkgs set
This commit is contained in:
Silvan Mosberger 2019-08-02 16:42:21 +02:00
parent c6e7bc2977
commit 1e2d93cfcd
No known key found for this signature in database
GPG key ID: 9424360B4B85C9E7

View file

@ -1,5 +1,5 @@
# Build an idris package # Build an idris package
{ stdenv, lib, idrisPackages, gmp }: { stdenv, lib, gmp, prelude, base, with-packages, idris }:
{ idrisDeps ? [] { idrisDeps ? []
, noPrelude ? false , noPrelude ? false
, noBase ? false , noBase ? false
@ -11,15 +11,15 @@
}@attrs: }@attrs:
let let
allIdrisDeps = idrisDeps allIdrisDeps = idrisDeps
++ lib.optional (!noPrelude) idrisPackages.prelude ++ lib.optional (!noPrelude) prelude
++ lib.optional (!noBase) idrisPackages.base; ++ lib.optional (!noBase) base;
idris-with-packages = idrisPackages.with-packages allIdrisDeps; idris-with-packages = with-packages allIdrisDeps;
newAttrs = builtins.removeAttrs attrs [ newAttrs = builtins.removeAttrs attrs [
"idrisDeps" "noPrelude" "noBase" "idrisDeps" "noPrelude" "noBase"
"name" "version" "ipkgName" "extraBuildInputs" "name" "version" "ipkgName" "extraBuildInputs"
] // { ] // {
meta = attrs.meta // { meta = attrs.meta // {
platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms; platforms = attrs.meta.platforms or idris.meta.platforms;
}; };
}; };
in in