One attempt at packaging Mailspring for NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, pkgs, fetchurl, dpkg, autoPatchelfHook | |
, atomEnv | |
, at-spi2-atk | |
, db | |
, libkrb5 | |
, openssl | |
}: | |
stdenv.mkDerivation rec { | |
pname = "mailspring"; | |
version = "1.6.3"; | |
src = fetchurl { | |
url = "https://github.com/Foundry376/Mailspring/releases/download/${version}/mailspring-${version}-amd64.deb"; | |
sha256 = "0lahvfvxwqbnp12qqc6pzbv5vnr3fr9i11af8lqrdjsd1ylsb73r"; | |
}; | |
buildInputs = [ at-spi2-atk db libkrb5 openssl ] ++ atomEnv.packages; | |
nativeBuildInputs = [ dpkg autoPatchelfHook ]; | |
unpackCmd = "dpkg-deb -x $src unpacked"; | |
preInstallPhase = '' | |
# Remove Debian-specific lintian files | |
rm -rf usr/share/lintian | |
''; | |
installPhase = '' | |
mkdir -p $out | |
mv usr/* $out/ | |
''; | |
preFixup = '' | |
# Desktop File | |
substituteInPlace $out/share/applications/mailspring.desktop \ | |
--replace /usr/bin/mailspring $out/bin/mailspring | |
''; | |
meta = with stdenv.lib; { | |
description = "A beautiful, fast and maintained fork of Nylas Mail by one of the original authors"; | |
longDescription = '' | |
Mailspring is an open-source mail client forked from Nylas Mail and built with Electron. Mailspring's sync engine runs locally, but its source is not open. | |
''; | |
license = licenses.gpl3; | |
maintainers = with maintainers; [ callahad ]; | |
homepage = https://getmailspring.com/; | |
platforms = [ "x86_64-linux" ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment