commit a6ba86f00eaf987781cea523959adcae5334dadc
parent 41fe58cd791bfc7ba0c776567bb77837ef86a07e
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sun, 2 Aug 2020 16:32:33 +0300
keeweb: use undmg
Diffstat:
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/pkgs/applications/keeweb/bin.nix b/pkgs/applications/keeweb/bin.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchfromgh, appimageTools }:
+{ stdenv, fetchfromgh, appimageTools, undmg }:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
@@ -39,6 +39,8 @@ let
linux = appimageTools.wrapType2 rec {
inherit name src meta;
+ preferLocalBuild = true;
+
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -Dm644 ${appimageContents}/keeweb.desktop -t $out/share/applications
@@ -52,13 +54,15 @@ let
darwin = stdenv.mkDerivation {
inherit name src meta;
- dontUnpack = true;
+ preferLocalBuild = true;
+
+ nativeBuildInputs = [ undmg ];
+
+ sourceRoot = "KeeWeb.app";
installPhase = ''
- /usr/bin/hdiutil mount -nobrowse -mountpoint keeweb-mnt $src
- mkdir -p $out/Applications
- cp -r ./keeweb-mnt/KeeWeb.app $out/Applications
- /usr/bin/hdiutil unmount keeweb-mnt
+ mkdir -p $out/Applications/KeeWeb.app
+ cp -R . $out/Applications/KeeWeb.app
'';
};
in