mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromSourcehut
|
|
, SDL2
|
|
, unstableGitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "uxn";
|
|
version = "unstable-2024-02-07";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~rabbits";
|
|
repo = "uxn";
|
|
rev = "300a3d7b3ed399721cef59e9ed9efe8a1d4e0f6f";
|
|
hash = "sha256-uwHXa4GhXNJHroQG8t3VQggvdCA3G4/1d/XVfsgeI7E=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
})
|