fx_cast: use pname a bit more

(cherry picked from commit a01a80a52c952bfa70a474cb062e508d3947ca6b)
This commit is contained in:
Will Dietz 2019-09-07 13:12:20 -05:00
parent a21665252d
commit b232587833
1 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "0.0.4"; version = "0.0.4";
src = fetchurl { src = fetchurl {
url = "https://github.com/hensm/fx_cast/releases/download/v${version}/fx_cast_bridge-${version}-x64.deb"; url = "https://github.com/hensm/fx_cast/releases/download/v${version}/${pname}-${version}-x64.deb";
sha256 = "1p6d8idbaaqr80vxrmmyfcr5nwb0sk5vwrmizflg39p5zasmmhy2"; sha256 = "1p6d8idbaaqr80vxrmmyfcr5nwb0sk5vwrmizflg39p5zasmmhy2";
}; };
@ -21,18 +21,18 @@ stdenv.mkDerivation rec {
dontPatchELF = true; dontPatchELF = true;
installPhase = '' installPhase = ''
install -DT {opt/fx_cast,$out/bin}/fx_cast_bridge install -DT {opt/fx_cast,$out/bin}/${pname}
install -DT {usr,$out}/lib/mozilla/native-messaging-hosts/fx_cast_bridge.json install -DT {usr,$out}/lib/mozilla/native-messaging-hosts/${pname}.json
substituteInPlace $out/lib/mozilla/native-messaging-hosts/fx_cast_bridge.json \ substituteInPlace $out/lib/mozilla/native-messaging-hosts/${pname}.json \
--replace {/opt/fx_cast,$out/bin}/fx_cast_bridge --replace {/opt/fx_cast,$out/bin}/${pname}
''; '';
# See now-cli/default.nix # See now-cli/default.nix
dontStrip = true; dontStrip = true;
preFixup = let preFixup = let
libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc stdenv.cc.libc]; libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc stdenv.cc.libc];
bin = "$out/bin/fx_cast_bridge"; bin = "$out/bin/${pname}";
in '' in ''
orig_size=$(stat --printf=%s ${bin}) orig_size=$(stat --printf=%s ${bin})