mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 14:04:52 +00:00
alacritty: fix cross
This commit fixes cross compilation of alacritty by: 1. If xdg-utils.meta.broken (see https://github.com/NixOS/nixpkgs/pull/225112#issuecomment-1500354929), late-bind it via runtime $PATH rather than compile-time reference. 2. Use `$STRIP` instead of `strip`
This commit is contained in:
parent
e3bbbfaf86
commit
af32997ae4
@ -84,7 +84,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
outputs = [ "out" "terminfo" ];
|
||||
|
||||
postPatch = ''
|
||||
postPatch = lib.optionalString (!xdg-utils.meta.broken) ''
|
||||
substituteInPlace alacritty/src/config/ui_config.rs \
|
||||
--replace xdg-open ${xdg-utils}/bin/xdg-open
|
||||
'';
|
||||
@ -104,7 +104,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# patchelf generates an ELF that binutils' "strip" doesn't like:
|
||||
# strip: not enough room for program headers, try linking with -N
|
||||
# As a workaround, strip manually before running patchelf.
|
||||
strip -S $out/bin/alacritty
|
||||
$STRIP -S $out/bin/alacritty
|
||||
|
||||
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user