diff options
author | Naïm Favier <n@monade.li> | 2022-05-11 22:00:24 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-05-12 01:44:02 +0200 |
commit | 88369997e1db7e1819b7b940fc2740f188d6608d (patch) | |
tree | d05c589c2f01f53ec3f6f76e5d99e97505c56107 /pkgs/applications/networking/browsers/firefox/wrapper.nix | |
parent | 2ae69114a11c6a80a58abc6984fde8851ee8fe40 (diff) | |
download | nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar.gz nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar.bz2 nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar.lz nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar.xz nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.tar.zst nixpkgs-88369997e1db7e1819b7b940fc2740f188d6608d.zip |
makeBinaryWrapper: add extractCmd
A small shell script that can be used to extract a binary wrapper's makeCWrapper call from its embedded docstring, without depending on makeBinaryWrapper.
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/wrapper.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/wrapper.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 3da36e520c3..43830158326 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, makeDesktopItem, makeWrapper, lndir, config +{ stdenv, lib, makeDesktopItem, makeWrapper, makeBinaryWrapper, lndir, config , fetchurl, zip, unzip, jq, xdg-utils, writeText ## various stuff that can be plugged in @@ -229,7 +229,7 @@ let # Symbolic link: wrap the link's target. oldExe="$(readlink -v --canonicalize-existing "$executablePath")" rm "$executablePath" - elif wrapperCmd=$(strings -dw "$executablePath" | sed -n '/^makeCWrapper/,/^$/ p'); [[ $wrapperCmd ]]; then + elif wrapperCmd=$(${makeBinaryWrapper.extractCmd} "$executablePath"); [[ $wrapperCmd ]]; then # If the executable is a binary wrapper, we need to update its target to # point to $out, but we can't just edit the binary in-place because of length # issues. So we extract the command used to create the wrapper and add the |