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 @@
|
||||
{ fetchFromGitHub, stdenv, perl, makeWrapper
|
||||
{ fetchFromGitHub, lib, stdenv, perl, makeWrapper
|
||||
, iproute, acpi, sysstat, alsaUtils
|
||||
, scripts ? [ "bandwidth" "battery" "cpu_usage" "disk" "iface"
|
||||
"load_average" "memory" "volume" "wifi" ]
|
||||
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
||||
--prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsaUtils)}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A flexible scheduler for your i3bar blocks -- this is a fork to use with i3-gaps";
|
||||
homepage = "https://github.com/Airblader/i3blocks-gaps";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, which, pkgconfig, makeWrapper, installShellFiles, libxcb, xcbutilkeysyms
|
||||
{ fetchurl, lib, stdenv, which, pkgconfig, makeWrapper, installShellFiles, libxcb, xcbutilkeysyms
|
||||
, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification, libX11, pcre, libev
|
||||
, yajl, xcb-util-cursor, perl, pango, perlPackages, libxkbcommon
|
||||
, xorgserver, xvfb_run }:
|
||||
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A tiling window manager";
|
||||
homepage = "https://i3wm.org";
|
||||
maintainers = with maintainers; [ modulistic fpletz globin ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb, xcbutilkeysyms
|
||||
{ lib, stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb, xcbutilkeysyms
|
||||
, xorg , i3ipc-glib , glib
|
||||
}:
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
|
||||
cp i3-easyfocus $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Focus and select windows in i3";
|
||||
homepage = "https://github.com/cornerman/i3-easyfocus";
|
||||
maintainers = with maintainers; [teto];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, i3, autoreconfHook }:
|
||||
{ fetchurl, lib, stdenv, i3, autoreconfHook }:
|
||||
|
||||
i3.overrideAttrs (oldAttrs : rec {
|
||||
|
||||
@@ -15,7 +15,7 @@ i3.overrideAttrs (oldAttrs : rec {
|
||||
# fatal error: GENERATED_config_enums.h: No such file or directory
|
||||
enableParallelBuilding = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A fork of the i3 tiling window manager with some additional features";
|
||||
homepage = "https://github.com/Airblader/i3";
|
||||
maintainers = with maintainers; [ fmthoma ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb
|
||||
{ lib, stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb
|
||||
, autoreconfHook, json-glib, gtk-doc, which
|
||||
, gobject-introspection
|
||||
}:
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
gtkdocize
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A C interface library to i3wm";
|
||||
homepage = "https://github.com/acrisci/i3ipc-glib";
|
||||
maintainers = with maintainers; [teto];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, vim, makeWrapper, jq, rofi, xrandr, xdotool, i3, gawk, libnotify }:
|
||||
{ lib, stdenv, fetchFromGitHub, vim, makeWrapper, jq, rofi, xrandr, xdotool, i3, gawk, libnotify }:
|
||||
|
||||
let
|
||||
path = stdenv.lib.makeBinPath [ vim jq rofi xrandr xdotool i3 gawk libnotify ];
|
||||
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/klaxalk/i3-layout-manager";
|
||||
description = "Saving, loading and managing layouts for i3wm";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libxcb,
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libxcb,
|
||||
xcbutilkeysyms , xcbutilimage, pam, libX11, libev, cairo, libxkbcommon,
|
||||
libxkbfile, libjpeg_turbo, xcbutilxrm
|
||||
}:
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
mv $out/share/man/man1/i3lock.1 $out/share/man/man1/i3lock-color.1
|
||||
sed -i 's/\(^\|\s\|"\)i3lock\(\s\|$\)/\1i3lock-color\2/g' $out/share/man/man1/i3lock-color.1
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A simple screen locker like slock, enhanced version with extra configuration options";
|
||||
longDescription = ''
|
||||
Simple screen locker. After locking, a colored background (default: white) or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, xorg, i3lock }:
|
||||
{ lib, stdenv, fetchFromGitHub, xorg, i3lock }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "i3lock-fancy-rapid";
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
install -D i3lock-fancy-rapid $out/bin/i3lock-fancy-rapid
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A faster implementation of i3lock-fancy";
|
||||
homepage = "https://github.com/yvbbrjdr/i3lock-fancy-rapid";
|
||||
maintainers = with maintainers; [ nickhu ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk
|
||||
{ lib, stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk
|
||||
, i3lock-color, getopt, fontconfig
|
||||
}:
|
||||
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
cp i3lock-fancy $out/bin/i3lock-fancy
|
||||
cp icons/lock*.png $out/share/i3lock-fancy/icons
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text";
|
||||
homepage = "https://github.com/meskarune/i3lock-fancy";
|
||||
maintainers = with maintainers; [ ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, which, pkgconfig, libxcb, xcbutilkeysyms, xcbutilimage,
|
||||
{ fetchurl, lib, stdenv, which, pkgconfig, libxcb, xcbutilkeysyms, xcbutilimage,
|
||||
xcbutilxrm, pam, libX11, libev, cairo, libxkbcommon, libxkbfile }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
cp *.1 $out/share/man/man1
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A simple screen locker like slock";
|
||||
longDescription = ''
|
||||
Simple screen locker. After locking, a colored background (default: white) or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, libpulseaudio
|
||||
, libnotify
|
||||
@@ -45,7 +45,7 @@ python3Packages.buildPythonApplication rec {
|
||||
# no tests in tarball
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/enkore/i3pystatus";
|
||||
description = "A complete replacement for i3status";
|
||||
longDescription = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkgconfig
|
||||
@@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# Currently no tests are implemented, so we avoid building the package twice
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Very resource-friendly and feature-rich replacement for i3status";
|
||||
homepage = "https://github.com/greshake/i3status-rust";
|
||||
license = licenses.gpl3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, python3Packages }:
|
||||
{ lib, stdenv, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "i3-wk-switch";
|
||||
@@ -21,7 +21,7 @@ python3Packages.buildPythonApplication rec {
|
||||
cp i3-wk-switch.py "$out/bin/i3-wk-switch"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "XMonad-like workspace switching for i3 and sway";
|
||||
maintainers = with maintainers; [ synthetica ];
|
||||
platforms = platforms.linux;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
||||
, xorg, python3, pkgconfig, cairo, libxkbcommon }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# users.
|
||||
cargoBuildFlags = [ "--features i3" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Visually focus windows by label";
|
||||
homepage = "https://github.com/svenstaro/wmfocus";
|
||||
license = licenses.mit;
|
||||
|
||||
Reference in New Issue
Block a user