diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2021-08-30 15:16:55 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 15:16:55 -0300 |
commit | eafb05087a11b520e74f0697a0d3dc7258f34d29 (patch) | |
tree | 0507dd3dab7f048ebb0829b6e97f968dec6484a1 /pkgs/misc/emulators | |
parent | f8a2cce87c2050fbff1dfe35c0ee2eeb3511ff8a (diff) | |
parent | 71af4f6ab199275e1a43d37875f12dd88ed3580c (diff) |
Merge pull request #135944 from AndersonTorres/new-uxn
uxn: init at 0.0.0+unstable=2021-08-27
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/uxn/default.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/uxn/default.nix b/pkgs/misc/emulators/uxn/default.nix new file mode 100644 index 0000000000000..3e4928412b11f --- /dev/null +++ b/pkgs/misc/emulators/uxn/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromSourcehut +, SDL2 +}: + +stdenv.mkDerivation rec { + pname = "uxn"; + version = "0.0.0+unstable=2021-08-30"; + + src = fetchFromSourcehut { + owner = "~rabbits"; + repo = pname; + rev = "a2e40d9d10c11ef48f4f93d0dc86f5085b4263ce"; + hash = "sha256-/hxDYi814nQydm2iQk4NID4vpJ3BcBcM6NdL0iuZk5M="; + }; + + buildInputs = [ + SDL2 + ]; + + dontConfigure = true; + + # It is easier to emulate build.sh script + buildPhase = '' + runHook preBuild + + cc -std=c89 -Wall -Wno-unknown-pragmas src/uxnasm.c -o uxnasm + cc -std=c89 -Wall -Wno-unknown-pragmas src/uxn.c src/uxncli.c -o uxncli + cc -std=c89 -Wall -Wno-unknown-pragmas src/uxn.c src/devices/ppu.c \ + src/devices/apu.c src/uxnemu.c $(sdl2-config --cflags --libs) -o uxnemu + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -d $out/bin/ $out/share/${pname}/ + + cp uxnasm uxncli uxnemu $out/bin/ + cp -r projects $out/share/${pname}/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://wiki.xxiivv.com/site/uxn.html"; + description = "An assembler and emulator for the Uxn stack machine"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; unix; + }; +} |