nixpart0: stdenv.lib -> lib

This fixes an evaluation error indroduced by #108978
This commit is contained in:
Fabian Möller 2021-01-14 16:36:34 +01:00
parent 3a7dae4ae4
commit f213aa3ae0
No known key found for this signature in database
GPG Key ID: 70B29D65DD8A7E31
10 changed files with 51 additions and 51 deletions

View File

@ -1,6 +1,6 @@
# FIXME: Unify with pkgs/development/python-modules/blivet/default.nix. # FIXME: Unify with pkgs/development/python-modules/blivet/default.nix.
{ lib, stdenv, fetchurl, buildPythonApplication, pykickstart, pyparted, pyblock { lib, fetchurl, buildPythonApplication, pykickstart, pyparted, pyblock
, libselinux, cryptsetup, multipath_tools, lsof, util-linux , libselinux, cryptsetup, multipath_tools, lsof, util-linux
, useNixUdev ? true, systemd ? null , useNixUdev ? true, systemd ? null
# useNixUdev is here for bw compatibility # useNixUdev is here for bw compatibility
@ -30,13 +30,13 @@ buildPythonApplication rec {
sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
sed -i -r -e 's|"(u?mount)"|"${util-linux.bin}/bin/\1"|' blivet/util.py sed -i -r -e 's|"(u?mount)"|"${util-linux.bin}/bin/\1"|' blivet/util.py
sed -i -e '/find_library/,/find_library/ { sed -i -e '/find_library/,/find_library/ {
c libudev = "${stdenv.lib.getLib systemd}/lib/libudev.so.1" c libudev = "${lib.getLib systemd}/lib/libudev.so.1"
}' blivet/pyudev.py }' blivet/pyudev.py
''; '';
propagatedBuildInputs = [ propagatedBuildInputs = [
pykickstart pyparted pyblock libselinux cryptsetup pykickstart pyparted pyblock libselinux cryptsetup
] ++ stdenv.lib.optional useNixUdev systemd; ] ++ lib.optional useNixUdev systemd;
# tests are currently _heavily_ broken upstream # tests are currently _heavily_ broken upstream
doCheck = false; doCheck = false;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, lvm2, libgcrypt, libuuid, pkgconfig, popt { lib, stdenv, fetchurl, fetchpatch, lvm2, libgcrypt, libuuid, pkgconfig, popt
, enablePython ? true, python ? null , enablePython ? true, python ? null
}: }:
@ -22,17 +22,17 @@ stdenv.mkDerivation rec {
]; ];
configureFlags = [ "--enable-cryptsetup-reencrypt" ] configureFlags = [ "--enable-cryptsetup-reencrypt" ]
++ stdenv.lib.optional enablePython "--enable-python"; ++ lib.optional enablePython "--enable-python";
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ lvm2 libgcrypt libuuid popt ] buildInputs = [ lvm2 libgcrypt libuuid popt ]
++ stdenv.lib.optional enablePython python; ++ lib.optional enablePython python;
meta = { meta = with lib; {
homepage = "http://code.google.com/p/cryptsetup/"; homepage = "http://code.google.com/p/cryptsetup/";
description = "LUKS for dm-crypt"; description = "LUKS for dm-crypt";
license = stdenv.lib.licenses.gpl2; license = licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ ]; maintainers = with maintainers; [ ];
platforms = with stdenv.lib.platforms; linux; platforms = with platforms; linux;
}; };
} }

View File

@ -10,46 +10,46 @@
let let
blivet = import ./blivet.nix { blivet = import ./blivet.nix {
inherit stdenv fetchurl buildPythonApplication; inherit lib fetchurl buildPythonApplication;
inherit pykickstart pyparted pyblock cryptsetup libselinux multipath_tools; inherit pykickstart pyparted pyblock cryptsetup libselinux multipath_tools;
inherit useNixUdev; inherit useNixUdev;
inherit (pkgs) lsof util-linux systemd; inherit (pkgs) lsof util-linux systemd;
}; };
cryptsetup = import ./cryptsetup.nix { cryptsetup = import ./cryptsetup.nix {
inherit stdenv fetchurl python; inherit lib stdenv fetchurl python;
inherit (pkgs) fetchpatch pkgconfig libgcrypt libuuid popt lvm2; inherit (pkgs) fetchpatch pkgconfig libgcrypt libuuid popt lvm2;
}; };
dmraid = import ./dmraid.nix { dmraid = import ./dmraid.nix {
inherit stdenv fetchurl lvm2; inherit lib stdenv fetchurl lvm2;
}; };
lvm2 = import ./lvm2.nix { lvm2 = import ./lvm2.nix {
inherit stdenv fetchurl; inherit lib stdenv fetchurl;
inherit (pkgs) fetchpatch pkgconfig util-linux systemd coreutils; inherit (pkgs) fetchpatch pkgconfig util-linux systemd coreutils;
}; };
multipath_tools = import ./multipath-tools.nix { multipath_tools = import ./multipath-tools.nix {
inherit stdenv fetchurl lvm2; inherit lib stdenv fetchurl lvm2;
inherit (pkgs) fetchpatch readline systemd libaio gzip; inherit (pkgs) fetchpatch readline systemd libaio gzip;
}; };
parted = import ./parted.nix { parted = import ./parted.nix {
inherit stdenv fetchurl; inherit lib stdenv fetchurl;
inherit (pkgs) fetchpatch util-linux readline libuuid gettext check lvm2; inherit (pkgs) fetchpatch util-linux readline libuuid gettext check lvm2;
}; };
pyblock = import ./pyblock.nix { pyblock = import ./pyblock.nix {
inherit stdenv fetchurl python lvm2 dmraid; inherit lib stdenv fetchurl python lvm2 dmraid;
}; };
pykickstart = import ./pykickstart.nix { pykickstart = import ./pykickstart.nix {
inherit stdenv fetchurl python buildPythonApplication urlgrabber; inherit lib fetchurl python buildPythonApplication urlgrabber;
}; };
pyparted = import ./pyparted.nix { pyparted = import ./pyparted.nix {
inherit stdenv fetchurl python buildPythonApplication parted; inherit lib stdenv fetchurl python buildPythonApplication parted;
inherit (pkgs) pkgconfig e2fsprogs; inherit (pkgs) pkgconfig e2fsprogs;
}; };

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, lvm2 }: { lib, stdenv, fetchurl, lvm2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dmraid-1.0.0.rc15"; name = "dmraid-1.0.0.rc15";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ lvm2 ]; buildInputs = [ lvm2 ];
meta = { meta = with lib; {
description = "Old-style RAID configuration utility"; description = "Old-style RAID configuration utility";
longDescription = '' longDescription = ''
Old RAID configuration utility (still under development, though). Old RAID configuration utility (still under development, though).
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
its volumes. May be needed for rescuing an older system or nuking its volumes. May be needed for rescuing an older system or nuking
the metadata when reformatting. the metadata when reformatting.
''; '';
maintainers = [ stdenv.lib.maintainers.raskin ]; maintainers = [ maintainers.raskin ];
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, systemd, util-linux, coreutils }: { lib, stdenv, fetchurl, fetchpatch, pkgconfig, systemd, util-linux, coreutils }:
let let
v = "2.02.106"; v = "2.02.106";
@ -68,9 +68,9 @@ stdenv.mkDerivation {
cp scripts/lvm2_activation_generator_systemd_red_hat $out/lib/systemd/system-generators cp scripts/lvm2_activation_generator_systemd_red_hat $out/lib/systemd/system-generators
''; '';
meta = { meta = with lib; {
homepage = "http://sourceware.org/lvm2/"; homepage = "http://sourceware.org/lvm2/";
description = "Tools to support Logical Volume Management (LVM) on Linux"; description = "Tools to support Logical Volume Management (LVM) on Linux";
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -1,6 +1,6 @@
# FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix. # FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix.
{ stdenv, fetchurl, fetchpatch, lvm2, libaio, gzip, readline, systemd }: { lib, stdenv, fetchurl, fetchpatch, lvm2, libaio, gzip, readline, systemd }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "multipath-tools-0.4.9"; name = "multipath-tools-0.4.9";
@ -36,8 +36,8 @@ stdenv.mkDerivation rec {
substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx
substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${stdenv.lib.getLib systemd}/lib/udev/scsi_id substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${lib.getLib systemd}/lib/udev/scsi_id
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${stdenv.lib.getLib systemd}/lib/udev/scsi_id substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${lib.getLib systemd}/lib/udev/scsi_id
sed -i -re ' sed -i -re '
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'", s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
@ -45,9 +45,9 @@ stdenv.mkDerivation rec {
''; '';
meta = { meta = with lib; {
description = "Tools for the Linux multipathing driver"; description = "Tools for the Linux multipathing driver";
homepage = "http://christophe.varoqui.free.fr/"; homepage = "http://christophe.varoqui.free.fr/";
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline { lib,stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline
, util-linux, check , util-linux, check
, enableStatic ? stdenv.hostPlatform.isStatic , enableStatic ? stdenv.hostPlatform.isStatic
}: }:
@ -21,21 +21,21 @@ stdenv.mkDerivation rec {
]; ];
buildInputs = [ libuuid ] buildInputs = [ libuuid ]
++ stdenv.lib.optional (readline != null) readline ++ lib.optional (readline != null) readline
++ stdenv.lib.optional (gettext != null) gettext ++ lib.optional (gettext != null) gettext
++ stdenv.lib.optional (lvm2 != null) lvm2; ++ lib.optional (lvm2 != null) lvm2;
configureFlags = configureFlags =
(if (readline != null) (if (readline != null)
then [ "--with-readline" ] then [ "--with-readline" ]
else [ "--without-readline" ]) else [ "--without-readline" ])
++ stdenv.lib.optional (lvm2 == null) "--disable-device-mapper" ++ lib.optional (lvm2 == null) "--disable-device-mapper"
++ stdenv.lib.optional enableStatic "--enable-static"; ++ lib.optional enableStatic "--enable-static";
doCheck = true; doCheck = true;
checkInputs = [ check util-linux ]; checkInputs = [ check util-linux ];
meta = { meta = with lib; {
description = "Create, destroy, resize, check, and copy partitions"; description = "Create, destroy, resize, check, and copy partitions";
longDescription = '' longDescription = ''
@ -49,13 +49,13 @@ stdenv.mkDerivation rec {
''; '';
homepage = "https://www.gnu.org/software/parted/"; homepage = "https://www.gnu.org/software/parted/";
license = stdenv.lib.licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = [ maintainers = [
# Add your name here! # Add your name here!
]; ];
# GNU Parted requires libuuid, which is part of util-linux-ng. # GNU Parted requires libuuid, which is part of util-linux-ng.
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, lvm2, dmraid }: { lib, stdenv, fetchurl, python, lvm2, dmraid }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pyblock"; pname = "pyblock";
@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
"SITELIB=$(out)/lib/${python.libPrefix}/site-packages" "SITELIB=$(out)/lib/${python.libPrefix}/site-packages"
]; ];
meta = { meta = with lib; {
description = "Interface for working with block devices"; description = "Interface for working with block devices";
license = stdenv.lib.licenses.gpl2Plus; license = licenses.gpl2Plus;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, python, buildPythonApplication, fetchurl, urlgrabber }: { lib, python, buildPythonApplication, fetchurl, urlgrabber }:
buildPythonApplication rec { buildPythonApplication rec {
pname = "pykickstart"; pname = "pykickstart";
@ -22,9 +22,9 @@ buildPythonApplication rec {
${python}/bin/${python.executable} tests/baseclass.py -vv ${python}/bin/${python.executable} tests/baseclass.py -vv
''; '';
meta = { meta = with lib; {
homepage = "http://fedoraproject.org/wiki/Pykickstart"; homepage = "http://fedoraproject.org/wiki/Pykickstart";
description = "Read and write Fedora kickstart files"; description = "Read and write Fedora kickstart files";
license = stdenv.lib.licenses.gpl2Plus; license = licenses.gpl2Plus;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, python, buildPythonApplication, parted, e2fsprogs }: { lib, stdenv, fetchurl, pkgconfig, python, buildPythonApplication, parted, e2fsprogs }:
buildPythonApplication rec { buildPythonApplication rec {
pname = "pyparted"; pname = "pyparted";
@ -14,7 +14,7 @@ buildPythonApplication rec {
sed -i -e ' sed -i -e '
s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path|
' tests/test__ped_ped.py ' tests/test__ped_ped.py
'' + stdenv.lib.optionalString stdenv.isi686 '' '' + lib.optionalString stdenv.isi686 ''
# remove some integers in this test case which overflow on 32bit systems # remove some integers in this test case which overflow on 32bit systems
sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \
tests/test__ped_ped.py tests/test__ped_ped.py
@ -33,10 +33,10 @@ buildPythonApplication rec {
make test PYTHON=${python.executable} make test PYTHON=${python.executable}
''; '';
meta = { meta = with lib; {
homepage = "https://fedorahosted.org/pyparted/"; homepage = "https://fedorahosted.org/pyparted/";
description = "Python interface for libparted"; description = "Python interface for libparted";
license = stdenv.lib.licenses.gpl2Plus; license = licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }