3
0
Fork 0
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:
Raito Bezarius 2023-06-18 14:12:25 +02:00 committed by Maximilian Bosch
parent 71e69dcb60
commit ccbd98db50
No known key found for this signature in database
GPG key ID: 9A6EEA275CA5BE0A

View file

@ -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" {