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

treewide: remove implicit use of stdenv.lib
This commit is contained in:
Sandro 2021-01-27 14:56:42 +01:00 committed by GitHub
commit 2e442062f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 35 additions and 42 deletions

View File

@ -1,9 +1,6 @@
{ stdenv, fetchurl, openssl }:
{ lib, stdenv, fetchurl, openssl }:
with stdenv;
with lib;
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "wraith";
version = "1.4.7";
src = fetchurl {
@ -25,7 +22,7 @@ mkDerivation rec {
ln -s wraith $out/bin/hub
'';
meta = {
meta = with lib; {
description = "An IRC channel management bot written purely in C/C++";
longDescription = ''
Wraith is an IRC channel management bot written purely in C/C++. It has

View File

@ -45,7 +45,7 @@ let
};
releaseRev = v: "V${v}";
fetched = import ../../../../build-support/coq/meta-fetch/default.nix
{ inherit stdenv fetchzip; }
{ inherit lib stdenv fetchzip; }
{ inherit release releaseRev; location = { owner = "coq"; repo = "coq";}; }
args.version;
version = fetched.version;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, makeWrapper, flex, bison,
{lib, stdenv, fetchurl, makeWrapper, flex, bison,
asciidoc, docbook_xml_dtd_45, docbook_xsl,
libxml2, libxslt,
python3, rcs, cvs, git,

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, python27Packages, git
{ lib, stdenv, fetchurl, makeWrapper, python27Packages, git
, docbook_xml_dtd_412, docbook_xsl, asciidoc, xmlto, pypy
, breezy ? null, cvs ? null, darcs ? null, fossil ? null
, mercurial ? null, monotone ? null, rcs ? null

View File

@ -35,7 +35,7 @@ let
"extraInstallFlags" "setCOQBIN" "mlPlugin"
"dropAttrs" "dropDerivationAttrs" "keepAttrs" ] ++ dropAttrs) keepAttrs;
fetch = import ../coq/meta-fetch/default.nix
{ inherit stdenv fetchzip; } ({
{ inherit lib stdenv fetchzip; } ({
inherit release releaseRev;
location = { inherit domain owner repo; };
} // optionalAttrs (args?fetcher) {inherit fetcher;});

View File

@ -1,5 +1,6 @@
{ stdenv, fetchzip }@args:
let lib = import ../extra-lib.nix {inherit (args.stdenv) lib;}; in
{ lib, stdenv, fetchzip }@args:
let lib' = lib; in
let lib = import ../extra-lib.nix {lib = lib';}; in
with builtins; with lib;
let
default-fetcher = {domain ? "github.com", owner ? "", repo, rev, name ? "source", sha256 ? null, ...}@args:

View File

@ -1,10 +1,11 @@
{ stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc
{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc
, version, hashes }:
with stdenv;
let
inherit (stdenv) hostPlatform;
OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
MODEL = toString hostPlatform.parsed.cpu.bits;
in mkDerivation {
in stdenv.mkDerivation {
pname = "dmd-bootstrap";
inherit version;

View File

@ -1,10 +1,11 @@
{ stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2
{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2
, version, hashes }:
with stdenv;
let
OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
inherit (stdenv) hostPlatform;
OS = if stdenv.hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
ARCH = toString hostPlatform.parsed.cpu.name;
in mkDerivation {
in stdenv.mkDerivation {
pname = "ldc-bootstrap";
inherit version;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake
{ lib, stdenv, fetchFromGitHub, cmake
, boost, python3, eigen
, icestorm, trellis
, llvmPackages
@ -12,7 +12,7 @@
let
boostPython = boost.override { python = python3; enablePython = true; };
in
with stdenv; mkDerivation rec {
stdenv.mkDerivation rec {
pname = "nextpnr";
version = "2021.01.02";

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl, libusb-compat-0_1}:
{lib, stdenv, fetchurl, libusb-compat-0_1}:
with stdenv; mkDerivation rec {
stdenv.mkDerivation rec {
name = "libftdi-0.20";
src = fetchurl {
@ -14,7 +14,7 @@ with stdenv; mkDerivation rec {
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
configureFlags = lib.optional (!isDarwin) "--with-async-mode";
configureFlags = lib.optional (!stdenv.isDarwin) "--with-async-mode";
# allow async mode. from ubuntu. see:
# https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff

View File

@ -4,7 +4,7 @@
}:
with lib;
let fetched = import ../../../build-support/coq/meta-fetch/default.nix
{inherit stdenv fetchzip; } ({
{inherit lib stdenv fetchzip; } ({
release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is";
release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5";
releaseRev = v: "v${v}";

View File

@ -1,10 +1,8 @@
{ stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
{ lib, stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
, python, pkg-config, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
, libpcap, CoreAudioKit, ForceFeedback
, installShellFiles }:
with stdenv;
let
majorVersion = "0";
minorVersion = "226";

View File

@ -1,4 +1,4 @@
{ stdenv, runCommand, fetchurl
{ lib, stdenv, runCommand, fetchurl
, fetchpatch
, ensureNewerSourcesHook
, cmake, pkg-config
@ -36,7 +36,6 @@
# We must have one crypto library
assert cryptopp != null || (nss != null && nspr != null);
with stdenv; with lib;
let
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
@ -76,7 +75,7 @@ let
none = [ ];
};
getMeta = description: {
getMeta = description: with lib; {
homepage = "https://ceph.com/";
inherit description;
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
@ -148,11 +147,11 @@ in rec {
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
malloc zlib openldap lttng-ust babeltrace gperf gtest cunit
snappy rocksdb lz4 oathToolkit leveldb libnl libcap_ng rdkafka
] ++ optionals stdenv.isLinux [
] ++ lib.optionals stdenv.isLinux [
linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs
# ceph 14
rdma-core rabbitmq-c
] ++ optionals hasRadosgw [
] ++ lib.optionals hasRadosgw [
optFcgi optExpat optCurl optFuse optLibedit
];

View File

@ -1,9 +1,7 @@
{ 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 }:
{ 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 }:
# Common attributes of irods packages
with stdenv;
{
nativeBuildInputs = [ autoconf automake cmake gnumake help2man texinfo which gcc ];
buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos boost libcxx catch2 ];
@ -35,7 +33,7 @@ with stdenv;
"
'';
meta = {
meta = with lib; {
description = "Integrated Rule-Oriented Data System (iRODS)";
longDescription = ''
The Integrated Rule-Oriented Data System (iRODS) is open source data management

View File

@ -1,13 +1,11 @@
{ 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 }:
with stdenv;
{ 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 }:
let
avro-cpp=avro-cpp_llvm;
in
let
common = import ./common.nix {
inherit stdenv bzip2 zlib autoconf automake cmake gnumake
inherit lib stdenv bzip2 zlib autoconf automake cmake gnumake
help2man texinfo libtool cppzmq libarchive jansson
zeromq openssl pam libiodbc kerberos gcc libcxx
boost avro-cpp which catch2;
@ -83,7 +81,7 @@ in rec {
'';
cmakeFlags = common.cmakeFlags ++ [
"-DCMAKE_INSTALL_PREFIX=${out}"
"-DCMAKE_INSTALL_PREFIX=${stdenv.out}"
"-DIRODS_DIR=${irods}/lib/irods/cmake"
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
"-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"