lol

Merge pull request #110924 from siraben/stdenv-lib-implicit

treewide: remove implicit use of stdenv.lib

authored by

Sandro and committed by
GitHub
2e442062 18e2e99c

+35 -42
+3 -6
pkgs/applications/networking/irc/wraith/default.nix
··· 1 - { stdenv, fetchurl, openssl }: 1 + { lib, stdenv, fetchurl, openssl }: 2 2 3 - with stdenv; 4 - with lib; 5 - 6 - mkDerivation rec { 3 + stdenv.mkDerivation rec { 7 4 pname = "wraith"; 8 5 version = "1.4.7"; 9 6 src = fetchurl { ··· 25 22 ln -s wraith $out/bin/hub 26 23 ''; 27 24 28 - meta = { 25 + meta = with lib; { 29 26 description = "An IRC channel management bot written purely in C/C++"; 30 27 longDescription = '' 31 28 Wraith is an IRC channel management bot written purely in C/C++. It has
+1 -1
pkgs/applications/science/logic/coq/default.nix
··· 45 45 }; 46 46 releaseRev = v: "V${v}"; 47 47 fetched = import ../../../../build-support/coq/meta-fetch/default.nix 48 - { inherit stdenv fetchzip; } 48 + { inherit lib stdenv fetchzip; } 49 49 { inherit release releaseRev; location = { owner = "coq"; repo = "coq";}; } 50 50 args.version; 51 51 version = fetched.version;
+1 -1
pkgs/applications/version-management/cvs-fast-export/default.nix
··· 1 - {stdenv, fetchurl, makeWrapper, flex, bison, 1 + {lib, stdenv, fetchurl, makeWrapper, flex, bison, 2 2 asciidoc, docbook_xml_dtd_45, docbook_xsl, 3 3 libxml2, libxslt, 4 4 python3, rcs, cvs, git,
+1 -1
pkgs/applications/version-management/reposurgeon/default.nix
··· 1 - { stdenv, fetchurl, makeWrapper, python27Packages, git 1 + { lib, stdenv, fetchurl, makeWrapper, python27Packages, git 2 2 , docbook_xml_dtd_412, docbook_xsl, asciidoc, xmlto, pypy 3 3 , breezy ? null, cvs ? null, darcs ? null, fossil ? null 4 4 , mercurial ? null, monotone ? null, rcs ? null
+1 -1
pkgs/build-support/coq/default.nix
··· 35 35 "extraInstallFlags" "setCOQBIN" "mlPlugin" 36 36 "dropAttrs" "dropDerivationAttrs" "keepAttrs" ] ++ dropAttrs) keepAttrs; 37 37 fetch = import ../coq/meta-fetch/default.nix 38 - { inherit stdenv fetchzip; } ({ 38 + { inherit lib stdenv fetchzip; } ({ 39 39 inherit release releaseRev; 40 40 location = { inherit domain owner repo; }; 41 41 } // optionalAttrs (args?fetcher) {inherit fetcher;});
+3 -2
pkgs/build-support/coq/meta-fetch/default.nix
··· 1 - { stdenv, fetchzip }@args: 2 - let lib = import ../extra-lib.nix {inherit (args.stdenv) lib;}; in 1 + { lib, stdenv, fetchzip }@args: 2 + let lib' = lib; in 3 + let lib = import ../extra-lib.nix {lib = lib';}; in 3 4 with builtins; with lib; 4 5 let 5 6 default-fetcher = {domain ? "github.com", owner ? "", repo, rev, name ? "source", sha256 ? null, ...}@args:
+4 -3
pkgs/development/compilers/dmd/binary.nix
··· 1 - { stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc 1 + { lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc 2 2 , version, hashes }: 3 - with stdenv; 3 + 4 4 let 5 + inherit (stdenv) hostPlatform; 5 6 OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; 6 7 MODEL = toString hostPlatform.parsed.cpu.bits; 7 - in mkDerivation { 8 + in stdenv.mkDerivation { 8 9 pname = "dmd-bootstrap"; 9 10 inherit version; 10 11
+5 -4
pkgs/development/compilers/ldc/binary.nix
··· 1 - { stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2 1 + { lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2 2 2 , version, hashes }: 3 - with stdenv; 3 + 4 4 let 5 - OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; 5 + inherit (stdenv) hostPlatform; 6 + OS = if stdenv.hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; 6 7 ARCH = toString hostPlatform.parsed.cpu.name; 7 - in mkDerivation { 8 + in stdenv.mkDerivation { 8 9 pname = "ldc-bootstrap"; 9 10 inherit version; 10 11
+2 -2
pkgs/development/compilers/nextpnr/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake 1 + { lib, stdenv, fetchFromGitHub, cmake 2 2 , boost, python3, eigen 3 3 , icestorm, trellis 4 4 , llvmPackages ··· 12 12 let 13 13 boostPython = boost.override { python = python3; enablePython = true; }; 14 14 in 15 - with stdenv; mkDerivation rec { 15 + stdenv.mkDerivation rec { 16 16 pname = "nextpnr"; 17 17 version = "2021.01.02"; 18 18
+3 -3
pkgs/development/libraries/libftdi/default.nix
··· 1 - {stdenv, fetchurl, libusb-compat-0_1}: 1 + {lib, stdenv, fetchurl, libusb-compat-0_1}: 2 2 3 - with stdenv; mkDerivation rec { 3 + stdenv.mkDerivation rec { 4 4 name = "libftdi-0.20"; 5 5 6 6 src = fetchurl { ··· 14 14 15 15 # Hack to avoid TMPDIR in RPATHs. 16 16 preFixup = ''rm -rf "$(pwd)" ''; 17 - configureFlags = lib.optional (!isDarwin) "--with-async-mode"; 17 + configureFlags = lib.optional (!stdenv.isDarwin) "--with-async-mode"; 18 18 19 19 # allow async mode. from ubuntu. see: 20 20 # https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff
+1 -1
pkgs/development/ocaml-modules/elpi/default.nix
··· 4 4 }: 5 5 with lib; 6 6 let fetched = import ../../../build-support/coq/meta-fetch/default.nix 7 - {inherit stdenv fetchzip; } ({ 7 + {inherit lib stdenv fetchzip; } ({ 8 8 release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is"; 9 9 release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5"; 10 10 releaseRev = v: "v${v}";
+1 -3
pkgs/misc/emulators/mame/default.nix
··· 1 - { stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper 1 + { lib, stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper 2 2 , python, pkg-config, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama 3 3 , libpcap, CoreAudioKit, ForceFeedback 4 4 , installShellFiles }: 5 - 6 - with stdenv; 7 5 8 6 let 9 7 majorVersion = "0";
+4 -5
pkgs/tools/filesystems/ceph/default.nix
··· 1 - { stdenv, runCommand, fetchurl 1 + { lib, stdenv, runCommand, fetchurl 2 2 , fetchpatch 3 3 , ensureNewerSourcesHook 4 4 , cmake, pkg-config ··· 36 36 # We must have one crypto library 37 37 assert cryptopp != null || (nss != null && nspr != null); 38 38 39 - with stdenv; with lib; 40 39 let 41 40 shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null; 42 41 ··· 76 75 none = [ ]; 77 76 }; 78 77 79 - getMeta = description: { 78 + getMeta = description: with lib; { 80 79 homepage = "https://ceph.com/"; 81 80 inherit description; 82 81 license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ]; ··· 148 147 boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3 149 148 malloc zlib openldap lttng-ust babeltrace gperf gtest cunit 150 149 snappy rocksdb lz4 oathToolkit leveldb libnl libcap_ng rdkafka 151 - ] ++ optionals stdenv.isLinux [ 150 + ] ++ lib.optionals stdenv.isLinux [ 152 151 linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs 153 152 # ceph 14 154 153 rdma-core rabbitmq-c 155 - ] ++ optionals hasRadosgw [ 154 + ] ++ lib.optionals hasRadosgw [ 156 155 optFcgi optExpat optCurl optFuse optLibedit 157 156 ]; 158 157
+2 -4
pkgs/tools/filesystems/irods/common.nix
··· 1 - { stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }: 1 + { lib, stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }: 2 2 3 3 # Common attributes of irods packages 4 - 5 - with stdenv; 6 4 7 5 { 8 6 nativeBuildInputs = [ autoconf automake cmake gnumake help2man texinfo which gcc ]; ··· 35 33 " 36 34 ''; 37 35 38 - meta = { 36 + meta = with lib; { 39 37 description = "Integrated Rule-Oriented Data System (iRODS)"; 40 38 longDescription = '' 41 39 The Integrated Rule-Oriented Data System (iRODS) is open source data management
+3 -5
pkgs/tools/filesystems/irods/default.nix
··· 1 - { stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl , pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }: 2 - 3 - with stdenv; 1 + { lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl , pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }: 4 2 5 3 let 6 4 avro-cpp=avro-cpp_llvm; 7 5 in 8 6 let 9 7 common = import ./common.nix { 10 - inherit stdenv bzip2 zlib autoconf automake cmake gnumake 8 + inherit lib stdenv bzip2 zlib autoconf automake cmake gnumake 11 9 help2man texinfo libtool cppzmq libarchive jansson 12 10 zeromq openssl pam libiodbc kerberos gcc libcxx 13 11 boost avro-cpp which catch2; ··· 83 81 ''; 84 82 85 83 cmakeFlags = common.cmakeFlags ++ [ 86 - "-DCMAKE_INSTALL_PREFIX=${out}" 84 + "-DCMAKE_INSTALL_PREFIX=${stdenv.out}" 87 85 "-DIRODS_DIR=${irods}/lib/irods/cmake" 88 86 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib" 89 87 "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"