2023-07-17 17:06:45 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonEnv = (python3.withPackages (ps: with ps; [
|
|
|
|
pyside6
|
|
|
|
py65
|
|
|
|
qdarkstyle
|
|
|
|
]));
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "smb3-foundry";
|
2023-09-03 01:03:37 +02:00
|
|
|
version = "1.3.1";
|
2023-07-17 17:06:45 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mchlnix";
|
|
|
|
repo = "SMB3-Foundry";
|
|
|
|
rev = "refs/tags/${finalAttrs.version}";
|
2023-09-03 01:03:37 +02:00
|
|
|
hash = "sha256-8cf7VhvC372Cqi94n2FSHcoCGblpZoZvBXcXq5jU6CY=";
|
2023-07-17 17:06:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/app
|
|
|
|
cp -R smb3parse foundry scribe data doc VERSION smb3-foundry.py smb3-scribe.py $out/app
|
|
|
|
|
|
|
|
makeWrapper ${pythonEnv}/bin/python $out/bin/smb3-foundry \
|
|
|
|
--add-flags "$out/app/smb3-foundry.py"
|
|
|
|
makeWrapper ${pythonEnv}/bin/python $out/bin/smb3-scribe \
|
|
|
|
--add-flags "$out/app/smb3-scribe.py"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/mchlnix/SMB3-Foundry/releases/tag/${finalAttrs.version}";
|
2023-09-03 01:03:37 +02:00
|
|
|
description = "A modern Super Mario Bros. 3 Level Editor";
|
|
|
|
homepage = "https://github.com/mchlnix/SMB3-Foundry";
|
2023-07-17 17:06:45 +02:00
|
|
|
license = lib.licenses.gpl3Only;
|
2023-09-03 01:03:37 +02:00
|
|
|
mainProgram = "smb3-foundry";
|
2023-07-17 17:06:45 +02:00
|
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
2023-09-03 01:03:37 +02:00
|
|
|
platforms = lib.platforms.unix;
|
2023-07-17 17:06:45 +02:00
|
|
|
};
|
|
|
|
})
|