nixpkgs/pkgs/by-name/ff/fflinuxprint/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.1 KiB
Nix

{ autoPatchelfHook
, cups
, dpkg
, fetchurl
, lib
, stdenv
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fflinuxprint";
version = "1.1.3-4";
src = fetchurl {
url = "https://support-fb.fujifilm.com/driver_downloads/fflinuxprint_${finalAttrs.version}_amd64.deb";
hash = "sha256-Q0qB4gvEWa10KGt6SngVqraxFePxIQ62nTrFZ44vyrU=";
curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
};
sourceRoot = ".";
unpackCmd = "dpkg-deb -x $curSrc .";
nativeBuildInputs = [
autoPatchelfHook
dpkg
];
buildInputs = [
cups
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/cups/model
mv {etc,usr/lib} $out
mv usr/share/ppd/fujifilm/* $out/share/cups/model
runHook postInstall
'';
meta = {
description = "FujiFILM Linux Printer Driver";
homepage = "https://support-fb.fujifilm.com";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ jaduff ];
platforms = lib.platforms.linux;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})