pan: fix build and format

This commit is contained in:
fortuneteller2k 2021-06-27 21:33:28 +08:00
parent 4ba70da807
commit efe2e4e8c2
2 changed files with 1142 additions and 13 deletions

View file

@ -1,24 +1,40 @@
{ spellChecking ? true { spellChecking ? true
, lib, stdenv, fetchurl, pkg-config, gtk3, gtkspell3 ? null , lib
, gmime2, gettext, intltool, itstool, libxml2, libnotify, gnutls , stdenv
, makeWrapper, gnupg , fetchurl
, gnomeSupport ? true, libsecret, gcr , pkg-config
, gtk3
, gtkspell3
, gmime2
, gettext
, intltool
, itstool
, libxml2
, libnotify
, gnutls
, makeWrapper
, gnupg
, gnomeSupport ? true
, libsecret
, gcr
}: }:
assert spellChecking -> gtkspell3 != null; stdenv.mkDerivation rec {
let version = "0.146"; in
stdenv.mkDerivation {
pname = "pan"; pname = "pan";
inherit version; version = "0.146";
src = fetchurl { src = fetchurl {
url = "http://pan.rebelbase.com/download/releases/${version}/source/pan-${version}.tar.bz2"; url = "https://pan.rebelbase.com/download/releases/${version}/source/pan-${version}.tar.bz2";
sha256 = "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"; sha256 = "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55";
}; };
patches = [
# Take <glib.h>, <gmime.h>, "gtk-compat.h" out of extern "C"
./move-out-of-extern-c.diff
];
nativeBuildInputs = [ pkg-config gettext intltool itstool libxml2 makeWrapper ]; nativeBuildInputs = [ pkg-config gettext intltool itstool libxml2 makeWrapper ];
buildInputs = [ gtk3 gmime2 libnotify gnutls ] buildInputs = [ gtk3 gmime2 libnotify gnutls ]
++ lib.optional spellChecking gtkspell3 ++ lib.optional spellChecking gtkspell3
++ lib.optionals gnomeSupport [ libsecret gcr ]; ++ lib.optionals gnomeSupport [ libsecret gcr ];
@ -29,7 +45,7 @@ stdenv.mkDerivation {
"--with-gnutls" "--with-gnutls"
"--enable-libnotify" "--enable-libnotify"
] ++ lib.optional spellChecking "--with-gtkspell" ] ++ lib.optional spellChecking "--with-gtkspell"
++ lib.optional gnomeSupport "--enable-gkr"; ++ lib.optional gnomeSupport "--enable-gkr";
postInstall = '' postInstall = ''
wrapProgram $out/bin/pan --suffix PATH : ${gnupg}/bin wrapProgram $out/bin/pan --suffix PATH : ${gnupg}/bin
@ -42,6 +58,6 @@ stdenv.mkDerivation {
homepage = "http://pan.rebelbase.com/"; homepage = "http://pan.rebelbase.com/";
maintainers = [ maintainers.eelco ]; maintainers = [ maintainers.eelco ];
platforms = platforms.linux; platforms = platforms.linux;
license = with licenses; [ gpl2 fdl11 ]; license = with licenses; [ gpl2Only fdl11 ];
}; };
} }

File diff suppressed because it is too large Load diff