1{
2 autoPatchelfHook,
3 cups,
4 dpkg,
5 fetchurl,
6 lib,
7 stdenv,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "fflinuxprint";
12 version = "1.1.3-4";
13
14 src = fetchurl {
15 url = "https://support-fb.fujifilm.com/driver_downloads/fflinuxprint_${finalAttrs.version}_amd64.deb";
16 hash = "sha256-Q0qB4gvEWa10KGt6SngVqraxFePxIQ62nTrFZ44vyrU=";
17 curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
18 };
19
20 nativeBuildInputs = [
21 autoPatchelfHook
22 dpkg
23 ];
24
25 buildInputs = [
26 cups
27 ];
28
29 dontConfigure = true;
30 dontBuild = true;
31
32 installPhase = ''
33 runHook preInstall
34
35 mkdir -p $out/share/cups/model
36 mv {etc,usr/lib} $out
37 mv usr/share/ppd/fujifilm/* $out/share/cups/model
38
39 runHook postInstall
40 '';
41
42 meta = {
43 description = "FujiFILM Linux Printer Driver";
44 homepage = "https://support-fb.fujifilm.com";
45 license = lib.licenses.unfree;
46 maintainers = with lib.maintainers; [ jaduff ];
47 platforms = lib.platforms.linux;
48 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
49 };
50})