2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, SDL2
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "uxn";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "unstable-2022-10-22";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~rabbits";
|
2022-10-30 15:09:59 +00:00
|
|
|
repo = "uxn";
|
|
|
|
rev = "1b2049e238df96f32335edf1c6db35bd09f8b42d";
|
|
|
|
hash = "sha256-lwms+qUelfpTC+i2m5b3dW7ww9298YMPFdPVsFrwcDQ=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's|UXNEMU_LDFLAGS="$(brew.*$|UXNEMU_LDFLAGS="$(sdl2-config --cflags --libs)"|' build.sh
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
./build.sh --no-run
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
install -d $out/bin/ $out/share/uxn/
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
cp bin/uxnasm bin/uxncli bin/uxnemu $out/bin/
|
|
|
|
cp -r projects $out/share/uxn/
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
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 ];
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres kototama ];
|
2021-09-18 10:52:07 +00:00
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|