mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 17:10:48 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
{ stdenv, lib, fetchzip, dpkg, autoPatchelfHook, cups }:
|
|
let
|
|
debPlatform =
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
|
|
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
|
|
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "fxlinuxprint";
|
|
version = "1.1.2-1";
|
|
|
|
src = fetchzip {
|
|
url = "https://onlinesupport.fujixerox.com/driver_downloads/fxlinuxpdf112119031.zip";
|
|
sha256 = "1mv07ch6ysk9bknfmjqsgxb803sj6vfin29s9knaqv17jvgyh0n3";
|
|
curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
|
|
};
|
|
|
|
nativeBuildInputs = [ dpkg autoPatchelfHook ];
|
|
buildInputs = [ cups ];
|
|
|
|
sourceRoot = ".";
|
|
unpackCmd = "dpkg-deb -x $curSrc/fxlinuxprint_${version}_${debPlatform}.deb .";
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
mv etc $out
|
|
mv usr/lib $out
|
|
|
|
mkdir -p $out/share/cups/model
|
|
mv usr/share/ppd/FujiXerox/* $out/share/cups/model
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Fuji Xerox Linux Printer Driver";
|
|
longDescription = ''
|
|
DocuPrint P365/368 d
|
|
DocuPrint CM315/318 z
|
|
DocuPrint CP315/318 dw
|
|
ApeosPort-VI C2271/C3370/C3371/C4471/C5571/C6671/C7771
|
|
DocuCentre-VI C2271/C3370/C3371/C4471/C5571/C6671/C7771
|
|
DocuPrint 3205 d/3208 d/3505 d/3508 d/4405 d/4408 d
|
|
'';
|
|
homepage = "https://onlinesupport.fujixerox.com";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ delan ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|