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
|
||||
{ lib, stdenv, fetchurl
|
||||
, xorgproto, motif, libX11, libXt, libXpm, bison
|
||||
, flex, automake, autoconf, libtool, runtimeShell
|
||||
}:
|
||||
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
|
||||
chmod +x $out/bin/alliance-uninstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Complete set of free CAD tools and portable libraries for VLSI design";
|
||||
homepage = "http://www-asim.lip6.fr/recherche/alliance/";
|
||||
license = with licenses; gpl2Plus;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
, gtk2-x11
|
||||
, makeWrapper
|
||||
, pango
|
||||
, stdenv
|
||||
, lib, stdenv
|
||||
, xorg
|
||||
}:
|
||||
|
||||
@@ -22,7 +22,7 @@ let
|
||||
|
||||
name = "${toolName}-${version}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://bitscope.com/software/";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, fparser
|
||||
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A C++ library to describe geometrical objects";
|
||||
homepage = "https://github.com/thliebig/CSXCAD";
|
||||
license = licenses.lgpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeDesktopItem, unzip, bash, jre8 }:
|
||||
{ lib, stdenv, fetchurl, makeDesktopItem, unzip, bash, jre8 }:
|
||||
|
||||
let
|
||||
pname = "diylc";
|
||||
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
||||
chmod +x $out/bin/diylc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Multi platform circuit layout and schematic drawing tool";
|
||||
homepage = "https://bancika.github.io/diy-layout-creator/";
|
||||
changelog = "https://github.com/bancika/diy-layout-creator/releases";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, pkgconfig, autoreconfHook,
|
||||
{ lib, stdenv, pkgconfig, autoreconfHook,
|
||||
glib, libzip, libserialport, check, libusb1, libftdi,
|
||||
systemd, alsaLib, dsview
|
||||
}:
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
||||
glib libzip libserialport libusb1 libftdi systemd check alsaLib
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A fork of the sigrok library for usage with DSView";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, pkgconfig, autoreconfHook,
|
||||
{ lib, stdenv, pkgconfig, autoreconfHook,
|
||||
glib, check, python3, dsview
|
||||
}:
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
python3 glib check
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A fork of the sigrokdecode library for usage with DSView";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, mkDerivation, fetchurl, makeDesktopItem
|
||||
{ lib, stdenv, mkDerivation, fetchurl, makeDesktopItem
|
||||
, libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb
|
||||
, libGL, glib, nss, nspr, expat, alsaLib
|
||||
, qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine
|
||||
@@ -70,7 +70,7 @@ let
|
||||
ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/icons/eagle.png
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)";
|
||||
homepage = "https://www.autodesk.com/products/eagle/overview";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeDesktopItem, patchelf, zlib, freetype, fontconfig
|
||||
{ lib, stdenv, fetchurl, makeDesktopItem, patchelf, zlib, freetype, fontconfig
|
||||
, openssl, libXrender, libXrandr, libXcursor, libX11, libXext, libXi
|
||||
, libxcb, cups, xkeyboardconfig, runtimeShell
|
||||
}:
|
||||
@@ -87,7 +87,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s "$out/eagle-${version}/bin/eagleicon50.png" "$out"/share/icons/eagle.png
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Schematic editor and PCB layout tool from CadSoft";
|
||||
homepage = "http://www.cadsoftusa.com/";
|
||||
license = licenses.unfree;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "C++ Library for Evaluating Mathematical Functions";
|
||||
homepage = "https://github.com/thliebig/fparser";
|
||||
license = licenses.lgpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, guile, gtk2, flex, gawk, perl }:
|
||||
{ lib, stdenv, fetchurl, pkgconfig, guile, gtk2, flex, gawk, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "geda";
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ guile gtk2 flex gawk perl ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Full GPL'd suite of Electronic Design Automation tools";
|
||||
homepage = "http://www.geda-project.org/";
|
||||
maintainers = with maintainers; [ pjones ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchgit, pkgconfig, gettext, libtool, automake, autoconf, cairo, gtk2, autoreconfHook }:
|
||||
{ lib, stdenv, fetchgit, pkgconfig, gettext, libtool, automake, autoconf, cairo, gtk2, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gerbv";
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
|
||||
configureFlags = ["--disable-update-desktop-database"];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A Gerber (RS-274X) viewer";
|
||||
homepage = "http://gerbv.geda-project.org/";
|
||||
maintainers = with maintainers; [ mog ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, python3Packages
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, python3Packages
|
||||
, boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook
|
||||
, fmt, graphviz, llvmPackages ? null
|
||||
}:
|
||||
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||
# the qt mkDerivation - the latter forcibly overrides this.
|
||||
cmakeBuildType = "MinSizeRel";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A comprehensive reverse engineering and manipulation framework for gate-level netlists";
|
||||
homepage = "https://github.com/emsec/hal";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, bison
|
||||
, flex
|
||||
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Import Hyperlynx Boardsim files to openEMS, an open source 3D full-wave electromagnetic field solver";
|
||||
homepage = "https://github.com/koendv/hyp2mat";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, cmake
|
||||
, gettext
|
||||
, src
|
||||
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
|
||||
pname = "kicad-i18n";
|
||||
|
||||
nativeBuildInputs = [ cmake gettext ];
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
wrapQtApp $out/bin/librepcb
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A free EDA software to develop printed circuit boards";
|
||||
homepage = "https://librepcb.org/";
|
||||
maintainers = with maintainers; [ luz thoughtpolice ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, python3
|
||||
, m4
|
||||
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
./0002-fix-format-security.patch
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "VLSI layout tool written in Tcl";
|
||||
homepage = "http://opencircuitdesign.com/magic/";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, bison
|
||||
, flex
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [ "--enable-x" "--with-x" "--with-readline" "--enable-xspice" "--enable-cider" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "The Next Generation Spice (Electronic Circuit Simulator)";
|
||||
homepage = "http://ngspice.sourceforge.net";
|
||||
license = with licenses; [ "BSD" gpl2 ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, pkgconfig
|
||||
, gtk2
|
||||
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||
"--disable-update-desktop-database"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Printed Circuit Board editor";
|
||||
homepage = "http://pcb.geda-project.org/";
|
||||
maintainers = with maintainers; [ mog ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ lib, stdenv, fetchurl
|
||||
, perl, flex, bison
|
||||
}:
|
||||
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
doCheck = false;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fast and robust (System)Verilog simulator/compiler";
|
||||
homepage = "https://www.veripool.org/wiki/verilator";
|
||||
license = licenses.lgpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoconf
|
||||
, bison
|
||||
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Icarus Verilog compiler";
|
||||
homepage = "http://iverilog.icarus.com/"; # https does not work
|
||||
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, bison
|
||||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
cp src/vhd2vl $out/bin/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "VHDL to Verilog converter";
|
||||
homepage = "https://github.com/ldoolitt/vhd2vl";
|
||||
license = licenses.gpl2Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, autoreconfHook, automake, pkgconfig
|
||||
{ lib, stdenv, fetchurl, autoreconfHook, automake, pkgconfig
|
||||
, cairo, ghostscript, ngspice, tcl, tk, xorg, zlib }:
|
||||
|
||||
let
|
||||
@@ -25,7 +25,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
buildInputs = with xorg; [ cairo ghostscript libSM libXt libICE libX11 libXpm tcl tk zlib ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Generic drawing program tailored to circuit diagrams";
|
||||
homepage = "http://opencircuitdesign.com/xcircuit";
|
||||
license = licenses.gpl2;
|
||||
|
||||
Reference in New Issue
Block a user