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
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, writeText }:
{ lib, stdenv, fetchFromGitHub, writeText }:
stdenv.mkDerivation rec {
pname = "dokuwiki";
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
cp ${phpPluginsLocalConfig} $out/share/dokuwiki/conf/plugins.local.php
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Simple to use and highly versatile Open Source wiki software that doesn't require a database";
license = licenses.gpl2;
homepage = "https://www.dokuwiki.org";
@@ -1,4 +1,4 @@
{ stdenv, fetchzip, php, writeText, nixosTests }:
{ lib, stdenv, fetchzip, php, writeText, nixosTests }:
let
phpExt = php.withExtensions
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
passthru.tests = nixosTests.engelsystem;
meta = with stdenv.lib; {
meta = with lib; {
description =
"Coordinate your volunteers in teams, assign them to work shifts or let them decide for themselves when and where they want to help with what";
license = licenses.gpl2;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt4, libconfig, pkgconfig } :
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt4, libconfig, pkgconfig } :
stdenv.mkDerivation rec {
pname = "fileshelter";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
ln -s ${wt4}/share/Wt/resources $out/share/fileshelter/docroot/resources
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/epoupon/fileshelter";
description = "FileShelter is a 'one-click' file sharing web application";
maintainers = [ maintainers.willibutz ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper
, which, nodejs, mkYarnPackage, python2, nixosTests }:
mkYarnPackage rec {
@@ -61,7 +61,7 @@ mkYarnPackage rec {
passthru.tests = { inherit (nixosTests) hedgedoc; };
meta = with stdenv.lib; {
meta = with lib; {
description = "Realtime collaborative markdown notes on all platforms";
license = licenses.agpl3;
homepage = "https://hedgedoc.org";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitLab, writeText }:
{ lib, stdenv, fetchFromGitLab, writeText }:
let
localConfig = writeText "config.local.php" ''
<?php
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
cp ${localConfig} $out/lib/config.local.php
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Website permitting upload of a file in a simple way and giving a unique link to it";
license = licenses.agpl3;
homepage = "https://gitlab.com/mojo42/Jirafeau";
+2 -2
View File
@@ -1,4 +1,4 @@
{ pkgs, stdenv, fetchurl, nixosTests }:
{ pkgs, lib, stdenv, fetchurl, nixosTests }:
stdenv.mkDerivation rec {
pname = "jitsi-meet";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
single-host-smoke-test = nixosTests.jitsi-meet;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Secure, Simple and Scalable Video Conferences";
longDescription = ''
Jitsi Meet is an open-source (Apache) WebRTC JavaScript application that uses Jitsi Videobridge
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, php }:
{ lib, stdenv, fetchurl, makeWrapper, php }:
let
versions = {
@@ -97,7 +97,7 @@ let
popd > /dev/null
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A real-time web analytics application";
license = licenses.gpl3Plus;
homepage = "https://matomo.org/";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, writeText }:
{ lib, stdenv, fetchurl, makeWrapper, writeText }:
stdenv.mkDerivation rec {
pname = "mediawiki";
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "The collaborative editing software that runs Wikipedia";
license = licenses.gpl2Plus;
homepage = "https://www.mediawiki.org/";
+1 -1
View File
@@ -52,7 +52,7 @@ in stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
description =
"Free and open-source learning management system (LMS) written in PHP";
license = licenses.gpl3Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchgit }:
{ lib, stdenv, buildGoPackage, fetchgit }:
buildGoPackage rec {
pname = "morty";
@@ -14,7 +14,7 @@ buildGoPackage rec {
goDeps = ./deps.nix;
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/asciimoo/morty";
maintainers = with maintainers; [ leenaars ];
license = licenses.agpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "pgpkeyserver-lite";
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
cp -R 404.html assets favicon.ico index.html robots.txt $out
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/mattrude/pgpkeyserver-lite";
description = "A lightweight static front-end for a sks keyserver";
license = licenses.gpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip }:
{ lib, stdenv, fetchurl, unzip }:
let
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
unzip -d $out/client/apps ${togetherjs}
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Web-based kanban board";
license = licenses.osl3;
homepage = "https://restya.com";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip }:
{ lib, stdenv, fetchurl, unzip }:
stdenv.mkDerivation rec {
pname = "selfoss";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
cp -ra * $out/
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Web-based news feed (RSS/Atom) aggregator";
homepage = "https://selfoss.aditu.de";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "shaarli";
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
cp -R ./* $out
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "The personal, minimalist, super-fast, database free, bookmarking service";
license = licenses.gpl3Plus;
homepage = "https://github.com/shaarli/Shaarli";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "shiori";
@@ -15,7 +15,7 @@ buildGoModule rec {
sha256 = "13and7gh2882khqppwz3wwq44p7az4bfdfjvlnqcpqyi8xa28pmq";
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Simple bookmark manager built with Go";
homepage = "https://github.com/go-shiori/shiori";
license = licenses.mit;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "wallabag";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
cp -R * $out/
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Web page archiver";
longDescription = ''
wallabag is a self hostable application for saving web pages.
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, nixosTests }:
{ lib, stdenv, fetchurl, nixosTests }:
stdenv.mkDerivation rec {
pname = "wordpress";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
inherit (nixosTests) wordpress;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://wordpress.org";
description = "WordPress is open source software you can use to create a beautiful website, blog, or app";
license = [ licenses.gpl2 ];