mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
571c71e6f7
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.
37 lines
1001 B
Nix
37 lines
1001 B
Nix
{ lib, stdenv, fetchurl, rpmextract }:
|
|
let
|
|
version = "20160218";
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "postscript-lexmark";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "https://www.openprinting.org/download/printdriver/components/lsb3.2/main/RPMS/noarch/openprinting-ppds-postscript-lexmark-${version}-1lsb3.2.noarch.rpm";
|
|
sha256 = "0wbhvypdr96a5ddg6kj41dn9sbl49n7pfi2vs762ij82hm2gvwcm";
|
|
};
|
|
|
|
nativeBuildInputs = [ rpmextract ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
unpackPhase = ''
|
|
rpmextract $src
|
|
for ppd in opt/OpenPrinting-Lexmark/ppds/Lexmark/*; do
|
|
gzip -d $ppd
|
|
done
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/cups/model/postscript-lexmark
|
|
cp opt/OpenPrinting-Lexmark/ppds/Lexmark/*.ppd $out/share/cups/model/postscript-lexmark/
|
|
cp -r opt/OpenPrinting-Lexmark/doc $out/doc
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.openprinting.org/driver/Postscript-Lexmark/";
|
|
description = "Lexmark Postscript Drivers";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|