summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/foomatic-db-engine
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-06-07 15:46:12 +0200
committerlassulus <lassulus@lassul.us>2022-06-07 15:46:12 +0200
commitb3786c3a74fce6a742649c37ab2ad1255f5864bf (patch)
treea5453da91d868781b2339722a4e7bf588993ac09 /makefu/5pkgs/foomatic-db-engine
parente6f67aa910f78ecf75f3a47a0794497148c60c2b (diff)
parent53855cd2d0dadb159215c5ed12e6d0be02dca98b (diff)
Merge remote-tracking branch 'gum/22.05'
Diffstat (limited to 'makefu/5pkgs/foomatic-db-engine')
-rw-r--r--makefu/5pkgs/foomatic-db-engine/default.nix86
1 files changed, 86 insertions, 0 deletions
diff --git a/makefu/5pkgs/foomatic-db-engine/default.nix b/makefu/5pkgs/foomatic-db-engine/default.nix
new file mode 100644
index 000000000..242232c88
--- /dev/null
+++ b/makefu/5pkgs/foomatic-db-engine/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gd
+, libusb1
+, cups
+, libpng
+, perl
+, perlPackages
+, libxml2
+, ghostscript
+, a2ps
+, wget
+, file
+, foomatic-filters
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+ pname = "foomatic-db-engine";
+ version = "2020-01-31";
+
+ src = fetchFromGitHub {
+ owner = "OpenPrinting";
+ repo = "foomatic-db-engine-4";
+ rev = "bd265b77a9f66f672bf1e3f0803145f2eccabf06";
+ sha256 = "1f53kd3b0sxgx7hg2dvw2624bpwdfcx0zh4dn0h89l84mirgw1bs";
+ };
+
+ nativeBuildInputs = [
+ autoreconfHook
+ perl
+ makeWrapper
+ ];
+ postConfigure = ''
+ sed -i "s#$ENV{BINDIR}#${placeholder "out"}/bin#" makeDefaults
+ '';
+ configureFlags = [
+ #"PERL_INSTALLDIRS=vendor"
+ "PERL_INSTALLDIRS=site"
+ "--prefix=/"
+ "PERLPREFIX=/"
+ #"DESTDIR=$(out)"
+ #"sysconfdir=/etc"
+ "LIBDIR=/lib"
+ #"PERL_INSTALLDIRS=site"
+ #"PERL_INSTALLDIRS=perl"
+ #PERL_INSTALLDIRS=perl"
+ "PERL=${perl}/bin/perl"
+ "FILEUTIL=${file}/bin/file"
+ "SBINDIR=/bin"
+ ];
+ makeFlags = [
+ "DESTDIR=${placeholder "out"}"
+ "PERLLIB=$(out)/${perlPackages.perl.libPrefix}"
+ ];
+
+ buildInputs = [
+ cups
+ ghostscript
+ a2ps
+ wget
+ perl
+ libxml2
+ file
+ foomatic-filters
+ ];
+ postFixup = ''
+ echo cups > "$out"/etc/foomatic/defaultspooler
+
+ for file in $out/bin/foomatic-*;do
+ wrapProgram "$file" \
+ --set PERL5LIB "$out/${perlPackages.perl.libPrefix}" \
+ --prefix PATH : "$out/bin"
+ done
+
+ '';
+
+ meta = with lib; {
+ description = "Command line tool to print labels on Brother P-Touch printers on Linux";
+ license = licenses.gpl3Plus;
+ homepage = "https://mockmoon-cybernetics.ch/computer/p-touch2430pc/";
+ maintainers = with maintainers; [ shamilton ];
+ platforms = platforms.linux;
+ };
+}