nixpkgs/pkgs/applications/networking/mailreaders/mailspring/darwin.nix
2024-07-26 11:18:09 +02:00

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
'';
})