nixpkgs/pkgs/by-name/ux/uxn/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.4 KiB
Nix
Raw Normal View History

2021-08-27 04:31:00 +00:00
{ lib
, stdenv
, fetchFromSourcehut
, SDL2
, unstableGitUpdater
2021-08-27 04:31:00 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2021-08-27 04:31:00 +00:00
pname = "uxn";
version = "1.0-unstable-2024-02-15";
2021-08-27 04:31:00 +00:00
src = fetchFromSourcehut {
owner = "~rabbits";
repo = "uxn";
rev = "c37d2cd75c855d0932a93cd8fdadd1db00b05e48";
hash = "sha256-O8XN0+ixo2xMXtJkEoJAqrKZ1M4s4YoHSxKWGOUyl1k=";
2021-08-27 04:31:00 +00:00
};
outputs = [ "out" "projects" ];
nativeBuildInputs = [
SDL2
];
2021-08-27 04:31:00 +00:00
buildInputs = [
SDL2
];
strictDeps = true;
postPatch = ''
patchShebangs build.sh
substituteInPlace build.sh \
--replace "-L/usr/local/lib " ""
'';
2021-08-27 04:31:00 +00:00
buildPhase = ''
runHook preBuild
./build.sh --no-run
2021-08-27 04:31:00 +00:00
runHook postBuild
'';
# ./build.sh --install is meant to install in $HOME, therefore not useful for
# package maintainers
2021-08-27 04:31:00 +00:00
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/
2021-08-27 04:31:00 +00:00
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };
meta = {
2021-08-27 04:31:00 +00:00
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;
2024-02-26 18:23:51 +00:00
broken = stdenv.isDarwin;
2021-08-27 04:31:00 +00:00
};
})