mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-16 09:28:35 +03:00
compress-drv: carry pname, version forward
This is required to overwrite to use a compressed version of nextcloud in services.nextcloud.package because the module accesses version
This commit is contained in:
parent
4cc5dee048
commit
0654f81d56
@ -76,13 +76,18 @@ let
|
||||
'';
|
||||
formatsPipe = lib.concatStringsSep "|" formats;
|
||||
in
|
||||
runCommand "${drv.name}-compressed" { } ''
|
||||
mkdir $out
|
||||
runCommand "${drv.name}-compressed"
|
||||
(
|
||||
(lib.optionalAttrs (drv ? pname) { inherit (drv) pname; })
|
||||
// (lib.optionalAttrs (drv ? version) { inherit (drv) version; })
|
||||
)
|
||||
''
|
||||
mkdir $out
|
||||
|
||||
# cannot use lndir here, because it also symlinks directories,
|
||||
# which we do not need; we only need to symlink files.
|
||||
(cd ${drv}; find -L -type d -exec mkdir -p $out/{} ';')
|
||||
(cd ${drv}; find -L -type f -exec ln -s ${drv}/{} $out/{} ';')
|
||||
# cannot use lndir here, because it also symlinks directories,
|
||||
# which we do not need; we only need to symlink files.
|
||||
(cd ${drv}; find -L -type d -exec mkdir -p $out/{} ';')
|
||||
(cd ${drv}; find -L -type f -exec ln -s ${drv}/{} $out/{} ';')
|
||||
|
||||
${lib.concatStringsSep "\n\n" (lib.mapAttrsToList mkCmd compressors)}
|
||||
''
|
||||
${lib.concatStringsSep "\n\n" (lib.mapAttrsToList mkCmd compressors)}
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user