mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
34 lines
676 B
Nix
34 lines
676 B
Nix
{ stdenv
|
|
, fetchurl
|
|
, pname
|
|
, version
|
|
, meta
|
|
, unzip
|
|
, makeWrapper
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
inherit pname version meta;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Foundry376/Mailspring/releases/download/${finalAttrs.version}/Mailspring-AppleSilicon.zip";
|
|
hash = "sha256-LYv3643oj58WR+4IE4XmJmCgD9S2AXNbPwW5W0QCuGI=";
|
|
};
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [
|
|
unzip
|
|
makeWrapper
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/Applications $out/bin
|
|
unzip $src -d $out/Applications
|
|
makeWrapper $out/Applications/Mailspring.app/Contents/MacOS/Mailspring $out/bin/mailspring
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|