mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromSourcehut
|
|
, SDL2
|
|
, unstableGitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "uxn";
|
|
version = "unstable-2024-03-30";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~rabbits";
|
|
repo = "uxn";
|
|
rev = "fc6ec0b387723940868133fade8854ad37648881";
|
|
hash = "sha256-Ver8oI3IzxwF6KeZ85d3mmiCwARVoH+RZoFNCxhGFDc=";
|
|
};
|
|
|
|
outputs = [ "out" "projects" ];
|
|
|
|
nativeBuildInputs = [
|
|
SDL2
|
|
];
|
|
|
|
buildInputs = [
|
|
SDL2
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
postPatch = ''
|
|
patchShebangs build.sh
|
|
substituteInPlace build.sh \
|
|
--replace "-L/usr/local/lib " ""
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
./build.sh --no-run
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
# ./build.sh --install is meant to install in $HOME, therefore not useful for
|
|
# package maintainers
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -d $out/bin/
|
|
cp bin/uxnasm bin/uxncli bin/uxnemu $out/bin/
|
|
install -d $projects/share/uxn/
|
|
cp -r projects $projects/share/uxn/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
meta = {
|
|
homepage = "https://wiki.xxiivv.com/site/uxn.html";
|
|
description = "An assembler and emulator for the Uxn stack machine";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
mainProgram = "uxnemu";
|
|
inherit (SDL2.meta) platforms;
|
|
broken = stdenv.isDarwin;
|
|
};
|
|
})
|