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, automake, autoconf }:
|
||||
{ lib, stdenv, fetchurl, automake, autoconf }:
|
||||
|
||||
let
|
||||
version = "2.0.0";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
|
||||
incdir = "/avr/include";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "a C runtime library for AVR microcontrollers";
|
||||
homepage = "https://savannah.nongnu.org/projects/avr-libc/";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, unzip, runtimeShell }:
|
||||
{ lib, stdenv, fetchurl, unzip, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "avr8-burn-omat-2.1.2";
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
chmod +x $out/bin/avr8-burn-omat
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "GUI tool for avrdude";
|
||||
homepage = "http://avr8-burn-o-mat.aaabbb.de/avr8_burn_o_mat_avrdude_gui_en.html";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
"-DENABLE_LINTING=OFF"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/uber/h3";
|
||||
description = "Hexagonal hierarchical geospatial indexing system";
|
||||
license = licenses.asl20;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform }:
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
@@ -15,7 +15,7 @@ buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "1fgv1kxiif48q9mm60ygn88r5nkxfyiacmvbgwp0jxiacv8r7779";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/cgag/loc";
|
||||
description = "Count lines of code quickly";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoPatchelfHook
|
||||
, libusb-compat-0_1
|
||||
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
stdenv.lib.optional (!enableReadline) "WITHOUT_READLINE=1";
|
||||
unameS = stdenv.lib.optionalString stdenv.isDarwin "Darwin";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A free programmer, debugger, and gdb proxy for MSP430 MCUs";
|
||||
homepage = "https://dlbeer.co.nz/mspdebug/";
|
||||
license = licenses.gpl2;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
, libedit
|
||||
, makeWrapper
|
||||
, nasm
|
||||
, stdenv
|
||||
, lib, stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/yrp604/rappel";
|
||||
description = "A pretty janky assembly REPL";
|
||||
license = licenses.bsdOriginal;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, callPackage
|
||||
, python27Packages
|
||||
, installShellFiles
|
||||
@@ -64,7 +64,7 @@ python27Packages.buildPythonApplication {
|
||||
./test.sh
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Resolve external shell-script dependencies";
|
||||
homepage = "https://github.com/abathur/resholve";
|
||||
license = with licenses; [ mit ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, libusb1 }:
|
||||
{ lib, stdenv, fetchFromGitHub, libusb1 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "rpiboot";
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
cp -r msd $out/share/rpiboot
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/raspberrypi/usbboot";
|
||||
description = "Utility to boot a Raspberry Pi CM/CM3/Zero over USB";
|
||||
license = licenses.asl20;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, gcc-arm-embedded, binutils-arm-embedded, python2
|
||||
, skipTargets ? [
|
||||
# These targets do not build, for the reasons listed, along with the last version checked.
|
||||
@@ -57,7 +57,7 @@ in stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Flight controller software (firmware) used to fly multi-rotor craft and fixed wing craft";
|
||||
homepage = "https://github.com/betaflight/betaflight";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, gcc-arm-embedded, binutils-arm-embedded, ruby
|
||||
}:
|
||||
|
||||
@@ -49,7 +49,7 @@ in stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Navigation-enabled flight control software";
|
||||
homepage = "https://inavflight.github.io";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, libxml2, libxslt, itstool, gnome3, pkgconfig }:
|
||||
{ lib, stdenv, fetchurl, libxml2, libxslt, itstool, gnome3, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yelp-tools";
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://wiki.gnome.org/Apps/Yelp/Tools";
|
||||
description = "Small programs that help you create, edit, manage, and publish your Mallard or DocBook documentation";
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
|
||||
Reference in New Issue
Block a user