refactor(nix/darwin): Try both undmg and 7zz to extract dmg files
This commit is contained in:
parent
bb5bb2ad82
commit
be06d69dd6
3 changed files with 11 additions and 9 deletions
|
@ -1,5 +1,12 @@
|
||||||
# REF: https://github.com/bandithedoge/nixpkgs-firefox-darwin/blob/ceaca2359e5371ccef3f92a36baf7c438b354afb/overlay.nix
|
# REF: https://github.com/bandithedoge/nixpkgs-firefox-darwin/blob/ceaca2359e5371ccef3f92a36baf7c438b354afb/overlay.nix
|
||||||
{ stdenv, undmg, pname, version, sourceRoot ? ".", appFileName, src, meta, nativeBuildInputs ? [ undmg ] }:
|
{ stdenv, undmg, _7zz, pname, version, sourceRoot ? ".", appFileName, src, meta
|
||||||
|
, nativeBuildInputs ? [ undmg _7zz ]
|
||||||
|
, unpackPhase ? "undmg $src || 7zz x -snld $src"
|
||||||
|
, installPhase ? ''
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
cp -R ${appFileName} "$out/Applications/"
|
||||||
|
''
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
@ -9,10 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
inherit sourceRoot;
|
inherit sourceRoot;
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
installPhase = ''
|
inherit unpackPhase installPhase;
|
||||||
mkdir -p $out/Applications
|
|
||||||
cp -R ${appFileName} "$out/Applications/"
|
|
||||||
'';
|
|
||||||
|
|
||||||
inherit meta;
|
inherit meta;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
version = "1.5.0";
|
version = "1.5.0";
|
||||||
in {
|
in {
|
||||||
heliport = mkApp {
|
heliport = mkApp {
|
||||||
inherit (final) stdenv undmg;
|
inherit (final) stdenv undmg _7zz;
|
||||||
|
|
||||||
pname = "HeliPort";
|
pname = "HeliPort";
|
||||||
appFileName = "HeliPort.app";
|
appFileName = "HeliPort.app";
|
||||||
|
|
|
@ -6,14 +6,12 @@ let
|
||||||
version = "1.5.3";
|
version = "1.5.3";
|
||||||
in {
|
in {
|
||||||
vesktop = mkApp {
|
vesktop = mkApp {
|
||||||
inherit (final) stdenv undmg;
|
inherit (final) stdenv undmg _7zz;
|
||||||
|
|
||||||
pname = "Vesktop";
|
pname = "Vesktop";
|
||||||
appFileName = "Vesktop*.app";
|
appFileName = "Vesktop*.app";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
nativeBuildInputs = [ final._7zz ];
|
|
||||||
|
|
||||||
src = final.fetchurl {
|
src = final.fetchurl {
|
||||||
url = "https://github.com/Vencord/Vesktop/releases/download/v${version}/Vesktop-${version}-universal.dmg";
|
url = "https://github.com/Vencord/Vesktop/releases/download/v${version}/Vesktop-${version}-universal.dmg";
|
||||||
hash = "sha256-ceOUNHSOaEqCbzkM64RtUu0Yhrq4tThcXZTDd+OsEXI";
|
hash = "sha256-ceOUNHSOaEqCbzkM64RtUu0Yhrq4tThcXZTDd+OsEXI";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue