@@ -0,0 +1,52 @@
1+{ stdenv, lib, fetchurl
2+, autoreconfHook, libtool, pkg-config
3+, gtk2, glib, cups, gettext, openssl
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "gtklp";
8+ version = "1.3.4";
9+
10+ src = fetchurl {
11+ url = "mirror://sourceforge/${pname}/${pname}-${version}.src.tar.gz";
12+ sha256 = "1arvnnvar22ipgnzqqq8xh0kkwyf71q2sfsf0crajpsr8a8601xy";
13+ };
14+
15+ nativeBuildInputs = [
16+ pkg-config
17+ autoreconfHook
18+ ];
19+
20+ buildInputs = [
21+ cups
22+ gettext
23+ glib
24+ gtk2
25+ libtool
26+ openssl
27+ ];
28+
29+ patches = [
30+ ./patches/mdv-fix-str-fmt.patch
31+ ./patches/autoconf.patch
32+ ];
33+
34+ preConfigure = ''
35+ substituteInPlace include/defaults.h --replace "netscape" "firefox"
36+ substituteInPlace include/defaults.h --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \
37+ "http://localhost:631/help/"
38+ '';
39+
40+ preInstall = ''
41+ install -D -m0644 -t $out/share/doc AUTHORS BUGS ChangeLog README USAGE
42+ '';
43+
44+ meta = with lib; {
45+ description = "A graphical frontend for CUPS";
46+ homepage = "https://gtklp.sirtobi.com";
47+ license = licenses.gpl2Only;
48+ maintainers = with maintainers; [ caadar ];
49+ platforms = platforms.unix;
50+ };
51+
52+}