From 3866fa44a7f9fae7c83e53e7eea295e1f9212055 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Sat, 21 Jan 2023 23:06:40 +0100 Subject: treewide: remove global with lib; in pkgs/{audio,blockchain,editors} --- .../blockchains/bitcoin-knots/default.nix | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'pkgs/applications/blockchains/bitcoin-knots/default.nix') diff --git a/pkgs/applications/blockchains/bitcoin-knots/default.nix b/pkgs/applications/blockchains/bitcoin-knots/default.nix index ae64247a8be..d1e41942557 100644 --- a/pkgs/applications/blockchains/bitcoin-knots/default.nix +++ b/pkgs/applications/blockchains/bitcoin-knots/default.nix @@ -23,7 +23,6 @@ , withWallet ? true }: -with lib; stdenv.mkDerivation rec { pname = if withGui then "bitcoin-knots" else "bitcoind-knots"; version = "23.0.knots20220529"; @@ -35,24 +34,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ optionals stdenv.isLinux [ util-linux ] - ++ optionals stdenv.isDarwin [ hexdump ] - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] - ++ optionals withGui [ wrapQtAppsHook ]; + ++ lib.optionals stdenv.isLinux [ util-linux ] + ++ lib.optionals stdenv.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] - ++ optionals withWallet [ db48 sqlite ] - ++ optionals withGui [ qrencode qtbase qttools ]; + ++ lib.optionals withWallet [ db48 sqlite ] + ++ lib.optionals withGui [ qrencode qtbase qttools ]; configureFlags = [ "--with-boost-libdir=${boost.out}/lib" "--disable-bench" - ] ++ optionals (!doCheck) [ + ] ++ lib.optionals (!doCheck) [ "--disable-tests" "--disable-gui-tests" - ] ++ optionals (!withWallet) [ + ] ++ lib.optionals (!withWallet) [ "--disable-wallet" - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; @@ -65,7 +64,7 @@ stdenv.mkDerivation rec { [ "LC_ALL=en_US.UTF-8" ] # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. # See also https://github.com/NixOS/nixpkgs/issues/24256 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; enableParallelBuilding = true; @@ -73,7 +72,7 @@ stdenv.mkDerivation rec { smoke-test = nixosTests.bitcoind-knots; }; - meta = { + meta = with lib; { description = "A derivative of Bitcoin Core with a collection of improvements"; homepage = "https://bitcoinknots.org/"; maintainers = with maintainers; [ prusnak mmahut ]; -- cgit 1.4.1