mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +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.
45 lines
952 B
Nix
45 lines
952 B
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, cups
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "carps-cups";
|
|
version = "unstable-2018-03-05";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ondrej-zary";
|
|
repo = "carps-cups";
|
|
rev = "18d80d1d6f473dd9132e4b6d8b5c592c74982f17";
|
|
sha256 = "0mjj9hs5lqxi0qamgb4sxfz4fvf7ggi66bxd37bkz3fl0g9xff70";
|
|
};
|
|
|
|
preBuild = ''
|
|
export CUPS_DATADIR="${cups}/share/cups"
|
|
'';
|
|
|
|
installPhase = ''
|
|
CUPSDIR="$out/lib/cups"
|
|
CUPSDATADIR="$out/share/cups"
|
|
|
|
mkdir -p "$CUPSDIR/filter" "$CUPSDATADIR/drv" "$CUPSDATADIR/usb"
|
|
|
|
install -s rastertocarps $CUPSDIR/filter
|
|
install -m 644 carps.drv $CUPSDATADIR/drv/
|
|
install -m 644 carps.usb-quirks $CUPSDATADIR/usb/
|
|
'';
|
|
|
|
buildInputs = [ cups ];
|
|
|
|
meta = with lib; {
|
|
description = "CUPS Linux drivers for Canon printers";
|
|
homepage = "https://www.canon.com/";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [
|
|
ewok
|
|
];
|
|
};
|
|
}
|
|
|