mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
losslesscut-bin: *-dmg: refactor
Run pre- and post- hooks.
Utilize $sourceRoot.
(cherry picked from commit c47da5739f
)
This commit is contained in:
parent
2b421d64d2
commit
1f6114c54a
@ -24,10 +24,13 @@ stdenvNoCC.mkDerivation {
|
||||
sourceRoot = "LosslessCut.app";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/Applications/LosslessCut.app"
|
||||
cp -R . "$out/Applications/LosslessCut.app"
|
||||
runHook preInstall
|
||||
mkdir -p "$out/Applications"
|
||||
cd ..
|
||||
mv "$sourceRoot" "$out/Applications"
|
||||
mkdir -p "$out/bin"
|
||||
ln -s "$out/Applications/LosslessCut.app/Contents/MacOS/LosslessCut" "$out/bin/losslesscut"
|
||||
ln -s "$out/Applications/$(basename "$sourceRoot")/Contents/MacOS/LosslessCut" "$out/bin/losslesscut"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = metaCommon // (with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user