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, pass, fetchFromGitHub, pythonPackages, makeWrapper, gnupg }:
|
||||
{ lib, stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper, gnupg }:
|
||||
|
||||
let
|
||||
pythonEnv = pythonPackages.python.withPackages (p: [ p.requests p.setuptools p.zxcvbn ]);
|
||||
@@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
|
||||
--prefix PYTHONPATH : "$out/lib/${pythonEnv.libPrefix}/site-packages"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pass extension for auditing your password repository.";
|
||||
homepage = "https://github.com/roddhjav/pass-audit";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, curl, findutils, gnugrep, gnused }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
install -D -m755 checkup.bash $out/lib/password-store/extensions/checkup.bash
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A pass extension to check against the Have I been pwned API to see if your passwords are publicly leaked or not";
|
||||
homepage = "https://github.com/etu/pass-checkup";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pass-genphrase";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
--replace '$EXTENSIONS' "$out/lib/password-store/extensions/"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pass extension that generates memorable passwords";
|
||||
homepage = "https://github.com/congma/pass-genphrase";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper, fetchpatch }:
|
||||
{ lib, stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper, fetchpatch }:
|
||||
|
||||
let
|
||||
pythonEnv = pythonPackages.python.withPackages (p: [
|
||||
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
|
||||
--prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pass extension for importing data from existing password managers";
|
||||
homepage = "https://github.com/roddhjav/pass-import";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, oathToolkit }:
|
||||
{ lib, stdenv, fetchFromGitHub, oathToolkit }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pass-otp";
|
||||
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
"BASHCOMPDIR=$(out)/share/bash-completion/completions"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A pass extension for managing one-time-password (OTP) tokens";
|
||||
homepage = "https://github.com/tadfisher/pass-otp";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, tomb }:
|
||||
{ lib, stdenv, fetchFromGitHub, tomb }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pass-tomb";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
--replace 'TOMB="''${PASSWORD_STORE_TOMB:-tomb}"' 'TOMB="''${PASSWORD_STORE_TOMB:-${tomb}/bin/tomb}"'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pass extension that keeps the password store encrypted inside a tomb";
|
||||
homepage = "https://github.com/roddhjav/pass-tomb";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pass-update";
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pass extension that provides an easy flow for updating passwords";
|
||||
homepage = "https://github.com/roddhjav/pass-update";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
Reference in New Issue
Block a user