1 { stdenv, lib, fetchzip, substituteAll, dpkg, autoPatchelfHook, cups, tcl, tk, xorg, makeWrapper }:
4 if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
5 else if stdenv.hostPlatform.system == "i686-linux" then "i386"
6 else throw "Unsupported system: ${stdenv.hostPlatform.system}";
8 stdenv.mkDerivation rec {
9 pname = "fxlinuxprintutil";
13 url = "https://onlinesupport.fujixerox.com/driver_downloads/fxlinuxpdf112119031.zip";
14 sha256 = "1mv07ch6ysk9bknfmjqsgxb803sj6vfin29s9knaqv17jvgyh0n3";
15 curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
19 # replaces references to “path/to/fxlputil” via $0 that are broken by our wrapProgram
20 # with /nix/store/fxlinuxprintutil/bin/fxlputil
23 # replaces the code that looks for Tcl packages in the working directory and /usr/lib
24 # or /usr/lib64 with /nix/store/fxlinuxprintutil/lib
27 # replaces the code that looks for X11’s locale.alias in /usr/share/X11/locale or
28 # /usr/lib/X11/locale with /nix/store/libX11/share/X11/locale
30 src = ./fxlocalechk.tcl.patch;
31 inherit (xorg) libX11;
35 nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper ];
36 buildInputs = [ cups tcl tk ];
39 unpackCmd = "dpkg-deb -x $curSrc/${pname}_${version}_${debPlatform}.deb .";
49 wrapProgram $out/bin/fxlputil --prefix PATH : ${lib.makeBinPath [ tcl tk ]}
53 description = "Optional configuration tool for fxlinuxprint";
54 homepage = "https://onlinesupport.fujixerox.com";
55 license = licenses.unfree;
56 maintainers = with maintainers; [ delan ];
57 platforms = platforms.linux;