From e245ae3c3ac34d24ec6ceb7b86aa74be4fb8e707 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Fri, 15 Jan 2021 13:28:56 +0700 Subject: [PATCH] pkgs/shells: stdenv.lib -> lib --- pkgs/shells/bash/4.4.nix | 2 +- pkgs/shells/bash/5.1.nix | 2 +- pkgs/shells/bash/bash-completion/default.nix | 4 ++-- pkgs/shells/dash/default.nix | 4 ++-- pkgs/shells/ion/default.nix | 2 +- pkgs/shells/oh/default.nix | 4 ++-- pkgs/shells/powershell/default.nix | 2 +- pkgs/shells/rc/default.nix | 6 +++--- pkgs/shells/rush/default.nix | 8 ++++---- pkgs/shells/tcsh/default.nix | 2 +- pkgs/shells/zsh/antigen/default.nix | 4 ++-- pkgs/shells/zsh/default.nix | 10 +++++----- pkgs/shells/zsh/oh-my-zsh/default.nix | 2 +- pkgs/shells/zsh/pure-prompt/default.nix | 4 ++-- pkgs/shells/zsh/zsh-bd/default.nix | 8 ++++---- pkgs/shells/zsh/zsh-completions/default.nix | 8 ++++---- pkgs/shells/zsh/zsh-git-prompt/default.nix | 2 +- pkgs/shells/zsh/zsh-powerlevel10k/default.nix | 8 ++++---- pkgs/shells/zsh/zsh-powerlevel9k/default.nix | 8 ++++---- 19 files changed, 45 insertions(+), 45 deletions(-) diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index afdfb816c95..bde942aff0c 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -6,7 +6,7 @@ , withDocs ? false, texinfo ? null }: -with stdenv.lib; +with lib; assert interactive -> readline70 != null; assert withDocs -> texinfo != null; diff --git a/pkgs/shells/bash/5.1.nix b/pkgs/shells/bash/5.1.nix index fd8c0c32cd6..5dd060db7ef 100644 --- a/pkgs/shells/bash/5.1.nix +++ b/pkgs/shells/bash/5.1.nix @@ -12,7 +12,7 @@ , texinfo ? null }: -with stdenv.lib; +with lib; assert interactive -> readline80 != null; assert withDocs -> texinfo != null; diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index 22a7ead545d..0ebcaa9e864 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # - ignore test_screen because it assumes vt terminals exist checkPhase = '' pytest . \ - ${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ + ${lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ --ignore=test/t/test_chsh.py \ --ignore=test/t/test_ether_wake.py \ --ignore=test/t/test_ifdown.py \ @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { --ignore=test/t/test_screen.py ''; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.isDarwin '' sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* ''; diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index 2c6e9cc0e68..24d5af7e74e 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation rec { url = "https://git.kernel.org/pub/scm/utils/dash/dash.git/patch/?id=29d6f2148f10213de4e904d515e792d2cf8c968e"; sha256 = "08q90bx36ixwlcj331dh7420qyj8i0qh1cc1gljrhd83fhl9w0y5"; }) - ] ++ stdenv.lib.optional stdenv.isDarwin ./0001-fix-dirent64-et-al-on-darwin.patch; + ] ++ lib.optional stdenv.isDarwin ./0001-fix-dirent64-et-al-on-darwin.patch; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin autoreconfHook; + nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook; meta = with lib; { homepage = "http://gondor.apana.org.au/~herbert/dash/"; diff --git a/pkgs/shells/ion/default.nix b/pkgs/shells/ion/default.nix index d1b499a9160..77691e99b25 100644 --- a/pkgs/shells/ion/default.nix +++ b/pkgs/shells/ion/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ dywedir ]; }; - buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin [ + buildInputs = lib.optional stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/shells/oh/default.nix b/pkgs/shells/oh/default.nix index 3ae8a7c600a..3ea41d7f472 100644 --- a/pkgs/shells/oh/default.nix +++ b/pkgs/shells/oh/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "oh"; - version = "20160522-${stdenv.lib.strings.substring 0 7 rev}"; + version = "20160522-${lib.strings.substring 0 7 rev}"; rev = "0daaf4081475fb9d6b3801c85019bdd57b2ee9b4"; goPackagePath = "github.com/michaelmacinnis/oh"; @@ -18,6 +18,6 @@ buildGoPackage rec { meta = with lib;{ homepage = "https://github.com/michaelmacinnis/oh"; description = "A Unix shell"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; }; } diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix index d776e64fa49..3f9d7130811 100644 --- a/pkgs/shells/powershell/default.nix +++ b/pkgs/shells/powershell/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin makeWrapper $pslibs/pwsh $out/bin/pwsh \ - --prefix ${platformLdLibraryPath} : "${stdenv.lib.makeLibraryPath libraries}" \ + --prefix ${platformLdLibraryPath} : "${lib.makeLibraryPath libraries}" \ --set TERM xterm --set POWERSHELL_TELEMETRY_OPTOUT 1 --set DOTNET_CLI_TELEMETRY_OPTOUT 1 ''; diff --git a/pkgs/shells/rc/default.nix b/pkgs/shells/rc/default.nix index a71d5ba2897..af43c42dd4b 100644 --- a/pkgs/shells/rc/default.nix +++ b/pkgs/shells/rc/default.nix @@ -15,12 +15,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ ncurses ] - ++ stdenv.lib.optionals (readline != null) [ readline ]; + ++ lib.optionals (readline != null) [ readline ]; configureFlags = [ "--enable-def-interp=${stdenv.shell}" #183 - ] ++ stdenv.lib.optionals historySupport [ "--with-history" ] - ++ stdenv.lib.optionals (readline != null) [ "--with-edit=readline" ]; + ] ++ lib.optionals historySupport [ "--with-history" ] + ++ lib.optionals (readline != null) [ "--with-edit=readline" ]; prePatch = '' substituteInPlace configure.ac \ diff --git a/pkgs/shells/rush/default.nix b/pkgs/shells/rush/default.nix index f9e15d4a0b4..bdb8f7ce095 100644 --- a/pkgs/shells/rush/default.nix +++ b/pkgs/shells/rush/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv }: +{ fetchurl, lib, stdenv }: stdenv.mkDerivation rec { pname = "rush"; @@ -29,10 +29,10 @@ stdenv.mkDerivation rec { ''; homepage = "https://www.gnu.org/software/rush/"; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; - maintainers = [ stdenv.lib.maintainers.bjg ]; - platforms = stdenv.lib.platforms.all; + maintainers = [ lib.maintainers.bjg ]; + platforms = lib.platforms.all; }; passthru = { diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 468d17b60b7..8f4a1664467 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses ]; - patches = stdenv.lib.optional stdenv.hostPlatform.isMusl + patches = lib.optional stdenv.hostPlatform.isMusl (fetchpatch { name = "sysmalloc.patch"; url = "https://git.alpinelinux.org/aports/plain/community/tcsh/001-sysmalloc.patch?id=184585c046cdd56512f1a76e426dd799b368f8cf"; diff --git a/pkgs/shells/zsh/antigen/default.nix b/pkgs/shells/zsh/antigen/default.nix index 5603e5edf59..c80471677f0 100644 --- a/pkgs/shells/zsh/antigen/default.nix +++ b/pkgs/shells/zsh/antigen/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { version = "2.2.3"; @@ -20,6 +20,6 @@ stdenv.mkDerivation rec { meta = { description = "The plugin manager for zsh"; homepage = "http://antigen.sharats.me"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; }; } diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index eab6d88a0b7..71f526525e4 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, pcre, buildPackages }: +{ lib, stdenv, fetchurl, ncurses, pcre, buildPackages }: let version = "5.8"; @@ -31,7 +31,7 @@ stdenv.mkDerivation { # the zsh/zpty module is not available on hydra # so skip groups Y Z - checkFlags = map (T: "TESTNUM=${T}") (stdenv.lib.stringToCharacters "ABCDEVW"); + checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW"); # XXX: think/discuss about this, also with respect to nixos vs nix-on-X postInstall = '' @@ -65,7 +65,7 @@ EOF ${if stdenv.hostPlatform == stdenv.buildPlatform then '' $out/bin/zsh -c "zcompile $out/etc/zprofile" '' else '' - ${stdenv.lib.getBin buildPackages.zsh}/bin/zsh -c "zcompile $out/etc/zprofile" + ${lib.getBin buildPackages.zsh}/bin/zsh -c "zcompile $out/etc/zprofile" ''} mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used ''; @@ -83,8 +83,8 @@ EOF ''; license = "MIT-like"; homepage = "https://www.zsh.org/"; - maintainers = with stdenv.lib.maintainers; [ pSub ]; - platforms = stdenv.lib.platforms.unix; + maintainers = with lib.maintainers; [ pSub ]; + platforms = lib.platforms.unix; }; passthru = { diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix index 1b3a4c21cf3..36ef1843162 100644 --- a/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { #!${stdenv.shell} set -o errexit PATH=${ - stdenv.lib.makeBinPath [ + lib.makeBinPath [ common-updater-scripts curl cacert diff --git a/pkgs/shells/zsh/pure-prompt/default.nix b/pkgs/shells/zsh/pure-prompt/default.nix index ac7035045bb..dfc9593a532 100644 --- a/pkgs/shells/zsh/pure-prompt/default.nix +++ b/pkgs/shells/zsh/pure-prompt/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: -with stdenv.lib; +with lib; stdenv.mkDerivation rec { pname = "pure-prompt"; diff --git a/pkgs/shells/zsh/zsh-bd/default.nix b/pkgs/shells/zsh/zsh-bd/default.nix index b5b66af6ca3..f2c2dc90fb4 100644 --- a/pkgs/shells/zsh/zsh-bd/default.nix +++ b/pkgs/shells/zsh/zsh-bd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub}: +{ lib, stdenv, fetchFromGitHub}: stdenv.mkDerivation rec { pname = "zsh-bd"; @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { meta = { description = "Jump back to a specific directory, without doing `cd ../../..` "; homepage = "https://github.com/Tarrasch/zsh-bd"; - license = stdenv.lib.licenses.free; + license = lib.licenses.free; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.olejorgenb ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.olejorgenb ]; }; } diff --git a/pkgs/shells/zsh/zsh-completions/default.nix b/pkgs/shells/zsh/zsh-completions/default.nix index 89a91ad0508..07e538610ba 100644 --- a/pkgs/shells/zsh/zsh-completions/default.nix +++ b/pkgs/shells/zsh/zsh-completions/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub}: +{ lib, stdenv, fetchFromGitHub}: stdenv.mkDerivation rec { pname = "zsh-completions"; @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { meta = { description = "Additional completion definitions for zsh"; homepage = "https://github.com/zsh-users/zsh-completions"; - license = stdenv.lib.licenses.free; + license = lib.licenses.free; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.olejorgenb ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.olejorgenb ]; }; } diff --git a/pkgs/shells/zsh/zsh-git-prompt/default.nix b/pkgs/shells/zsh/zsh-git-prompt/default.nix index 6aadf3163d3..c0c56570b46 100644 --- a/pkgs/shells/zsh/zsh-git-prompt/default.nix +++ b/pkgs/shells/zsh/zsh-git-prompt/default.nix @@ -65,6 +65,6 @@ haskellPackages.callPackage testHaskellDepends = [HUnit] ++ libraryHaskellDepends; homepage = "https://github.com/olivierverdier/zsh-git-prompt#readme"; description = "Informative git prompt for zsh"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; maintainers = [lib.maintainers.league]; }) {} diff --git a/pkgs/shells/zsh/zsh-powerlevel10k/default.nix b/pkgs/shells/zsh/zsh-powerlevel10k/default.nix index 0bba4bffdef..0bc46849df2 100644 --- a/pkgs/shells/zsh/zsh-powerlevel10k/default.nix +++ b/pkgs/shells/zsh/zsh-powerlevel10k/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, substituteAll, pkgs }: +{ lib, stdenv, fetchFromGitHub, substituteAll, pkgs }: # To make use of this derivation, use # `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";` @@ -45,9 +45,9 @@ stdenv.mkDerivation rec { meta = { description = "A fast reimplementation of Powerlevel9k ZSH theme"; homepage = "https://github.com/romkatv/powerlevel10k"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.hexa ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.hexa ]; }; } diff --git a/pkgs/shells/zsh/zsh-powerlevel9k/default.nix b/pkgs/shells/zsh/zsh-powerlevel9k/default.nix index 676f9458675..b681dc2d3a3 100644 --- a/pkgs/shells/zsh/zsh-powerlevel9k/default.nix +++ b/pkgs/shells/zsh/zsh-powerlevel9k/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: # To make use of this derivation, use # `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";` @@ -21,9 +21,9 @@ stdenv.mkDerivation { meta = { description = "A beautiful theme for zsh"; homepage = "https://github.com/bhilburn/powerlevel9k"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.pierrechevalier83 ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.pierrechevalier83 ]; }; }