Merge pull request #110912 from siraben/stdenv-lib-inherit

treewide: remove inherited stdenv.lib
This commit is contained in:
Sandro 2021-01-27 10:28:55 +01:00 committed by GitHub
commit ad97ca4e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 37 additions and 52 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, callPackage, vimUtils, buildEnv, makeWrapper }: { lib, stdenv, callPackage, vimUtils, buildEnv, makeWrapper }:
let let
macvim = callPackage ./macvim.nix { inherit stdenv; }; macvim = callPackage ./macvim.nix { inherit stdenv; };
@ -12,7 +12,6 @@ let
# sourcing of the user's vimrc. Use `customRC = "source $HOME/.vim/vimrc"` # sourcing of the user's vimrc. Use `customRC = "source $HOME/.vim/vimrc"`
# if you want to preserve that behavior. # if you want to preserve that behavior.
configure = let configure = let
inherit (stdenv) lib;
doConfig = config: let doConfig = config: let
vimrcConfig = config // { vimrcConfig = config // {
# always source the bundled system vimrc # always source the bundled system vimrc

View File

@ -1,10 +1,8 @@
{ stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw { lib, stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
, cairo, readline, ffmpeg_3, makeWrapper, wxGTK30, netcdf, blas , cairo, readline, ffmpeg_3, makeWrapper, wxGTK30, netcdf, blas
, proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid , proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid
}: }:
let inherit (stdenv) lib; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "grass"; name = "grass";
version = "7.6.1"; version = "7.6.1";

View File

@ -125,7 +125,7 @@ python3.pkgs.buildPythonApplication {
''; '';
passthru.updateScript = import ./update.nix { passthru.updateScript = import ./update.nix {
inherit (stdenv) lib; inherit lib;
inherit inherit
writeScript writeScript
common-updater-scripts common-updater-scripts

View File

@ -20,7 +20,6 @@
}: }:
let let
inherit (stdenv) lib;
buildClient = monolithic || client; buildClient = monolithic || client;
buildCore = monolithic || enableDaemon; buildCore = monolithic || enableDaemon;
in in

View File

@ -1,4 +1,4 @@
{ stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more { lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
, file, atk, alsaLib, cairo, fontconfig, gdk-pixbuf, glib, gnome3, gtk2-x11, gtk3 , file, atk, alsaLib, cairo, fontconfig, gdk-pixbuf, glib, gnome3, gtk2-x11, gtk3
, heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2 , heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2
, gnome2, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2 , gnome2, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2
@ -11,8 +11,6 @@
}: }:
let let
inherit (stdenv) lib;
openssl' = symlinkJoin { openssl' = symlinkJoin {
name = "openssl-backwards-compat"; name = "openssl-backwards-compat";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View File

@ -13,7 +13,8 @@
, csdp ? null , csdp ? null
, version, coq-version ? null, , version, coq-version ? null,
}@args: }@args:
let lib = import ../../../../build-support/coq/extra-lib.nix {inherit (stdenv) lib;}; in let lib' = lib; in
let lib = import ../../../../build-support/coq/extra-lib.nix {lib = lib';}; in
with builtins; with lib; with builtins; with lib;
let let
release = { release = {

View File

@ -91,7 +91,7 @@ let
# NOTE: this may take a while since it has to update all packages in # NOTE: this may take a while since it has to update all packages in
# nixpkgs.nodePackages # nixpkgs.nodePackages
passthru.updateScript = import ./update.nix { passthru.updateScript = import ./update.nix {
inherit (stdenv) lib; inherit lib;
inherit (src.meta) homepage; inherit (src.meta) homepage;
inherit inherit
pname pname

View File

@ -245,7 +245,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -271,7 +271,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -284,7 +284,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -303,7 +303,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -255,7 +255,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -240,7 +240,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross; inherit lib stdenv crossStageStatic libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -259,7 +259,7 @@ stdenv.mkDerivation ({
inherit inherit
(import ../common/extra-target-flags.nix { (import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic langD libcCross threadsCross; inherit lib stdenv crossStageStatic langD libcCross threadsCross;
}) })
EXTRA_FLAGS_FOR_TARGET EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET

View File

@ -39,8 +39,7 @@ assert langJava -> lib.versionOlder version "7";
let let
inherit (stdenv) inherit (stdenv)
buildPlatform hostPlatform targetPlatform buildPlatform hostPlatform targetPlatform;
lib;
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";

View File

@ -1,7 +1,7 @@
{ stdenv, crossStageStatic, langD ? false, libcCross, threadsCross }: { lib, stdenv, crossStageStatic, langD ? false, libcCross, threadsCross }:
let let
inherit (stdenv) lib hostPlatform targetPlatform; inherit (stdenv) hostPlatform targetPlatform;
in in
{ {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch { lib, stdenv, fetchurl, fetchpatch
, autoreconfHook, libgpgerror, gnupg, pkg-config, glib, pth, libassuan , autoreconfHook, libgpgerror, gnupg, pkg-config, glib, pth, libassuan
, file, which, ncurses , file, which, ncurses
, texinfo , texinfo
@ -8,7 +8,6 @@
}: }:
let let
inherit (stdenv) lib;
inherit (stdenv.hostPlatform) system; inherit (stdenv.hostPlatform) system;
in in

View File

@ -1,8 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }: { lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
let let
rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07"; rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07";
inherit (stdenv) lib;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "libsnark-pre${version}"; name = "libsnark-pre${version}";
version = lib.substring 0 8 rev; version = lib.substring 0 8 rev;

View File

@ -124,7 +124,7 @@ let
# to avoid cyclic dependencies between Qt modules. # to avoid cyclic dependencies between Qt modules.
mkDerivation = mkDerivation =
import ../mkDerivation.nix import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; } { inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenvActual.mkDerivation; stdenvActual.mkDerivation;
} }
{ inherit self srcs patches; }; { inherit self srcs patches; };

View File

@ -123,12 +123,12 @@ let
import ../qtModule.nix import ../qtModule.nix
{ {
inherit perl; inherit perl;
inherit (stdenv) lib; inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications # Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules. # to avoid cyclic dependencies between Qt modules.
mkDerivation = mkDerivation =
import ../mkDerivation.nix import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; } { inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenvActual.mkDerivation; stdenvActual.mkDerivation;
} }
{ inherit self srcs patches; }; { inherit self srcs patches; };
@ -140,7 +140,7 @@ let
mkDerivationWith = mkDerivationWith =
import ../mkDerivation.nix import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; }; { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
mkDerivation = mkDerivationWith stdenvActual.mkDerivation; mkDerivation = mkDerivationWith stdenvActual.mkDerivation;

View File

@ -103,12 +103,12 @@ let
import ../qtModule.nix import ../qtModule.nix
{ {
inherit perl; inherit perl;
inherit (stdenv) lib; inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications # Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules. # to avoid cyclic dependencies between Qt modules.
mkDerivation = mkDerivation =
import ../mkDerivation.nix import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; } { inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenvActual.mkDerivation; stdenvActual.mkDerivation;
} }
{ inherit self srcs patches; }; { inherit self srcs patches; };
@ -120,7 +120,7 @@ let
mkDerivationWith = mkDerivationWith =
import ../mkDerivation.nix import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; }; { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
mkDerivation = mkDerivationWith stdenvActual.mkDerivation; mkDerivation = mkDerivationWith stdenvActual.mkDerivation;

View File

@ -1,4 +1,4 @@
{ fetchgit, pkg-config, gettext, runCommand, makeWrapper { lib, fetchgit, pkg-config, gettext, runCommand, makeWrapper
, elfutils, kernel, gnumake, python2, python2Packages , elfutils, kernel, gnumake, python2, python2Packages
}: }:
@ -10,7 +10,6 @@ let
version = "4.1"; version = "4.1";
inherit (kernel) stdenv; inherit (kernel) stdenv;
inherit (stdenv) lib;
## stap binaries ## stap binaries
stapBuild = stdenv.mkDerivation { stapBuild = stdenv.mkDerivation {

View File

@ -132,7 +132,7 @@ in
passthru.updateScript = import ./update.nix { passthru.updateScript = import ./update.nix {
inherit writeScript coreutils gnugrep jq curl common-updater-scripts gnupg nix runtimeShell; inherit writeScript coreutils gnugrep jq curl common-updater-scripts gnupg nix runtimeShell;
inherit (stdenv) lib; inherit lib;
inherit majorVersion; inherit majorVersion;
}; };

View File

@ -1,8 +1,7 @@
{ stdenv, writeScript, fetchurl, requireFile, unzip, clang, mono, which, { lib, stdenv, writeScript, fetchurl, requireFile, unzip, clang, mono, which,
xorg, xdg-user-dirs }: xorg, xdg-user-dirs }:
let let
inherit (stdenv) lib;
deps = import ./cdn-deps.nix { inherit fetchurl; }; deps = import ./cdn-deps.nix { inherit fetchurl; };
linkDeps = writeScript "link-deps.sh" (lib.concatMapStringsSep "\n" (hash: linkDeps = writeScript "link-deps.sh" (lib.concatMapStringsSep "\n" (hash:
let prefix = lib.concatStrings (lib.take 2 (lib.stringToCharacters hash)); let prefix = lib.concatStrings (lib.take 2 (lib.stringToCharacters hash));

View File

@ -1,7 +1,6 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }: { lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
let let
inherit (stdenv) lib;
baseVersion = "0.3.1"; baseVersion = "0.3.1";
commit = "9ba85274dcc21bf8132cbe3b3dccfcb4aab57d9f"; commit = "9ba85274dcc21bf8132cbe3b3dccfcb4aab57d9f";
in in

View File

@ -1,5 +1,5 @@
{ abiCompat ? null, { abiCompat ? null,
stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages, lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
automake, autoconf, gettext, libiconv, libtool, intltool, automake, autoconf, gettext, libiconv, libtool, intltool,
freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge, freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge,
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
@ -9,7 +9,7 @@
}: }:
let let
inherit (stdenv) lib isDarwin; inherit (stdenv) isDarwin;
inherit (lib) overrideDerivation; inherit (lib) overrideDerivation;
malloc0ReturnsNullCrossFlag = lib.optional malloc0ReturnsNullCrossFlag = lib.optional

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, meson, ninja, pkg-config, gtk3, epoxy, wayland, wrapGAppsHook { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, gtk3, epoxy, wayland, wrapGAppsHook
, fetchpatch , fetchpatch
}: }:
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
}) })
]; ];
meta = let inherit (stdenv) lib; in { meta = with lib; {
description = "A graphical application for configuring displays in Wayland compositors"; description = "A graphical application for configuring displays in Wayland compositors";
homepage = "https://github.com/cyclopsian/wdisplays"; homepage = "https://github.com/cyclopsian/wdisplays";
maintainers = with lib.maintainers; [ lheckemann ma27 ]; maintainers = with lib.maintainers; [ lheckemann ma27 ];

View File

@ -3,7 +3,6 @@
, gettext, vim, bc, screen }: , gettext, vim, bc, screen }:
let let
inherit (stdenv) lib;
pythonEnv = python3.withPackages (ps: with ps; [ snack ]); pythonEnv = python3.withPackages (ps: with ps; [ snack ]);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -4,7 +4,6 @@
, libXdamage, expat }: , libXdamage, expat }:
let let
inherit (stdenv) lib;
LD_LIBRARY_PATH = lib.makeLibraryPath LD_LIBRARY_PATH = lib.makeLibraryPath
[ glib gtk2 gdk-pixbuf alsaLib nss nspr GConf cups libgcrypt dbus libXdamage expat ]; [ glib gtk2 gdk-pixbuf alsaLib nss nspr GConf cups libgcrypt dbus libXdamage expat ];
in in

View File

@ -1,4 +1,5 @@
{ stdenv { lib
, stdenv
, fetchurl , fetchurl
, wrapQtAppsHook , wrapQtAppsHook
, pcsclite , pcsclite
@ -16,8 +17,6 @@
, yubikey-personalization , yubikey-personalization
}: }:
let inherit (stdenv) lib; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "yubikey-manager-qt"; pname = "yubikey-manager-qt";
version = "1.1.5"; version = "1.1.5";

View File

@ -1,4 +1,4 @@
{ stdenv, skawarePackages { lib, stdenv, skawarePackages
# Whether to build the TLS/SSL tools and what library to use # Whether to build the TLS/SSL tools and what library to use
# acceptable values: "libressl", false # acceptable values: "libressl", false
@ -8,7 +8,6 @@
with skawarePackages; with skawarePackages;
let let
inherit (stdenv) lib;
sslSupportEnabled = sslSupport != false; sslSupportEnabled = sslSupport != false;
sslLibs = { sslLibs = {
libressl = libressl; libressl = libressl;

View File

@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
passthru = { passthru = {
tests.tor = nixosTests.tor; tests.tor = nixosTests.tor;
updateScript = import ./update.nix { updateScript = import ./update.nix {
inherit (stdenv) lib; inherit lib;
inherit inherit
writeScript writeScript
common-updater-scripts common-updater-scripts