From f610ee36439b1fd04105976701c621d939b3956a Mon Sep 17 00:00:00 2001 From: Thomas Gebert Date: Sat, 21 Dec 2024 20:14:15 -0500 Subject: [PATCH] bigpemu: init at 1.17 --- pkgs/by-name/bi/bigpemu/package.nix | 62 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++ 2 files changed, 65 insertions(+) create mode 100644 pkgs/by-name/bi/bigpemu/package.nix diff --git a/pkgs/by-name/bi/bigpemu/package.nix b/pkgs/by-name/bi/bigpemu/package.nix new file mode 100644 index 0000000000000..7d7ad20e4dcfa --- /dev/null +++ b/pkgs/by-name/bi/bigpemu/package.nix @@ -0,0 +1,62 @@ +{ + lib, + stdenv, + fetchurl, + SDL2, + glui, + libGLU, + libGL, + buildFHSUserEnv, +}: + +let + bigpemuDrv = stdenv.mkDerivation rec { + pname = "BigPEmu"; + version = "1.17"; + + src = fetchurl { + url = "https://www.richwhitehouse.com/jaguar/builds/BigPEmu_Linux64_v${ + builtins.replaceStrings [ "." ] [ "" ] version + }.tar.gz"; + hash = "sha256-R5f3LD5RcGwdwcZqXGaCSFDyHaJrQ1ghS3kqVvBd38A="; + }; + + installPhase = '' + mkdir -p $out/bin + tar -xvf $src -C $out/bin --strip-components=1 + ''; + + postInstall = '' + wrapProgram $out/bin/bigpemu \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + SDL2 + glui + libGLU + libGL + ] + } + ''; + + dontPatchELF = true; + + meta = with lib; { + description = "Atari Jaguar Emulator (BigPEmu) by Richard Whitehouse"; + homepage = "https://www.richwhitehouse.com/jaguar/index.php"; + license = licenses.unfree; + maintainers = [ maintainers.tombert ]; + platforms = [ "x86_64-linux" ]; + }; + }; + +in +buildFHSUserEnv { + name = "bigpemu"; + targetPkgs = pkgs: [ + SDL2 + glui + libGLU + libGL + ]; + runScript = "${bigpemuDrv}/bin/bigpemu"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 69eeb0c3ddaa2..40e1d074a5c4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1440,6 +1440,9 @@ with pkgs; winetricks = callPackage ../applications/emulators/wine/winetricks.nix { }; + bigpemu = callPackage ../by-name/bi/bigpemu/package.nix { + buildFHSUserEnv = buildFHSEnv; + }; zsnes = pkgsi686Linux.callPackage ../applications/emulators/zsnes { }; zsnes2 = pkgsi686Linux.callPackage ../applications/emulators/zsnes/2.x.nix { };