3
0
Fork 0
forked from mirrors/nixpkgs

alacritty: respect pre- and post-hooks of overridden phases

Failing to `runHook` when overriding phases can have unpredictable results.

fixes #29572
This commit is contained in:
Thomas Tuegel 2017-09-19 12:16:04 -05:00 committed by Jörg Thalheim
parent a50d0b719f
commit 6e01011211

View file

@ -46,12 +46,14 @@ buildRustPackage rec {
pkgconfig pkgconfig
] ++ rpathLibs; ] ++ rpathLibs;
patchPhase = '' postPatch = ''
substituteInPlace copypasta/src/x11.rs \ substituteInPlace copypasta/src/x11.rs \
--replace Command::new\(\"xclip\"\) Command::new\(\"${xclip}/bin/xclip\"\) --replace Command::new\(\"xclip\"\) Command::new\(\"${xclip}/bin/xclip\"\)
''; '';
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/bin mkdir -p $out/bin
for f in $(find target/release -maxdepth 1 -type f); do for f in $(find target/release -maxdepth 1 -type f); do
cp $f $out/bin cp $f $out/bin
@ -60,6 +62,8 @@ buildRustPackage rec {
mkdir -p $out/share/applications mkdir -p $out/share/applications
cp Alacritty.desktop $out/share/applications/alacritty.desktop cp Alacritty.desktop $out/share/applications/alacritty.desktop
runHook postInstall
''; '';
dontPatchELF = true; dontPatchELF = true;