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, pkgconfig, intltool
|
||||
{ lib, stdenv, fetchurl, pkgconfig, intltool
|
||||
, gtk3, glib, curl, goocanvas2, gpsd
|
||||
, hamlib, wrapGAppsHook
|
||||
}:
|
||||
@@ -17,7 +17,7 @@ in stdenv.mkDerivation {
|
||||
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
|
||||
buildInputs = [ curl glib gtk3 goocanvas2 gpsd hamlib ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Real time satellite tracking and orbit prediction";
|
||||
longDescription = ''
|
||||
Gpredict is a real time satellite tracking and orbit prediction program
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, wxGTK30-gtk3,
|
||||
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, wxGTK30-gtk3,
|
||||
curl, gettext, glib, indilib, libnova, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
mv $out/bin/.phd2.bin-wrapped $out/bin/.phd2-wrapped.bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://openphdguiding.org/";
|
||||
description = "Telescope auto-guidance application";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitLab, fetchFromGitHub, pkg-config, meson, ninja,
|
||||
{ lib, stdenv, fetchFromGitLab, fetchFromGitHub, pkg-config, meson, ninja,
|
||||
git, criterion, wrapGAppsHook, gtk3, libconfig, gnuplot, opencv,
|
||||
fftwFloat, cfitsio, gsl, exiv2, curl, librtprocess, ffmpeg,
|
||||
libraw, libtiff, libpng, libjpeg, libheif, ffms
|
||||
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
cd nixbld
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.siril.org/";
|
||||
description = "Astronomical image processing tool";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, imake, gccmakedep, libXt, libXext }:
|
||||
{ lib, stdenv, fetchurl, imake, gccmakedep, libXt, libXext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xearth";
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
||||
installFlags = [ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"];
|
||||
installTargets = [ "install" "install.man" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "sets the X root window to an image of the Earth";
|
||||
homepage = "http://xplanet.org";
|
||||
longDescription =
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, fetchpatch, pkgconfig, freetype, pango, libpng, libtiff
|
||||
{lib, stdenv, fetchurl, fetchpatch, pkgconfig, freetype, pango, libpng, libtiff
|
||||
, giflib, libjpeg, netpbm}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Renders an image of the earth or other planets into the X root window";
|
||||
homepage = "http://xplanet.sourceforge.net";
|
||||
license = licenses.gpl2;
|
||||
|
||||
Reference in New Issue
Block a user