forked from mirrors/nixpkgs
trivial-builders/applyPatches: carry meta
information to the patched source
There is no reason to not carry licenses and other information to any patched source. This should improve our metadata in those situations.
This commit is contained in:
parent
71e69dcb60
commit
ccbd98db50
|
@ -905,13 +905,17 @@ rec {
|
|||
) + "-patched"
|
||||
, patches ? []
|
||||
, postPatch ? ""
|
||||
}: stdenvNoCC.mkDerivation {
|
||||
, ...
|
||||
}@args: stdenvNoCC.mkDerivation {
|
||||
inherit name src patches postPatch;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
phases = "unpackPhase patchPhase installPhase";
|
||||
installPhase = "cp -R ./ $out";
|
||||
};
|
||||
}
|
||||
# Carry `meta` information from the underlying `src` if present.
|
||||
// (optionalAttrs (builtins.hasAttr "meta" src) src.meta)
|
||||
// (removeAttrs args [ "src" "name" "patches" "postPatch" ]);
|
||||
|
||||
/* An immutable file in the store with a length of 0 bytes. */
|
||||
emptyFile = runCommand "empty-file" {
|
||||
|
|
Loading…
Reference in a new issue