mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
Merge pull request #292240 from wegank/nosql-workbench-7zz
nosql-workbench: unpack with 7zz
This commit is contained in:
commit
6031a5dc5a
@ -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)
|
||||
runHook preUnpack
|
||||
|
||||
function finish {
|
||||
echo "Ejecting temp directory"
|
||||
/usr/bin/hdiutil detach $mnt -force
|
||||
rm -rf $mnt
|
||||
}
|
||||
# Detach volume when receiving SIG "0"
|
||||
trap finish EXIT
|
||||
7zz x $curSrc
|
||||
|
||||
# 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 postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user