From a879c725525b2321f505519ff0c71f182518f438 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 9 May 2019 15:24:21 -0500 Subject: [PATCH] electrum: fixup Exec lines in .desktop Not sure why upstream added $HOME/.local/bin to $PATH for these, but IMO that is for users to handle as they see fit. And it's not very nix-like :). --- pkgs/applications/misc/electrum/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 64692e66f56d..819622086689 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -62,7 +62,10 @@ python3Packages.buildPythonApplication rec { rm -rf $out/${python3.sitePackages}/nix substituteInPlace $out/share/applications/electrum.desktop \ - --replace "Exec=electrum %u" "Exec=$out/bin/electrum %u" + --replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum %u"' \ + "Exec=$out/bin/electrum %u" \ + --replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum --testnet %u"' \ + "Exec=$out/bin/electrum --testnet %u" ''; checkInputs = with python3Packages; [ pytest ];