nixpkgs/pkgs/by-name/ma/mailspring/darwin.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
676 B
Nix
Raw Permalink Normal View History

{ stdenv
2024-03-03 20:24:36 -07:00
, 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
'';
})