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, fetchurl, nodejs }:
|
||||
{ lib, stdenv, fetchurl, nodejs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.10.0";
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
mv $out/bin/cli.js $out/bin/csslint
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Checks CSS for syntax errors and other problems";
|
||||
longDescription = ''
|
||||
CSSLint is a tool to help point out problems with your CSS
|
||||
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/opt/cypress/Cypress $out/bin/Cypress
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fast, easy and reliable testing for anything that runs in a browser";
|
||||
homepage = "https://www.cypress.io";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, rust
|
||||
@@ -64,7 +64,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
passthru.updateScript = ./update/update.ts;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://deno.land/";
|
||||
changelog = "${src.meta.homepage}/releases/tag/v${version}";
|
||||
description = "A secure runtime for JavaScript and TypeScript";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, unzip
|
||||
{ lib, stdenv, fetchurl, unzip
|
||||
# If jdk is null, require JAVA_HOME in runtime environment, else store
|
||||
# JAVA_HOME=${jdk.home} into grails.
|
||||
, jdk ? null
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Full stack, web application framework for the JVM";
|
||||
longDescription = ''
|
||||
Grails is an Open Source, full stack, web application framework for the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, makeWrapper, fetchurl, dpkg, alsaLib, atk, cairo, cups, dbus, expat
|
||||
{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsaLib, atk, cairo, cups, dbus, expat
|
||||
, fontconfig, freetype, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, gtk2
|
||||
, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook
|
||||
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
|
||||
@@ -81,7 +81,7 @@ in stdenv.mkDerivation rec {
|
||||
wrapProgram "$out/bin/insomnia" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://insomnia.rest/";
|
||||
description = "The most intuitive cross-platform REST API Client";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, pkgconfig, fetchFromGitHub, libbsd }:
|
||||
{ lib, stdenv, pkgconfig, fetchFromGitHub, libbsd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kcgi";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://kristaps.bsd.lv/kcgi";
|
||||
description = "Minimal CGI and FastCGI library for C/C++";
|
||||
license = licenses.isc;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, openssl, curl, postgresql, yajl }:
|
||||
{ lib, stdenv, fetchFromGitHub, openssl, curl, postgresql, yajl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kore";
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "An easy to use web application framework for C";
|
||||
homepage = "https://kore.io";
|
||||
license = licenses.isc;
|
||||
|
||||
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://zeit.co/now";
|
||||
description = "The Command Line Interface for Now - Global Serverless Deployments";
|
||||
license = licenses.asl20;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeDesktopItem, wrapGAppsHook
|
||||
{ lib, stdenv, fetchurl, makeDesktopItem, wrapGAppsHook
|
||||
, atk, at-spi2-atk, at-spi2-core, alsaLib, cairo, cups, dbus, expat, gdk-pixbuf, glib, gtk3
|
||||
, freetype, fontconfig, nss, nspr, pango, udev, libuuid, libX11, libxcb, libXi
|
||||
, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes
|
||||
@@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.getpostman.com";
|
||||
description = "API Development Environment";
|
||||
license = licenses.postman;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
{ lib, stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "shopify-themekit";
|
||||
@@ -15,7 +15,7 @@ buildGoPackage rec {
|
||||
sha256 = "1780h33mf2h2lv6mr4xx3shfvsabr7w138yb59vvdgvjng9wjkg0";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A command line tool for shopify themes";
|
||||
homepage = "https://shopify.github.io/themekit/";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, meson, ninja, pkgconfig, fetchFromGitHub, glib, vala, ctpl
|
||||
{ lib, stdenv, meson, ninja, pkgconfig, fetchFromGitHub, glib, vala, ctpl
|
||||
, libgee, libsoup, fcgi }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ meson ninja pkgconfig ];
|
||||
buildInputs = [ glib vala ctpl libgee libsoup fcgi ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/valum-framework/valum";
|
||||
description = "Web micro-framework written in Vala";
|
||||
license = licenses.lgpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, perlPackages, ncurses, lynx, makeWrapper }:
|
||||
{ lib, stdenv, fetchurl, perlPackages, ncurses, lynx, makeWrapper }:
|
||||
|
||||
perlPackages.buildPerlPackage {
|
||||
pname = "wml";
|
||||
@@ -55,7 +55,7 @@ perlPackages.buildPerlPackage {
|
||||
|
||||
installTargets = [ "install" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.shlomifish.org/open-source/projects/website-meta-language/";
|
||||
description = "Off-line HTML generation toolkit for Unix";
|
||||
license = licenses.gpl2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ brotli, cmake, pkgconfig, fetchFromGitHub, stdenv
|
||||
{ brotli, cmake, pkgconfig, fetchFromGitHub, lib, stdenv
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
sed 's@^if (NOT BUILD_SHARED_LIBS)$@if (TRUE)@g' -i CMakeLists.txt
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Webfont compression reference code";
|
||||
homepage = "https://github.com/google/woff2";
|
||||
license = licenses.mit;
|
||||
|
||||
Reference in New Issue
Block a user