depot/third_party/nixpkgs/pkgs/by-name/gt/gtklp/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

71 lines
1.5 KiB
Nix

{ lib
, stdenv
, autoreconfHook
, cups
, fetchurl
, gettext
, glib
, gtk2
, libtool
, openssl
, pkg-config
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gtklp";
version = "1.3.4";
src = fetchurl {
url = "mirror://sourceforge/gtklp/gtklp-${finalAttrs.version}.src.tar.gz";
hash = "sha256-vgdgkEJZX6kyA047LXA4zvM5AewIY/ztu1GIrLa1O6s=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
cups
];
buildInputs = [
cups
gettext
glib
gtk2
libtool
openssl
];
outputs = [ "out" "doc" "man" ];
strictDeps = true;
patches = [
./000-autoconf.patch
./001-format-parameter.patch
];
# Workaround build failure on -fno-common toolchains:
# ld: libgtklp.a(libgtklp.o):libgtklp/libgtklp.h:83: multiple definition of `progressBar';
# file.o:libgtklp/libgtklp.h:83: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
postPatch = ''
substituteInPlace include/defaults.h \
--replace "netscape" "firefox" \
--replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \
"http://localhost:631/help/"
'';
preInstall = ''
install -D -m0644 -t $doc/share/doc AUTHORS BUGS ChangeLog README USAGE
'';
meta = {
homepage = "https://gtklp.sirtobi.com";
description = "GTK-based graphical frontend for CUPS";
license = with lib.licenses; [ gpl2Only ];
mainProgram = "gtklp";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})