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.

35 lines
685 B
Nix
Raw Normal View History

{
stdenv,
2024-03-04 03:24:36 +00: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";
2024-12-04 21:08:13 +00:00
hash = "sha256-5f0jtQPwwnkFNCtw0Kf2AaLbIHoOtTAc9+z000gTuBo=";
2024-03-04 03:24:36 +00:00
};
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
'';
})