Skip to content

Instantly share code, notes, and snippets.

@callahad
Created July 23, 2019 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save callahad/d404382a289e5392a1930eb365bbabfb to your computer and use it in GitHub Desktop.
Save callahad/d404382a289e5392a1930eb365bbabfb to your computer and use it in GitHub Desktop.
One attempt at packaging Mailspring for NixOS
{ 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