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, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
|
||||
{ lib, stdenv, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wee-slack";
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/wee-slack/wee-slack";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ willibutz ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "weechat-autosort";
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
install -D autosort.py $out/share/autosort.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Autosort is a weechat script to automatically or manually keep your buffers sorted";
|
||||
homepage = "https://github.com/de-vri-es/weechat-autosort";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, curl, fetchFromGitHub, cjson, olm, luaffi }:
|
||||
{ lib, stdenv, curl, fetchFromGitHub, cjson, olm, luaffi }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "weechat-matrix-bridge-2018-11-19";
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
|
||||
cp ${luaffi}/lib/lua/${luaffi.lua.luaversion}/ffi.so $out/lib/ffi.so
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A WeeChat script in Lua that implements the matrix.org chat protocol";
|
||||
homepage = "https://github.com/torhve/weechat-matrix-protocol-script";
|
||||
maintainers = with maintainers; [ ];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ buildPythonPackage
|
||||
, stdenv
|
||||
, lib, stdenv
|
||||
, python
|
||||
, fetchFromGitHub
|
||||
, pyopenssl
|
||||
@@ -71,7 +71,7 @@ in buildPythonPackage {
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A Python plugin for Weechat that lets Weechat communicate over the Matrix protocol";
|
||||
homepage = "https://github.com/poljar/weechat-matrix";
|
||||
license = licenses.isc;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, libnotify }:
|
||||
{ lib, stdenv, fetchFromGitHub, libnotify }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "weechat-notify-send";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
--replace "'notify-send'" "'${libnotify}/bin/notify-send'"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A WeeChat script that sends highlight and message notifications through notify-send";
|
||||
homepage = "https://github.com/s3rvac/weechat-notify-srnd";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, python3Packages, gmp }:
|
||||
{ lib, stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, python3Packages, gmp }:
|
||||
|
||||
let
|
||||
# pure-python-otr (potr) requires an older version of pycrypto, which is
|
||||
@@ -61,7 +61,7 @@ in stdenv.mkDerivation rec {
|
||||
cp weechat_otr.py $out/share/weechat_otr.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/mmb/weechat-otr";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
|
||||
Reference in New Issue
Block a user