treewide: with stdenv.lib; in meta -> with lib;

Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
This commit is contained in:
Profpatsch
2021-01-11 10:38:22 +01:00
parent e87aef06e0
commit 4a7f99d55d
6869 changed files with 13585 additions and 13580 deletions
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, git, doxygen, graphviz
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, git, doxygen, graphviz
, boost, miniupnpc, openssl, unbound, cppzmq
, zeromq, pcsclite, readline, libsodium
}:
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
hardeningDisable = [ "fortify" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Private, secure, untraceable currency";
homepage = "http://www.aeon.cash/";
license = licenses.bsd3;
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitHub
, pkgconfig
, autoreconfHook
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-incompatible-bdb"
"--with-boost-libdir=${boost.out}/lib" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "An enhanced Bitcoin node software";
homepage = "https://bitcoinknots.org/";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitHub
, pkgconfig
, libtool
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
"--enable-keccak"
"--enable-bflsc"];
meta = with stdenv.lib; {
meta = with lib; {
description = "CPU/GPU miner in c for bitcoin";
homepage = "https://github.com/ckolivas/cgminer";
license = licenses.gpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, jre }:
{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "ergo";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
makeWrapper ${jre}/bin/java $out/bin/ergo --add-flags "-jar $src"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Open protocol that implements modern scientific ideas in the blockchain area";
homepage = "https://ergoplatform.org/en/";
license = licenses.cc0;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
{ lib, stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "ethabi";
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1hx8qw51rl7sn9jmnclw0hc4rx619hf78hpaih5mvny3k0zgiwpm";
meta = with stdenv.lib; {
meta = with lib; {
description = "Ethereum function call encoding (ABI) utility";
homepage = "https://github.com/ethcore/ethabi/";
maintainers = [ maintainers.dbrock ];
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
$out/Exodus
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.exodus.io/";
description = "Top-rated cryptocurrency wallet with Trezor integration and built-in Exchange";
license = licenses.unfree;
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
{ lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
buildGoModule rec {
pname = "go-ethereum";
@@ -37,7 +37,7 @@ buildGoModule rec {
propagatedBuildInputs =
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol";
license = with licenses; [ lgpl3 gpl3 ];
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeDesktopItem, appimageTools, imagemagick }:
{ lib, stdenv, fetchurl, makeDesktopItem, appimageTools, imagemagick }:
let
pname = "ledger-live-desktop";
@@ -26,7 +26,7 @@ in appimageTools.wrapType2 rec {
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Wallet app for Ledger Nano S and Ledger Blue";
homepage = "https://www.ledger.com/live";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch
{ lib, stdenv, fetchFromGitHub, fetchpatch
, cmake, pkgconfig
, boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "source" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Private, secure, untraceable currency";
homepage = "https://getmonero.org/";
license = licenses.bsd3;
@@ -1,4 +1,4 @@
{ stdenv, pkgs, fetchurl, makeWrapper, nodePackages }:
{ lib, stdenv, pkgs, fetchurl, makeWrapper, nodePackages }:
let
@@ -38,7 +38,7 @@ in stdenv.mkDerivation rec {
ln -s $out/share/parity-ui/parity-ui $out/bin/parity-ui
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "UI for Parity. Fast, light, robust Ethereum implementation";
homepage = "http://parity.io";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ fetchFromGitHub, stdenv, pkgconfig, autoreconfHook, wrapQtAppsHook ? null
{ fetchFromGitHub, lib, stdenv, pkgconfig, autoreconfHook, wrapQtAppsHook ? null
, openssl, db48, boost, zlib, miniupnpc, gmp
, qrencode, glib, protobuf, yasm, libevent
, util-linux, qtbase ? null, qttools ? null
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
$out/bin/test_pivx
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "An open source crypto-currency focused on fast private transactions";
longDescription = ''
PIVX is an MIT licensed, open source, blockchain-based cryptocurrency with
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildGoPackage, git, which, removeReferencesTo, go }:
{ lib, stdenv, fetchFromGitHub, buildGoPackage, git, which, removeReferencesTo, go }:
buildGoPackage rec {
pname = "quorum";
@@ -31,7 +31,7 @@ buildGoPackage rec {
find $out -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${go} '{}' +
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A permissioned implementation of Ethereum supporting data privacy";
homepage = "https://www.goquorum.com/";
license = licenses.lgpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, autoconf, libtool, automake, pkgconfig, git
{ lib, stdenv, fetchgit, autoconf, libtool, automake, pkgconfig, git
, bison, flex, postgresql }:
let
@@ -31,7 +31,7 @@ in stdenv.mkDerivation {
./autogen.sh
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Implements the Stellar Consensus Protocol, a federated consensus protocol";
longDescription = ''
Stellar-core is the backbone of the Stellar network. It maintains a
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, jre }:
{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "tessera";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
makeWrapper ${jre}/bin/java $out/bin/tessera --add-flags "-jar $src"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Enterprise Implementation of Quorum's transaction manager";
homepage = "https://github.com/jpmorganchase/tessera";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "turbo-geth";
@@ -20,7 +20,7 @@ buildGoModule rec {
"cmd/rpcdaemon"
];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/ledgerwatch/turbo-geth/";
description = "Ethereum node and geth fork focused on scalability and modularity";
license = with licenses; [ lgpl3 gpl3 ];
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitHub
, fetchurl
, makeWrapper
@@ -90,7 +90,7 @@ stdenv.mkDerivation rec {
# If we don't disable stripping the executable fails to start with segfault
dontStrip = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "Backend for the Wasabi Wallet";
homepage = "https://wasabiwallet.io/";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchurl
, makeDesktopItem
, curl
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
cp -v $desktopItem/share/applications/* $out/share/applications
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Privacy focused Bitcoin wallet";
homepage = "https://wasabiwallet.io/";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, callPackage, makeWrapper, makeDesktopItem
{ lib, stdenv, fetchFromGitHub, callPackage, makeWrapper, makeDesktopItem
, nodejs, yarn, electron_7, jre8, tor }:
let
@@ -94,7 +94,7 @@ in stdenv.mkDerivation rec {
outputHash = stdenv.lib.fakeSha256;
});
meta = with stdenv.lib; {
meta = with lib; {
description = "Desktop GUI for Whirlpool by Samourai-Wallet";
homepage = https://www.samouraiwallet.com/whirlpool;
license = licenses.unlicense;