From 5ae84c13355717013d31371000b1f4983a82e60f Mon Sep 17 00:00:00 2001 From: Emmanuel Rosa Date: Sun, 23 Apr 2023 18:43:15 -0400 Subject: [PATCH] sparrow: fix .desktop file --- pkgs/applications/blockchains/sparrow/default.nix | 15 ++++++++------- pkgs/applications/blockchains/sparrow/fhsenv.nix | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/blockchains/sparrow/default.nix b/pkgs/applications/blockchains/sparrow/default.nix index b4c2ec720eb9..a16c7e0b9af7 100644 --- a/pkgs/applications/blockchains/sparrow/default.nix +++ b/pkgs/applications/blockchains/sparrow/default.nix @@ -167,9 +167,9 @@ stdenv.mkDerivation rec { desktopItems = [ (makeDesktopItem { - name = "Sparrow"; - exec = pname; - icon = pname; + name = "sparrow-desktop"; + exec = "sparrow-desktop"; + icon = "sparrow-desktop"; desktopName = "Sparrow Bitcoin Wallet"; genericName = "Bitcoin Wallet"; categories = [ "Finance" "Network" ]; @@ -187,7 +187,7 @@ stdenv.mkDerivation rec { for n in 16 24 32 48 64 96 128 256; do size=$n"x"$n mkdir -p $out/hicolor/$size/apps - convert lib/Sparrow.png -resize $size $out/hicolor/$size/apps/sparrow.png + convert lib/Sparrow.png -resize $size $out/hicolor/$size/apps/sparrow-desktop.png done; ''; }; @@ -197,9 +197,9 @@ stdenv.mkDerivation rec { mkdir -p $out/bin $out ln -s ${sparrow-modules}/modules $out/lib - install -D -m 777 ${launcher} $out/bin/sparrow - substituteAllInPlace $out/bin/sparrow - substituteInPlace $out/bin/sparrow --subst-var-by jdkModules ${jdk-modules} + install -D -m 777 ${launcher} $out/bin/sparrow-desktop + substituteAllInPlace $out/bin/sparrow-desktop + substituteInPlace $out/bin/sparrow-desktop --subst-var-by jdkModules ${jdk-modules} mkdir -p $out/share/icons ln -s ${sparrow-icons}/hicolor $out/share/icons @@ -222,5 +222,6 @@ stdenv.mkDerivation rec { license = licenses.asl20; maintainers = with maintainers; [ emmanuelrosa _1000101 ]; platforms = [ "x86_64-linux" ]; + mainProgram = "sparrow-desktop"; }; } diff --git a/pkgs/applications/blockchains/sparrow/fhsenv.nix b/pkgs/applications/blockchains/sparrow/fhsenv.nix index ae14e6e4a591..26bf9da0b85d 100644 --- a/pkgs/applications/blockchains/sparrow/fhsenv.nix +++ b/pkgs/applications/blockchains/sparrow/fhsenv.nix @@ -4,9 +4,9 @@ }: buildFHSEnv { - name = "sparrow"; + name = "sparrow-desktop"; - runScript = "${sparrow-unwrapped}/bin/sparrow"; + runScript = "${sparrow-unwrapped}/bin/sparrow-desktop"; targetPkgs = pkgs: with pkgs; [ sparrow-unwrapped