treewide: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-16 17:58:11 +07:00
parent a9bb54359e
commit badf51221d
977 changed files with 2613 additions and 2613 deletions
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, callPackage, patchelf, makeWrapper, coreutils, libusb-compat-0_1 }:
{ lib, stdenv, fetchurl, callPackage, patchelf, makeWrapper, coreutils, libusb-compat-0_1 }:
let
myPatchElf = file: with stdenv.lib; ''
myPatchElf = file: with lib; ''
patchelf --set-interpreter \
${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${file}
@@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
done
'';
installPhase = with stdenv.lib; ''
installPhase = with lib; ''
PATH_TO_BRSCAN4="opt/brother/scanner/brscan4"
mkdir -p $out/$PATH_TO_BRSCAN4
cp -rp $PATH_TO_BRSCAN4/* $out/$PATH_TO_BRSCAN4
@@ -87,8 +87,8 @@ in stdenv.mkDerivation rec {
meta = {
description = "Brother brscan4 sane backend driver";
homepage = "http://www.brother.com";
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.unfree;
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ jraygauthier ];
};
}
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libsaneUDevRuleNumber ? "49"}:
{ lib, stdenv, fetchurl, libsaneUDevRuleNumber ? "49"}:
stdenv.mkDerivation rec {
name = "brother-udev-rule-type1-1.0.0-1";
@@ -48,8 +48,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Brother type1 scanners udev rules";
homepage = "http://www.brother.com";
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.unfree;
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ jraygauthier ];
};
}
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, rpmextract }:
{ lib, stdenv, fetchurl, rpmextract }:
stdenv.mkDerivation rec {
pname = "libsane-dsseries";
@@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Brother DSSeries SANE backend driver";
homepage = "http://www.brother.com";
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.unfree;
maintainers = with stdenv.lib.maintainers; [ callahad ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ callahad ];
};
}
@@ -39,19 +39,19 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
configureFlags = []
++ stdenv.lib.optional (avahi != null) "--enable-avahi"
++ stdenv.lib.optional (libusb1 != null) "--with-usb"
++ lib.optional (avahi != null) "--enable-avahi"
++ lib.optional (libusb1 != null) "--with-usb"
;
postInstall = let
compatFirmware = extraFirmware
++ stdenv.lib.optional (gt68xxFirmware != null) {
++ lib.optional (gt68xxFirmware != null) {
src = gt68xxFirmware.fw;
inherit (gt68xxFirmware) name;
backend = "gt68xx";
}
++ stdenv.lib.optional (snapscanFirmware != null) {
++ lib.optional (snapscanFirmware != null) {
src = snapscanFirmware;
name = "your-firmwarefile.bin";
backend = "snapscan";
@@ -75,7 +75,7 @@ stdenv.mkDerivation {
# net.conf conflicts with the file generated by the nixos module
rm -f $out/etc/sane.d/net.conf
'' + stdenv.lib.concatStrings (builtins.map installFirmware compatFirmware);
'' + lib.concatStrings (builtins.map installFirmware compatFirmware);
meta = with lib; {
description = "SANE (Scanner Access Now Easy) backends";