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:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, openssl, pkgconfig, ronn, rustPlatform }:
|
||||
{ lib, stdenv, fetchFromGitHub, openssl, pkgconfig, ronn, rustPlatform }:
|
||||
|
||||
let
|
||||
blake3-src = fetchFromGitHub {
|
||||
@@ -36,7 +36,7 @@ in rustPlatform.buildRustPackage rec {
|
||||
make -f nix/Makefile post-install
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Instant startup time for nix-shell";
|
||||
homepage = "https://github.com/xzfc/cached-nix-shell";
|
||||
license = with licenses; [ unlicense /* or */ mit ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dnadd";
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/joelancaster/dnadd";
|
||||
description = "Adds packages declaratively on the command line";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, darwin }:
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "manix";
|
||||
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "0f2q3bj1cmpbma0fjhc2lc92j4al78fhrx3yc37kmbgzaza0yan5";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A Fast Documentation Searcher for Nix";
|
||||
homepage = "https://github.com/mlvzk/manix";
|
||||
license = [ licenses.mpl20 ];
|
||||
|
||||
@@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Serve NAR file contents via HTTP";
|
||||
homepage = "https://github.com/numtide/nar-serve";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, glib, gtk3, wrapGAppsHook }:
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, glib, gtk3, wrapGAppsHook }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nix-query-tree-viewer";
|
||||
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "1pbyi7knqmqxbpi3jhl492is9zkaxdpdnmbm11nqwc1nvvbjblzc";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "GTK viewer for the output of `nix store --query --tree`";
|
||||
homepage = "https://github.com/cdepillabout/nix-query-tree-viewer";
|
||||
license = with licenses; [ mit ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, haskellPackages, fetchFromGitHub }:
|
||||
{ lib, stdenv, haskellPackages, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "nix-script";
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
ln -s $out/bin/nix-script $out/bin/nix-scripti
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A shebang for running inside nix-shell";
|
||||
homepage = "https://github.com/bennofs/nix-script";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, darwin }:
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nixdoc";
|
||||
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "1vamwynkbnffs8ryr2zb1a41cymjvr8zzh1bifyh9hpkx2k11rs3";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Generate documentation for Nix functions";
|
||||
homepage = "https://github.com/tazjin/nixdoc";
|
||||
license = [ licenses.gpl3 ];
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
--prefix PATH : ${lib.makeBinPath [ jq coreutils findutils nix ] }
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Collection of image builders";
|
||||
homepage = "https://github.com/nix-community/nixos-generators";
|
||||
license = licenses.mit;
|
||||
|
||||
Reference in New Issue
Block a user