mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
agda: postprocess
and defaults
need not be in the scope of args
This commit is contained in:
parent
c1f5748983
commit
21b10ab44f
1 changed files with 81 additions and 82 deletions
|
@ -14,15 +14,6 @@ let
|
|||
concatMapStrings = stdenv.lib.strings.concatMapStrings;
|
||||
unwords = stdenv.lib.strings.concatStringsSep " ";
|
||||
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 : {
|
||||
# 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;
|
||||
in self));
|
||||
in stdenv.mkDerivation (postprocess self);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue