about summary refs log tree commit diff
path: root/pkgs/applications/blockchains/bisq-desktop
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-08-09 11:29:36 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-08-10 10:19:30 +0200
commite566af7f40d37fe1f34d695916fd8df7b3ec8283 (patch)
treee150cb04500d00f7f3ab9163e53cf3f06b6ab305 /pkgs/applications/blockchains/bisq-desktop
parentb2bdf29ced21b0f2c339cf2c073614bb8699bb40 (diff)
bisq-desktop: format, cleanup, use hooks instead of manually calling copyDesktopItems
Diffstat (limited to 'pkgs/applications/blockchains/bisq-desktop')
-rw-r--r--pkgs/applications/blockchains/bisq-desktop/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix
index ffc19765d4f6d..715de18a8fa38 100644
--- a/pkgs/applications/blockchains/bisq-desktop/default.nix
+++ b/pkgs/applications/blockchains/bisq-desktop/default.nix
@@ -13,6 +13,7 @@
 , tor
 , psmisc
 }:
+
 let
   bisq-launcher = writeScript "bisq-launcher" ''
     #! ${bash}/bin/bash
@@ -46,15 +47,16 @@ let
   '';
 in
 stdenv.mkDerivation rec {
-  version = "1.7.0";
   pname = "bisq-desktop";
-  nativeBuildInputs = [ makeWrapper copyDesktopItems dpkg ];
+  version = "1.7.0";
 
   src = fetchurl {
     url = "https://github.com/bisq-network/bisq/releases/download/v${version}/Bisq-64bit-${version}.deb";
     sha256 = "0crry5k7crmrqn14wxiyrnhk09ac8a9ksqrwwky7jsnyah0bx5k4";
   };
 
+  nativeBuildInputs = [ makeWrapper copyDesktopItems dpkg ];
+
   desktopItems = [
     (makeDesktopItem {
       name = "Bisq";
@@ -71,6 +73,8 @@ stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/lib $out/bin
     cp opt/bisq/lib/app/desktop-${version}-all.jar $out/lib
 
@@ -80,13 +84,13 @@ stdenv.mkDerivation rec {
     makeWrapper ${bisq-launcher} $out/bin/bisq-desktop \
       --prefix PATH : $out/bin
 
-    copyDesktopItems
-
     for n in 16 24 32 48 64 96 128 256; do
       size=$n"x"$n
       ${imagemagick}/bin/convert opt/bisq/lib/Bisq.png -resize $size bisq.png
       install -Dm644 -t $out/share/icons/hicolor/$size/apps bisq.png
     done;
+
+    runHook postInstall
   '';
 
   meta = with lib; {