Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
python3,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
SDL2,
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "pyxel";
|
|
version = "2.3.18";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kitao";
|
|
repo = "pyxel";
|
|
rev = "v${version}";
|
|
hash = "sha256-pw1ZDmQ7zGwfM98jjym34RbLmUbjuuUnCoPGczxdai8=";
|
|
};
|
|
|
|
patches = [ ./never-bundle-sdl2.patch ];
|
|
|
|
postPatch = ''
|
|
cp ${./Cargo.lock} rust/Cargo.lock
|
|
'';
|
|
|
|
cargoRoot = "rust";
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
# generated by running `cargo generate-lockfile` in the `rust` directory
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
buildAndTestSubdir = "python";
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
bindgenHook
|
|
];
|
|
|
|
buildInputs = [ SDL2 ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
|
|
|
|
# Tests want to use the display
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"pyxel"
|
|
"pyxel.pyxel_wrapper"
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/kitao/pyxel/tree/${src.rev}/CHANGELOG.md";
|
|
description = "Retro game engine for Python";
|
|
homepage = "https://github.com/kitao/pyxel";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "pyxel";
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
};
|
|
}
|