diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-29 05:32:22 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-29 05:32:22 +0100 |
commit | f80431b14717030da8ac76110ff7419d1161dafe (patch) | |
tree | 66369f7c9e91f19d037ec1a6793875604021bc68 /pkgs/by-name/no | |
parent | 08581608531b9dee7af520b58db09ef02d2a1b19 (diff) |
nosql-workbench: unpack with 7zz
Diffstat (limited to 'pkgs/by-name/no')
-rw-r--r-- | pkgs/by-name/no/nosql-workbench/package.nix | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/pkgs/by-name/no/nosql-workbench/package.nix b/pkgs/by-name/no/nosql-workbench/package.nix index 5bba91c285846..9fb744fa6570f 100644 --- a/pkgs/by-name/no/nosql-workbench/package.nix +++ b/pkgs/by-name/no/nosql-workbench/package.nix @@ -4,7 +4,7 @@ fetchurl, jdk21, stdenv, - undmg + _7zz }: let pname = "nosql-workbench"; @@ -39,30 +39,19 @@ if stdenv.isDarwin then stdenv.mkDerivation { sourceRoot = "."; + nativeBuildInputs = [ _7zz ]; + buildInputs = [ jdk21 ]; # DMG file is using APFS which is unsupported by "undmg". - # Fix found: https://discourse.nixos.org/t/help-with-error-only-hfs-file-systems-are-supported-on-ventura/25873/8 + # Instead, use "7zz" to extract the contents. # "undmg" issue: https://github.com/matthewbauer/undmg/issues/4 unpackCmd = '' - echo "Creating temp directory" - mnt=$(TMPDIR=/tmp mktemp -d -t nix-XXXXXXXXXX) - - function finish { - echo "Ejecting temp directory" - /usr/bin/hdiutil detach $mnt -force - rm -rf $mnt - } - # Detach volume when receiving SIG "0" - trap finish EXIT - - # Mount DMG file - echo "Mounting DMG file into \"$mnt\"" - /usr/bin/hdiutil attach -nobrowse -mountpoint $mnt $curSrc - - # Copy content to local dir for later use - echo 'Copying extracted content into "sourceRoot"' - cp -a $mnt/NoSQL\ Workbench.app $PWD/ + runHook preUnpack + + 7zz x $curSrc + + runHook postUnpack ''; installPhase = '' |