From d2793017cad11d290dad64f5122b2d2668e2d467 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 5 Feb 2021 11:44:45 +0100 Subject: treewide: stdenv.lib -> pkgs.lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream is deprecating `stdenv.lib`, so let’s do the same. --- pkgs/games/humblebundle/brigador.nix | 10 +++++----- pkgs/games/humblebundle/cavestoryplus.nix | 4 ++-- pkgs/games/humblebundle/dott.nix | 4 ++-- pkgs/games/humblebundle/fetch-humble-bundle/default.nix | 6 +++--- pkgs/games/humblebundle/fez.nix | 6 +++--- pkgs/games/humblebundle/ftl.nix | 4 ++-- pkgs/games/humblebundle/grim-fandango.nix | 4 ++-- pkgs/games/humblebundle/guacamelee.nix | 6 +++--- pkgs/games/humblebundle/hammerwatch.nix | 4 ++-- pkgs/games/humblebundle/jamestown.nix | 6 +++--- pkgs/games/humblebundle/pico-8.nix | 4 ++-- pkgs/games/humblebundle/spaz.nix | 4 ++-- pkgs/games/humblebundle/starbound.nix | 10 +++++----- pkgs/games/humblebundle/swordsandsoldiers.nix | 4 ++-- pkgs/games/humblebundle/unepic.nix | 4 ++-- 15 files changed, 40 insertions(+), 40 deletions(-) (limited to 'pkgs/games/humblebundle') diff --git a/pkgs/games/humblebundle/brigador.nix b/pkgs/games/humblebundle/brigador.nix index 71fbea28..8ac088cb 100644 --- a/pkgs/games/humblebundle/brigador.nix +++ b/pkgs/games/humblebundle/brigador.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, makeWrapper, fetchHumbleBundle, writeText +{ stdenv, lib, fetchurl, makeWrapper, fetchHumbleBundle, writeText , SDL2, libGL, glew, freeimage }: let - oldGLEW = glew.overrideDerivation (stdenv.lib.const rec { + oldGLEW = glew.overrideDerivation (lib.const rec { name = "glew-1.12.0"; src = fetchurl { url = "mirror://sourceforge/glew/${name}.tgz"; @@ -40,7 +40,7 @@ in stdenv.mkDerivation { return call(buf, __VA_ARGS__); \ } - ${stdenv.lib.concatMapStrings (fun: '' + ${lib.concatMapStrings (fun: '' FILE *${fun}(const char *path, const char *mode) { static FILE *(*_${fun}) (const char *, const char *) = NULL; if (_${fun} == NULL) _${fun} = dlsym(RTLD_NEXT, "${fun}"); @@ -63,8 +63,8 @@ in stdenv.mkDerivation { ''; patchPhase = let - fmodRpath = stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ]; - rpath = stdenv.lib.makeLibraryPath [ "$out" SDL2 libGL oldGLEW freeimage ]; + fmodRpath = lib.makeLibraryPath [ "$out" stdenv.cc.cc ]; + rpath = lib.makeLibraryPath [ "$out" SDL2 libGL oldGLEW freeimage ]; in '' for fmod in lib/libfmod*.so*; do patchelf --set-rpath "${fmodRpath}" "$fmod" diff --git a/pkgs/games/humblebundle/cavestoryplus.nix b/pkgs/games/humblebundle/cavestoryplus.nix index a549ebfb..99698989 100644 --- a/pkgs/games/humblebundle/cavestoryplus.nix +++ b/pkgs/games/humblebundle/cavestoryplus.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, makeWrapper, SDL, libGL }: +{ stdenv, lib, fetchHumbleBundle, makeWrapper, SDL, libGL }: stdenv.mkDerivation rec { name = "cave-story-plus-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; patchPhase = let - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ SDL "$out" stdenv.cc.cc libGL ]; in '' diff --git a/pkgs/games/humblebundle/dott.nix b/pkgs/games/humblebundle/dott.nix index eef7fb87..a1bf74c0 100644 --- a/pkgs/games/humblebundle/dott.nix +++ b/pkgs/games/humblebundle/dott.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, libGL, libpulseaudio, alsaLib, libudev +{ stdenv, lib, fetchHumbleBundle, libGL, libpulseaudio, alsaLib, libudev , writeText }: @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { } ''; - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ libGL stdenv.cc.cc libpulseaudio alsaLib.out libudev ]; diff --git a/pkgs/games/humblebundle/fetch-humble-bundle/default.nix b/pkgs/games/humblebundle/fetch-humble-bundle/default.nix index 1340bce8..53559133 100644 --- a/pkgs/games/humblebundle/fetch-humble-bundle/default.nix +++ b/pkgs/games/humblebundle/fetch-humble-bundle/default.nix @@ -1,4 +1,4 @@ -{ stdenv, curl, cacert, writeText, writeScript, fetchFromGitHub, fetchpatch +{ stdenv, lib, curl, cacert, writeText, writeScript, fetchFromGitHub, fetchpatch , python, python3, pythonPackages # Dependencies for the captcha solver @@ -34,7 +34,7 @@ let waitForResponse(); ''; - escapeCString = stdenv.lib.replaceStrings ["\"" "\n"] ["\\\"" "\\n"]; + escapeCString = lib.replaceStrings ["\"" "\n"] ["\\\"" "\\n"]; application = writeText "captcha.cc" '' #include @@ -136,7 +136,7 @@ let propagatedBuildInputs = [ pythonPackages.requests ]; }; - pyStr = str: "'${stdenv.lib.escape ["'" "\\"] str}'"; + pyStr = str: "'${lib.escape ["'" "\\"] str}'"; getDownloadURL = writeText "gethburl.py" '' import socket, sys, time, humblebundle diff --git a/pkgs/games/humblebundle/fez.nix b/pkgs/games/humblebundle/fez.nix index 5f23b97c..b1043eb4 100644 --- a/pkgs/games/humblebundle/fez.nix +++ b/pkgs/games/humblebundle/fez.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchHumbleBundle, unzip, mono, openal, SDL2 }: +{ stdenv, lib, fetchHumbleBundle, unzip, mono, openal, SDL2 }: let version = "1.0.2"; - usVersion = stdenv.lib.replaceChars ["."] ["_"] version; + usVersion = lib.replaceChars ["."] ["_"] version; in stdenv.mkDerivation rec { name = "fez-${version}"; version = "09152013"; @@ -22,7 +22,7 @@ in stdenv.mkDerivation rec { buildPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${stdenv.lib.makeLibraryPath [ mono openal SDL2 ]}" \ + --set-rpath "${lib.makeLibraryPath [ mono openal SDL2 ]}" \ FEZ.bin.x86_64 ''; diff --git a/pkgs/games/humblebundle/ftl.nix b/pkgs/games/humblebundle/ftl.nix index 5fd20a9f..552ca036 100644 --- a/pkgs/games/humblebundle/ftl.nix +++ b/pkgs/games/humblebundle/ftl.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, makeWrapper, SDL, libGL, libdevil, freetype }: +{ stdenv, lib, fetchHumbleBundle, makeWrapper, SDL, libGL, libdevil, freetype }: stdenv.mkDerivation rec { name = "ftl-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; patchPhase = let - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ SDL "$out" stdenv.cc.cc libGL libdevil freetype ]; in '' diff --git a/pkgs/games/humblebundle/grim-fandango.nix b/pkgs/games/humblebundle/grim-fandango.nix index 00c1a036..7b2a96aa 100644 --- a/pkgs/games/humblebundle/grim-fandango.nix +++ b/pkgs/games/humblebundle/grim-fandango.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, libGL, libpulseaudio, alsaLib, SDL2, writeText +{ stdenv, lib, fetchHumbleBundle, libGL, libpulseaudio, alsaLib, SDL2, writeText , xorg }: @@ -135,7 +135,7 @@ stdenv.mkDerivation rec { } ''; - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ libGL stdenv.cc.cc libpulseaudio alsaLib.out SDL2 xorg.libX11 ]; diff --git a/pkgs/games/humblebundle/guacamelee.nix b/pkgs/games/humblebundle/guacamelee.nix index 5cc39837..667f35fc 100644 --- a/pkgs/games/humblebundle/guacamelee.nix +++ b/pkgs/games/humblebundle/guacamelee.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, unzip, SDL2, libGL, writeText, makeWrapper }: +{ stdenv, lib, fetchHumbleBundle, unzip, SDL2, libGL, writeText, makeWrapper }: stdenv.mkDerivation rec { name = "guacamelee-${version}"; @@ -27,8 +27,8 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; buildPhase = let - rpath = stdenv.lib.makeLibraryPath [ SDL2 stdenv.cc.cc libGL ]; - fmodRpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]; + rpath = lib.makeLibraryPath [ SDL2 stdenv.cc.cc libGL ]; + fmodRpath = lib.makeLibraryPath [ stdenv.cc.cc ]; in '' gcc -Werror -shared "$preloader" -o preloader.so -ldl \ -DDATA=\"$out/share/guacamelee\" diff --git a/pkgs/games/humblebundle/hammerwatch.nix b/pkgs/games/humblebundle/hammerwatch.nix index ab5bc29f..871b2907 100644 --- a/pkgs/games/humblebundle/hammerwatch.nix +++ b/pkgs/games/humblebundle/hammerwatch.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, makeWrapper, unzip, mono, SDL2, libGL, openal +{ stdenv, lib, fetchHumbleBundle, makeWrapper, unzip, mono, SDL2, libGL, openal , pulseaudio }: @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ unzip makeWrapper ]; installPhase = let - rpath = stdenv.lib.makeLibraryPath [ SDL2 libGL openal pulseaudio ]; + rpath = lib.makeLibraryPath [ SDL2 libGL openal pulseaudio ]; monoNoLLVM = mono.override { withLLVM = false; }; in '' mkdir -p "$out/lib" diff --git a/pkgs/games/humblebundle/jamestown.nix b/pkgs/games/humblebundle/jamestown.nix index 15900bba..5148671c 100644 --- a/pkgs/games/humblebundle/jamestown.nix +++ b/pkgs/games/humblebundle/jamestown.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchHumbleBundle, unzip, pkgsi686Linux, expect, makeWrapper +{ stdenv, lib, fetchHumbleBundle, unzip, pkgsi686Linux, expect, makeWrapper , SDL, openal }: let version = "1.0.2"; - usVersion = stdenv.lib.replaceChars ["."] ["_"] version; + usVersion = lib.replaceChars ["."] ["_"] version; in stdenv.mkDerivation rec { name = "jamestown-${version}"; @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { ''; installPhase = let - rpath = stdenv.lib.makeLibraryPath [ SDL openal ]; + rpath = lib.makeLibraryPath [ SDL openal ]; in '' libexec="$out/libexec/jamestown" install -vD Jamestown-amd64 "$libexec/jamestown" diff --git a/pkgs/games/humblebundle/pico-8.nix b/pkgs/games/humblebundle/pico-8.nix index d7337065..eaf84d0d 100644 --- a/pkgs/games/humblebundle/pico-8.nix +++ b/pkgs/games/humblebundle/pico-8.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, SDL2, unzip, xorg, libudev, alsaLib, dbus +{ stdenv, lib, fetchHumbleBundle, SDL2, unzip, xorg, libudev, alsaLib, dbus , libpulseaudio, libdrm, libvorbis, json_c }: stdenv.mkDerivation rec { @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { phases = [ "unpackPhase" "buildPhase" "installPhase" ]; buildPhase = let - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ stdenv.cc.cc SDL2 xorg.libXxf86vm xorg.libXcursor xorg.libXi xorg.libXrandr libudev alsaLib dbus libpulseaudio libdrm libvorbis json_c diff --git a/pkgs/games/humblebundle/spaz.nix b/pkgs/games/humblebundle/spaz.nix index 24d32e53..7dd6d03d 100644 --- a/pkgs/games/humblebundle/spaz.nix +++ b/pkgs/games/humblebundle/spaz.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { dontStrip = true; buildPhase = let - libs = pkgsi686Linux.stdenv.lib.makeLibraryPath [ + libs = pkgsi686Linux.lib.makeLibraryPath [ pkgsi686Linux.stdenv.cc.cc pkgsi686Linux.SDL ]; in '' @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; installPhase = let - libs = pkgsi686Linux.stdenv.lib.makeLibraryPath [ + libs = pkgsi686Linux.lib.makeLibraryPath [ pkgsi686Linux.libGL pkgsi686Linux.openal pkgsi686Linux.alsaPlugins ]; in '' diff --git a/pkgs/games/humblebundle/starbound.nix b/pkgs/games/humblebundle/starbound.nix index b8df170f..a94009a1 100644 --- a/pkgs/games/humblebundle/starbound.nix +++ b/pkgs/games/humblebundle/starbound.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, unzip, fetchurl, writeText, SDL2, libGLU, libGL +{ stdenv, lib, fetchHumbleBundle, unzip, fetchurl, writeText, SDL2, libGLU, libGL , xorg, makeDesktopItem }: @@ -39,7 +39,7 @@ let mkdir -p "patched/$(dirname "${bin}")" cp -t "patched/$(dirname "${bin}")" "linux/${bin}" chmod +x "patched/$(basename "${bin}")" - ${stdenv.lib.optionalString (attrs.needsBootconfig or false) '' + ${lib.optionalString (attrs.needsBootconfig or false) '' for offset in $( grep -abz '^sbinit\.config''$' "patched/$(basename "${bin}")" \ | cut -d: -f1 -z | xargs -0 @@ -55,7 +55,7 @@ let ''} patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${stdenv.lib.makeLibraryPath (attrs.deps or [])}" \ + --set-rpath "${lib.makeLibraryPath (attrs.deps or [])}" \ "patched/$(basename "${bin}")" if ldd "patched/$(basename "${bin}")" | grep -F 'not found' \ | grep -v 'libstarbound-preload\.so\|libsteam_api\.so'; then @@ -284,7 +284,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ unzip ]; - buildPhase = with stdenv.lib; '' + buildPhase = with lib; '' cc -Wall -shared "${preloaderSource}" -o preload.so -ldl -fPIC \ -DSTARBOUND_ASSET_DIR="\"$assets\"" ${concatStrings (mapAttrsToList patchBinary binaryDeps)} @@ -315,7 +315,7 @@ in stdenv.mkDerivation rec { installPhase = '' install -vsD preload.so "$lib/lib/libstarbound-preload.so" - ${stdenv.lib.concatStrings (stdenv.lib.mapAttrsToList (bin: attrs: let + ${lib.concatStrings (lib.mapAttrsToList (bin: attrs: let basename = builtins.baseNameOf bin; in '' install -vD "patched/${basename}" "$out/bin/${attrs.name or basename}" diff --git a/pkgs/games/humblebundle/swordsandsoldiers.nix b/pkgs/games/humblebundle/swordsandsoldiers.nix index 755f001c..566bb83e 100644 --- a/pkgs/games/humblebundle/swordsandsoldiers.nix +++ b/pkgs/games/humblebundle/swordsandsoldiers.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, makeWrapper +{ stdenv, lib, fetchHumbleBundle, makeWrapper , SDL, libGL, zlib, openal, libvorbis, xorg, fontconfig, freetype, libogg }: @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; patchPhase = let - rpath = stdenv.lib.makeLibraryPath [ + rpath = lib.makeLibraryPath [ SDL libGL zlib openal libvorbis fontconfig freetype stdenv.cc.cc libogg xorg.libX11 xorg.libXft xorg.libXinerama xorg.libXext xorg.libXpm ]; diff --git a/pkgs/games/humblebundle/unepic.nix b/pkgs/games/humblebundle/unepic.nix index cc4099f5..5a94ca92 100644 --- a/pkgs/games/humblebundle/unepic.nix +++ b/pkgs/games/humblebundle/unepic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchHumbleBundle, unzip, makeWrapper, SDL2, SDL2_mixer, zlib }: +{ stdenv, lib, fetchHumbleBundle, unzip, makeWrapper, SDL2, SDL2_mixer, zlib }: let version = "1.50.5"; @@ -22,7 +22,7 @@ in stdenv.mkDerivation rec { buildInputs = [ unzip makeWrapper ]; installPhase = let - rpath = stdenv.lib.makeLibraryPath [ SDL2 SDL2_mixer zlib stdenv.cc.cc ]; + rpath = lib.makeLibraryPath [ SDL2 SDL2_mixer zlib stdenv.cc.cc ]; in '' dest="$out/opt/games/unepic" exe="$dest/unepic${arch}" -- cgit 1.4.1