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, fetchFromGitHub, fzf }:
|
||||
{ lib, stdenv, fetchFromGitHub, fzf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fzf-zsh-unstable";
|
||||
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
install -Dm0644 fzf-zsh.plugin.zsh $out/share/zsh/plugins/fzf-zsh/fzf-zsh.plugin.zsh
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/wyntau/fzf-zsh";
|
||||
description = "wrap fzf to use in oh-my-zsh";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gradle-completion";
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Gradle tab completion for bash and zsh";
|
||||
homepage = "https://github.com/gradle/gradle-completion";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s grmlzshrc.5.gz $out/share/man/man5/grml-zsh-config.5.gz
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "grml's zsh setup";
|
||||
homepage = "https://grml.org/zsh/";
|
||||
license = licenses.gpl2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lambda-mod-zsh-theme-unstable";
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
install -Dm0644 lambda-mod.zsh-theme $out/share/zsh/themes/lambda-mod.zsh-theme
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A ZSH theme optimized for people who use Git & Unicode-compatible fonts and terminals";
|
||||
homepage = "https://github.com/halfo/lambda-mod-zsh-theme/";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
version = "0.4.4";
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
||||
cp *.zsh $out/share/zsh/plugins/nix
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/spwhitt/nix-zsh-completions";
|
||||
description = "ZSH completions for Nix, NixOS, and NixOps";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This script was inspired by the ArchLinux User Repository package:
|
||||
#
|
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=oh-my-zsh-git
|
||||
{ stdenv, fetchFromGitHub, nixosTests, writeScript, common-updater-scripts, git
|
||||
{ lib, stdenv, fetchFromGitHub, nixosTests, writeScript, common-updater-scripts, git
|
||||
, nix, nixfmt, jq, coreutils, gnused, curl, cacert }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A framework for managing your zsh configuration";
|
||||
longDescription = ''
|
||||
Oh My Zsh is a framework for managing your zsh configuration.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "spaceship-prompt";
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s "$out/lib/spaceship-prompt/spaceship.zsh" "$out/share/zsh/site-functions/prompt_spaceship_setup"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Zsh prompt for Astronauts";
|
||||
homepage = "https://github.com/denysdovhan/spaceship-prompt/";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, zsh }:
|
||||
{ lib, stdenv, fetchFromGitHub, zsh }:
|
||||
|
||||
# To make use of this derivation, use the `programs.zsh.enableAutoSuggestions` option
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
$out/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fish shell autosuggestions for Zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-autosuggestions";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
# To make use of this plugin, need to add
|
||||
# programs.zsh.interactiveShellInit = ''
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
||||
install -Dm0444 $src/command-time.plugin.zsh --target-directory=$out/share/zsh/plugins/command-time
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Plugin that output time: xx after long commands";
|
||||
homepage = "https://github.com/popstas/zsh-command-time";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, perl }:
|
||||
{ lib, stdenv, fetchFromGitHub, perl }:
|
||||
|
||||
let
|
||||
version = "1.4";
|
||||
@@ -25,7 +25,7 @@ in stdenv.mkDerivation {
|
||||
cp deer $out/share/zsh/site-functions/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Ranger-like file navigation for zsh";
|
||||
homepage = "https://github.com/Vifon/deer";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkgs }:
|
||||
{ lib, stdenv, fetchFromGitHub, pkgs }:
|
||||
|
||||
# To make use of this derivation, use
|
||||
# `programs.zsh.interactiveShellInit = "source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh";`
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
install -D scripts/* --target-directory=$out/share/zsh-nix-shell/scripts
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "zsh plugin that lets you use zsh in nix-shell shell";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-prezto";
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out
|
||||
cp ./* $out/ -R
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Prezto is the configuration framework for Zsh; it enriches the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes";
|
||||
homepage = "https://github.com/sorin-ionescu/prezto";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, zsh }:
|
||||
{ lib, stdenv, fetchFromGitHub, zsh }:
|
||||
|
||||
# To make use of this derivation, use the `programs.zsh.enableSyntaxHighlighting` option
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fish shell like syntax highlighting for Zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-syntax-highlighting";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-you-should-use";
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
install -D you-should-use.plugin.zsh $out/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/MichaelAquilina/zsh-you-should-use";
|
||||
license = licenses.gpl3;
|
||||
description = "ZSH plugin that reminds you to use existing aliases for commands you just typed";
|
||||
|
||||
Reference in New Issue
Block a user