Merge pull request #109665 from prusnak/stdenv-lib-nixos

nixos/modules: stdenv.lib -> lib

Changed files
+19 -23
maintainers
nixos
modules
config
installer
tools
nixos-option
services
hardware
sane_extra_backends
virtualisation
tests
+4 -4
maintainers/scripts/nixpkgs-lint.nix
···
-
{ stdenv, makeWrapper, perl, perlPackages }:
+
{ stdenv, lib, makeWrapper, perl, perlPackages }:
stdenv.mkDerivation {
name = "nixpkgs-lint-1";
···
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
'';
-
meta = {
-
maintainers = [ stdenv.lib.maintainers.eelco ];
+
meta = with lib; {
+
maintainers = [ maintainers.eelco ];
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
-
platforms = stdenv.lib.platforms.unix;
+
platforms = platforms.unix;
};
}
+4 -6
nixos/modules/config/gnu.nix
···
{ config, lib, pkgs, ... }:
-
with lib;
-
{
options = {
-
gnu = mkOption {
-
type = types.bool;
+
gnu = lib.mkOption {
+
type = lib.types.bool;
default = false;
description = ''
When enabled, GNU software is chosen by default whenever a there is
···
};
};
-
config = mkIf config.gnu {
+
config = lib.mkIf config.gnu {
environment.systemPackages = with pkgs;
# TODO: Adjust `requiredPackages' from `system-path.nix'.
···
nano zile
texinfo # for the stand-alone Info reader
]
-
++ stdenv.lib.optional (!stdenv.isAarch32) grub2;
+
++ lib.optional (!stdenv.isAarch32) grub2;
# GNU GRUB, where available.
+3 -3
nixos/modules/installer/tools/nixos-option/default.nix
···
src = ./.;
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost nix ];
-
meta = {
-
license = stdenv.lib.licenses.lgpl2Plus;
-
maintainers = with lib.maintainers; [ chkno ];
+
meta = with lib; {
+
license = licenses.lgpl2Plus;
+
maintainers = with maintainers; [ chkno ];
};
}
+6 -8
nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix
···
*/
-
with lib;
-
let
addNetDev = nd: ''
brsaneconfig4 -a \
name="${nd.name}" \
model="${nd.model}" \
-
${if (hasAttr "nodename" nd && nd.nodename != null) then
+
${if (lib.hasAttr "nodename" nd && nd.nodename != null) then
''nodename="${nd.nodename}"'' else
''ip="${nd.ip}"''}'';
-
addAllNetDev = xs: concatStringsSep "\n" (map addNetDev xs);
+
addAllNetDev = xs: lib.concatStringsSep "\n" (map addNetDev xs);
in
stdenv.mkDerivation {
···
dontStrip = true;
dontPatchELF = true;
-
meta = {
+
meta = with lib; {
description = "Brother brscan4 sane backend driver etc files";
homepage = "http://www.brother.com";
-
platforms = stdenv.lib.platforms.linux;
-
license = stdenv.lib.licenses.unfree;
-
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
+
platforms = platforms.linux;
+
license = licenses.unfree;
+
maintainers = with maintainers; [ jraygauthier ];
};
}
+1 -1
nixos/modules/virtualisation/google-compute-image.nix
···
system.build.googleComputeImage = import ../../lib/make-disk-image.nix {
name = "google-compute-image";
postVM = ''
-
PATH=$PATH:${with pkgs; stdenv.lib.makeBinPath [ gnutar gzip ]}
+
PATH=$PATH:${with pkgs; lib.makeBinPath [ gnutar gzip ]}
pushd $out
mv $diskImage disk.raw
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw
+1 -1
nixos/tests/searx.nix
···
{
name = "searx";
-
meta = with pkgs.stdenv.lib.maintainers; {
+
meta = with pkgs.lib.maintainers; {
maintainers = [ rnhmjoj ];
};