Skip to content

Commit

Permalink
alacritty: respect pre- and post-hooks of overridden phases
Browse files Browse the repository at this point in the history
Failing to `runHook` when overriding phases can have unpredictable results.

fixes #29572
  • Loading branch information
ttuegel authored and Mic92 committed Sep 19, 2017
1 parent a50d0b7 commit 6e01011
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/applications/misc/alacritty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ buildRustPackage rec {
pkgconfig
] ++ rpathLibs;

patchPhase = ''
postPatch = ''
substituteInPlace copypasta/src/x11.rs \
--replace Command::new\(\"xclip\"\) Command::new\(\"${xclip}/bin/xclip\"\)
'';

installPhase = ''
runHook preInstall
mkdir -p $out/bin
for f in $(find target/release -maxdepth 1 -type f); do
cp $f $out/bin
Expand All @@ -60,6 +62,8 @@ buildRustPackage rec {
mkdir -p $out/share/applications
cp Alacritty.desktop $out/share/applications/alacritty.desktop
runHook postInstall
'';

dontPatchELF = true;
Expand Down

0 comments on commit 6e01011

Please sign in to comment.