agda: postprocess
and defaults
need not be in the scope of args
This commit is contained in:
parent
c1f5748983
commit
21b10ab44f
@ -14,15 +14,6 @@ let
|
|||||||
concatMapStrings = stdenv.lib.strings.concatMapStrings;
|
concatMapStrings = stdenv.lib.strings.concatMapStrings;
|
||||||
unwords = stdenv.lib.strings.concatStringsSep " ";
|
unwords = stdenv.lib.strings.concatStringsSep " ";
|
||||||
mapInside = xs: unwords (map (x: x + "/*") xs);
|
mapInside = xs: unwords (map (x: x + "/*") xs);
|
||||||
in
|
|
||||||
{ mkDerivation = args:
|
|
||||||
let
|
|
||||||
postprocess = x: x // {
|
|
||||||
sourceDirectories = filter (y: !(y == null)) x.sourceDirectories;
|
|
||||||
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
|
|
||||||
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
|
|
||||||
everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
defaults = self : {
|
defaults = self : {
|
||||||
# There is no Hackage for Agda so we require src.
|
# There is no Hackage for Agda so we require src.
|
||||||
@ -93,8 +84,16 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in stdenv.mkDerivation
|
|
||||||
(postprocess (let super = defaults self // args self;
|
postprocess = x: x // {
|
||||||
|
sourceDirectories = filter (y: !(y == null)) x.sourceDirectories;
|
||||||
|
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
|
||||||
|
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
|
||||||
|
everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{ mkDerivation = args: let
|
||||||
|
super = defaults self // args self;
|
||||||
self = super // extension self super;
|
self = super // extension self super;
|
||||||
in self));
|
in stdenv.mkDerivation (postprocess self);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user