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
{ stdenv, lib, idrisPackages, gmp }:
{ stdenv, lib, gmp, prelude, base, with-packages, idris }:
{ idrisDeps ? []
, noPrelude ? false
, noBase ? false
@ -11,15 +11,15 @@
}@attrs:
let
allIdrisDeps = idrisDeps
++ lib.optional (!noPrelude) idrisPackages.prelude
++ lib.optional (!noBase) idrisPackages.base;
idris-with-packages = idrisPackages.with-packages allIdrisDeps;
++ lib.optional (!noPrelude) prelude
++ lib.optional (!noBase) base;
idris-with-packages = with-packages allIdrisDeps;
newAttrs = builtins.removeAttrs attrs [
"idrisDeps" "noPrelude" "noBase"
"name" "version" "ipkgName" "extraBuildInputs"
] // {
meta = attrs.meta // {
platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms;
platforms = attrs.meta.platforms or idris.meta.platforms;
};
};
in