nixpkgs/pkgs/by-name/gt/gtklp/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

72 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;
};
})