summary refs log tree commit diff
path: root/pkgs/misc/emulators/retroarch
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-01-15 20:21:58 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-01-16 17:58:11 +0700
commitbadf51221db8fae81bf9948c39eaf8342dfd5597 (patch)
tree34eeb35ca97f0b081da465e9ddd6c120a9d2b7df /pkgs/misc/emulators/retroarch
parenta9bb54359eeedf2594fdf191de5b673fd1dd102d (diff)
downloadnixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.gz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.bz2
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.lz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.xz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.zst
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.zip
treewide: stdenv.lib -> lib
Diffstat (limited to 'pkgs/misc/emulators/retroarch')
-rw-r--r--pkgs/misc/emulators/retroarch/cores.nix28
-rw-r--r--pkgs/misc/emulators/retroarch/default.nix6
-rw-r--r--pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix4
3 files changed, 19 insertions, 19 deletions
diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix
index 65771577896..06e4a71055b 100644
--- a/pkgs/misc/emulators/retroarch/cores.nix
+++ b/pkgs/misc/emulators/retroarch/cores.nix
@@ -6,10 +6,10 @@
 
 let
 
-  d2u = stdenv.lib.replaceChars ["-"] ["_"];
+  d2u = lib.replaceChars ["-"] ["_"];
 
   mkLibRetroCore = { core, src, description, license, broken ? false, ... }@a:
-  stdenv.lib.makeOverridable stdenv.mkDerivation ((rec {
+  lib.makeOverridable stdenv.mkDerivation ((rec {
 
     name = "libretro-${a.core}-${version}";
     version = "2020-03-06";
@@ -62,7 +62,7 @@ let
     fetchSubmodules = true;
   };
 
-in with stdenv.lib.licenses;
+in with lib.licenses;
 
 {
 
@@ -313,8 +313,8 @@ in with stdenv.lib.licenses;
     license = gpl2;
     extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ];
     preBuild = "cd desmume/src/frontend/libretro";
-    makeFlags = stdenv.lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
-             ++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
   };
 
   desmume2015 = mkLibRetroCore rec {
@@ -327,8 +327,8 @@ in with stdenv.lib.licenses;
     description = "libretro wrapper for desmume NDS emulator from 2015";
     license = gpl2;
     extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ];
-    makeFlags = stdenv.lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
-             ++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
     preBuild = "cd desmume";
   };
 
@@ -435,7 +435,7 @@ in with stdenv.lib.licenses;
     license = gpl2;
     extraBuildInputs = [ libGL libGLU ];
     makefile = "Makefile";
-    makeFlags = stdenv.lib.optional stdenv.hostPlatform.isAarch64 [ "platform=arm64" ];
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=arm64" ];
     meta.platforms = [ "aarch64-linux" "x86_64-linux" ];
   };
 
@@ -505,7 +505,7 @@ in with stdenv.lib.licenses;
       sha256 = "1jhgfys8hiipvbwq3gc48d7v6wq645d10rbr4w5m6px0fk6csshk";
     };
     description = "Port of Game and Watch to libretro";
-    license = stdenv.lib.licenses.zlib;
+    license = lib.licenses.zlib;
     makefile = "Makefile";
   };
 
@@ -567,7 +567,7 @@ in with stdenv.lib.licenses;
     description = "Port of MAME ~2000 to libretro";
     license = gpl2Plus;
     makefile = "Makefile";
-    makeFlags = stdenv.lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0";
+    makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0";
   };
 
   mame2003 = mkLibRetroCore rec {
@@ -604,7 +604,7 @@ in with stdenv.lib.licenses;
     description = "Port of MAME ~2010 to libretro";
     license = gpl2Plus;
     makefile = "Makefile";
-    makeFlags = stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ];
+    makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ];
   };
 
   mame2015 = mkLibRetroCore rec {
@@ -778,7 +778,7 @@ in with stdenv.lib.licenses;
     license = gpl2;
     extraBuildInputs = [ libGLU libGL libpng ];
     makefile = "Makefile";
-    postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isAarch64 ''
+    postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 ''
       sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \
       && sed -i -e 's,CPUFLAGS  :=,,g' Makefile
     '';
@@ -810,7 +810,7 @@ in with stdenv.lib.licenses;
     SDL_CONFIG = "${SDL.dev}/bin/sdl-config";
     dontAddPrefix = true;
     configurePlatforms = [];
-    makeFlags = stdenv.lib.optional stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ];
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ];
   };
 
   play = mkLibRetroCore {
@@ -1091,7 +1091,7 @@ in with stdenv.lib.licenses;
     license = gpl2;
     makefile = "Makefile";
     # Disable SSE for non-x86. DYNAREC doesn't build on either Aarch64 or x86_64.
-    makeFlags = stdenv.lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0";
+    makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0";
     preBuild = "cd yabause/src/libretro";
   };
 
diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix
index bfc2c338769..9a01bdb78b5 100644
--- a/pkgs/misc/emulators/retroarch/default.nix
+++ b/pkgs/misc/emulators/retroarch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, which, pkgconfig, makeWrapper
+{ lib, stdenv, fetchFromGitHub, which, pkgconfig, makeWrapper
 , ffmpeg_3, libGLU, libGL, freetype, libxml2, python3
 , libobjc, AppKit, Foundation
 , alsaLib ? null
@@ -19,7 +19,7 @@
 , libxkbcommon
 }:
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "retroarch-bare";
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  configureFlags = stdenv.lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
+  configureFlags = lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
 
   postInstall = optionalString withVulkan ''
     wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
diff --git a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
index d751c4f7fc4..79dd025cf94 100644
--- a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
+++ b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
 
   buildCommand = ''
     mkdir -p $out/bin
-    ${stdenv.lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
+    ${lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
   '';
 
   meta = {
@@ -35,6 +35,6 @@ stdenv.mkDerivation {
       advanced (emulation) launcher for Kodi since device input is
       otherwise caught by both Kodi and the retroarch process.
     '';
-    license = stdenv.lib.licenses.gpl3;
+    license = lib.licenses.gpl3;
   };
 }