treewide: with stdenv.lib; in meta -> with lib;
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
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, intltool, pkgconfig, glib, polkit, cups, fetchpatch }:
|
||||
{ lib, stdenv, fetchurl, intltool, pkgconfig, glib, polkit, cups, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.2.6";
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "PolicyKit helper to configure cups with fine-grained privileges";
|
||||
homepage = "http://www.freedesktop.org/wiki/Software/cups-pk-helper/";
|
||||
license = licenses.gpl2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, zlib, cups }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, zlib, cups }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "brlaser";
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cmakeFlags = [ "-DCUPS_SERVER_BIN=lib/cups" "-DCUPS_DATA_DIR=share/cups" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A CUPS driver for Brother laser printers";
|
||||
longDescription =
|
||||
''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, unzip, autoreconfHook, libtool, makeWrapper, cups, ghostscript, pkgsi686Linux, zlib }:
|
||||
{lib, stdenv, fetchurl, unzip, autoreconfHook, libtool, makeWrapper, cups, ghostscript, pkgsi686Linux, zlib }:
|
||||
|
||||
let
|
||||
|
||||
@@ -214,7 +214,7 @@ stdenv.mkDerivation {
|
||||
--prefix PATH ":" "$out/bin"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "CUPS Linux drivers for Canon printers";
|
||||
homepage = "http://www.canon.com/";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, perl }:
|
||||
{ lib, stdenv, fetchurl, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cups-toshiba-estudio";
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
||||
chmod 755 $out/share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS.gz
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Printer only driver for the Toshiba e-STUDIO class of printers";
|
||||
longDescription = ''
|
||||
This driver supports the following printers: TOSHIBA e-STUDIO2000AC,
|
||||
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
mv usr/share/ppd/FujiXerox/* $out/share/cups/model
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fuji Xerox Linux Printer Driver";
|
||||
longDescription = ''
|
||||
DocuPrint P365/368 d
|
||||
|
||||
@@ -55,7 +55,7 @@ in stdenv.mkDerivation rec {
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Google Cloud Print driver for CUPS, allows printing to printers hosted on Google Cloud Print";
|
||||
homepage = "http://ccp.niftiestsoftware.com";
|
||||
platforms = platforms.linux;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, perl, gnugrep, which}:
|
||||
{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, perl, gnugrep, which}:
|
||||
|
||||
let
|
||||
version = "3.2.0-1";
|
||||
@@ -57,7 +57,7 @@ stdenv.mkDerivation {
|
||||
--prefix PATH ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://www.brother.com/";
|
||||
description = "Brother hl-l2340dw printer driver";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeWrapper
|
||||
{ lib, stdenv, fetchurl, makeWrapper
|
||||
, cups
|
||||
, dpkg
|
||||
, a2ps, ghostscript, gnugrep, gnused, coreutils, file, perl, which
|
||||
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
|
||||
--prefix PATH ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://www.brother.com/";
|
||||
description = "Brother HL-L2390DW combined print driver";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, mfcj6510dwlpr, makeWrapper}:
|
||||
{ lib, stdenv, fetchurl, mfcj6510dwlpr, makeWrapper}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mfcj6510dw-cupswrapper";
|
||||
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
|
||||
make clean
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://www.brother.com/";
|
||||
description = "Brother MFC-J6510DW CUPS wrapper driver";
|
||||
license = with licenses; gpl2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, util-linux, xxd, runtimeShell
|
||||
{ lib, stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, util-linux, xxd, runtimeShell
|
||||
, ghostscript, a2ps }:
|
||||
|
||||
# Why:
|
||||
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
|
||||
--prefix PATH ":" ${ stdenv.lib.makeBinPath [ coreutils gnused file ghostscript a2ps ] }
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Brother MFC-J6510DW LPR driver";
|
||||
downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj6510dw_all&os=128";
|
||||
homepage = "http://www.brother.com/";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, cups, libusb-compat-0_1, libxml2, perl }:
|
||||
{ lib, stdenv, fetchurl, cups, libusb-compat-0_1, libxml2, perl }:
|
||||
|
||||
let
|
||||
|
||||
@@ -102,7 +102,7 @@ in stdenv.mkDerivation rec {
|
||||
# we did this in prefixup already
|
||||
dontPatchELF = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Unified Linux Driver for Samsung printers and scanners";
|
||||
homepage = "http://www.bchemnet.com/suldr";
|
||||
downloadPage = "http://www.bchemnet.com/suldr/driver/";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, cups, libusb-compat-0_1, libxml2 }:
|
||||
{ lib, stdenv, fetchurl, cups, libusb-compat-0_1, libxml2 }:
|
||||
|
||||
let
|
||||
|
||||
@@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
|
||||
# we did this in prefixup already
|
||||
dontPatchELF = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Unified Linux Driver for Samsung printers and scanners";
|
||||
homepage = "http://www.bchemnet.com/suldr";
|
||||
downloadPage = "http://www.bchemnet.com/suldr/driver/";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# }
|
||||
# (This advice was tested on 2010 August 2.)
|
||||
|
||||
{ stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf }:
|
||||
{ lib, stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf }:
|
||||
|
||||
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
||||
# to see what will break when upgrading. Consider a new versioned attribute.
|
||||
@@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Samsung's Linux printing drivers; includes binaries without source code";
|
||||
homepage = "http://www.samsung.com/";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# }
|
||||
# (This advice was tested on the 1st November 2016.)
|
||||
|
||||
{ stdenv, fetchurl, cups, libusb-compat-0_1 }:
|
||||
{ lib, stdenv, fetchurl, cups, libusb-compat-0_1 }:
|
||||
|
||||
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
||||
# to see what will break when upgrading. Consider a new versioned attribute.
|
||||
@@ -72,7 +72,7 @@ in stdenv.mkDerivation rec {
|
||||
cp -r ./* $out/share/cups/model/samsung
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Samsung's Linux printing drivers; includes binaries without source code";
|
||||
homepage = "http://www.samsung.com/";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
|
||||
{ lib, stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
|
||||
|
||||
let
|
||||
|
||||
@@ -45,7 +45,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ cups zlib jbigkit ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "CUPS drivers for SPL (Samsung Printer Language) printers";
|
||||
homepage = "http://splix.ap2c.org";
|
||||
license = licenses.gpl2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchFromGitHub, cups}:
|
||||
{lib, stdenv, fetchFromGitHub, cups}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cups-zj-58";
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
||||
install -D ZJ-58.ppd $out/share/cups/model/zjiang/ZJ-58.ppd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "CUPS filter for thermal printer Zjiang ZJ-58";
|
||||
homepage = "https://github.com/klirichek/zj-58";
|
||||
platforms = platforms.linux;
|
||||
|
||||
Reference in New Issue
Block a user