From 59566640296bd3e4ac1a7e6d7cd0bac2e996dd8e 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 | 54 +++++++++++++++++++++++++++++ pkgs/by-name/bi/bigpemu/update.sh | 9 +++++ 2 files changed, 63 insertions(+) create mode 100644 pkgs/by-name/bi/bigpemu/package.nix create mode 100755 pkgs/by-name/bi/bigpemu/update.sh diff --git a/pkgs/by-name/bi/bigpemu/package.nix b/pkgs/by-name/bi/bigpemu/package.nix new file mode 100644 index 0000000000000..af297e1337b1d --- /dev/null +++ b/pkgs/by-name/bi/bigpemu/package.nix @@ -0,0 +1,54 @@ +{ + lib, + stdenv, + fetchurl, + SDL2, + glui, + libGLU, + libGL, + buildFHSEnv, +}: +let + bigpemu-unwrapped = 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 + ''; + + meta = { + description = "Atari Jaguar Emulator (BigPEmu) by Richard Whitehouse"; + homepage = "https://www.richwhitehouse.com/jaguar/index.php"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ + tombert + hughobrien + ]; + platforms = with lib.platforms; [ "x86_64-linux" ]; + }; + }; +in +buildFHSEnv { + name = "bigpemu"; + version = bigpemu-unwrapped.version; + targetPkgs = pkgs: [ + glui + libGL + libGLU + SDL2 + ]; + runScript = "${bigpemu-unwrapped}/bin/bigpemu"; + passthru = { + unwrapped = bigpemu-unwrapped; + updateScript = ./update.sh; + }; +} + diff --git a/pkgs/by-name/bi/bigpemu/update.sh b/pkgs/by-name/bi/bigpemu/update.sh new file mode 100755 index 0000000000000..35bc2506561ea --- /dev/null +++ b/pkgs/by-name/bi/bigpemu/update.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl pup common-updater-scripts +set -eu -o pipefail +page="https://www.richwhitehouse.com/jaguar/index.php?content=download" +extractor='font:contains("Current Version") strong text{}' +lastest_version="$(curl "$page" | pup "$extractor")" +update-source-version \ + --ignore-same-version \ + bigpemu.unwrapped "$lastest_version"