Skip to content

Commit

Permalink
bigpemu: init at 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Tombert committed Dec 22, 2024
1 parent d9f1329 commit 2f9ab04
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
53 changes: 53 additions & 0 deletions pkgs/by-name/bi/bigpemu/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
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;
};
}
9 changes: 9 additions & 0 deletions pkgs/by-name/bi/bigpemu/update.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 2f9ab04

Please sign in to comment.