diff options
author | Raito Bezarius <masterancpp@gmail.com> | 2023-06-18 14:12:25 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-08-20 11:49:14 +0200 |
commit | ccbd98db50f27ff15014284f876beee2217bceae (patch) | |
tree | 38791d0b8d95ba13161d194d8afa270bd321e1cc /pkgs/build-support | |
parent | 71e69dcb60fe8a7f32356082001c8e29b097b2d8 (diff) |
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.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/trivial-builders/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 7c4d204df4074..0b6bc4b612965 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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" { |