From 4cddf284e96adf8e2e70e228df55ff1efd9d9649 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 22 Mar 2021 14:38:32 +0100 Subject: [PATCH] treewide: remove use of deprecated `stdenv.lib` --- pkgs/clboss/default.nix | 4 ++-- pkgs/elementsd/default.nix | 4 ++-- pkgs/hwi/default.nix | 4 +--- pkgs/hwi/ecdsa/default.nix | 5 +++-- pkgs/hwi/hidapi/default.nix | 10 +++++----- pkgs/secp256k1/default.nix | 6 ++---- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/pkgs/clboss/default.nix b/pkgs/clboss/default.nix index f7f5725..cb3eb97 100644 --- a/pkgs/clboss/default.nix +++ b/pkgs/clboss/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, curl, libev, sqlite }: +{ lib, stdenv, fetchurl, pkgconfig, curl, libev, sqlite }: let curlWithGnuTLS = curl.override { gnutlsSupport = true; sslSupport = false; }; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Automated C-Lightning Node Manager"; homepage = "https://github.com/ZmnSCPxj/clboss"; maintainers = with maintainers; [ nixbitcoin ]; diff --git a/pkgs/elementsd/default.nix b/pkgs/elementsd/default.nix index a46a1a3..1699b1e 100644 --- a/pkgs/elementsd/default.nix +++ b/pkgs/elementsd/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck +{ lib, stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck , zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, protobuf, python3, qrencode, libevent , withGui }: -with stdenv.lib; +with lib; stdenv.mkDerivation rec { pname = "elements${optionalString (!withGui) "d"}"; version = "0.18.1.9"; diff --git a/pkgs/hwi/default.nix b/pkgs/hwi/default.nix index 86d074c..2ab6ce0 100644 --- a/pkgs/hwi/default.nix +++ b/pkgs/hwi/default.nix @@ -1,6 +1,4 @@ -{ pkgs, stdenv, fetchurl, fetchFromGitHub, python3 }: - -with stdenv.lib; +{ lib, pkgs, stdenv, fetchurl, fetchFromGitHub, python3 }: let python = python3.override { diff --git a/pkgs/hwi/ecdsa/default.nix b/pkgs/hwi/ecdsa/default.nix index d9c43f5..9ab0397 100644 --- a/pkgs/hwi/ecdsa/default.nix +++ b/pkgs/hwi/ecdsa/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , pkgs @@ -18,7 +19,7 @@ buildPythonPackage rec { # Only needed for tests checkInputs = [ pkgs.openssl ]; - meta = with stdenv.lib; { + meta = with lib; { description = "ECDSA cryptographic signature library"; homepage = "https://github.com/warner/python-ecdsa"; license = licenses.mit; diff --git a/pkgs/hwi/hidapi/default.nix b/pkgs/hwi/hidapi/default.nix index cd70a7b..0d2692e 100644 --- a/pkgs/hwi/hidapi/default.nix +++ b/pkgs/hwi/hidapi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }: +{ lib, stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }: buildPythonPackage rec { pname = "hidapi"; @@ -10,18 +10,18 @@ buildPythonPackage rec { }; propagatedBuildInputs = - stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++ - stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++ + lib.optionals stdenv.isLinux [ libusb1 udev ] ++ + lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++ [ cython ]; # Fix the USB backend library lookup - postPatch = stdenv.lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.isLinux '' libusb=${libusb1.dev}/include/libusb-1.0 test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi"; homepage = "https://github.com/trezor/cython-hidapi"; # license can actually be either bsd3 or gpl3 diff --git a/pkgs/secp256k1/default.nix b/pkgs/secp256k1/default.nix index a52adb3..2f9f28f 100644 --- a/pkgs/secp256k1/default.nix +++ b/pkgs/secp256k1/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: - -let inherit (stdenv.lib) optionals; in +{ lib, stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation { pname = "secp256k1"; @@ -18,7 +16,7 @@ stdenv.mkDerivation { configureFlags = ["--enable-module-recovery" "--disable-jni" "--enable-experimental" "--enable-module-ecdh" "--enable-benchmark=no" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Optimized C library for EC operations on curve secp256k1"; homepage = "https://github.com/bitcoin-core/secp256k1"; license = with licenses; [ mit ];