smap: init at 0.1.12 (#371402)
[NixPkgs.git] / pkgs / development / python-modules / skytemple-files / default.nix
blob5baa8bb7405fee29a388d34062ed72e765bc0e88
2   stdenv,
3   lib,
4   buildPythonPackage,
5   fetchFromGitHub,
6   appdirs,
7   dungeon-eos,
8   explorerscript,
9   ndspy,
10   pillow,
11   setuptools,
12   skytemple-rust,
13   pyyaml,
14   pmdsky-debug-py,
15   range-typed-integers,
16   pythonOlder,
17   # optional dependancies for SpriteCollab
18   aiohttp,
19   lru-dict,
20   graphql-core,
21   gql,
22   armips,
23   # tests
24   pytestCheckHook,
25   parameterized,
26   xmldiff,
29 buildPythonPackage rec {
30   pname = "skytemple-files";
31   version = "1.8.3";
32   pyproject = true;
34   disabled = pythonOlder "3.9";
36   src = fetchFromGitHub {
37     owner = "SkyTemple";
38     repo = "skytemple-files";
39     rev = version;
40     hash = "sha256-4ENuYq074j/VdzLyrGVCGaZhoStwlgJWTqGbrt20A3Q=";
41     # Most patches are in submodules
42     fetchSubmodules = true;
43   };
45   postPatch = ''
46     substituteInPlace skytemple_files/patch/arm_patcher.py skytemple_files/data/data_cd/armips_importer.py \
47       --replace-fail "exec_name = os.getenv(\"SKYTEMPLE_ARMIPS_EXEC\", f\"{prefix}armips\")" "exec_name = \"${armips}/bin/armips\""
48   '';
50   build-system = [ setuptools ];
52   buildInputs = [ armips ];
54   dependencies = [
55     appdirs
56     dungeon-eos
57     explorerscript
58     ndspy
59     pillow
60     skytemple-rust
61     pyyaml
62     pmdsky-debug-py
63     range-typed-integers
64   ];
66   optional-dependencies = {
67     spritecollab = [
68       aiohttp
69       gql
70       graphql-core
71       lru-dict
72     ] ++ gql.optional-dependencies.aiohttp;
73   };
75   nativeCheckInputs = [
76     pytestCheckHook
77     parameterized
78     xmldiff
79   ] ++ optional-dependencies.spritecollab;
81   preCheck = "pushd test";
82   postCheck = "popd";
84   disabledTestPaths = [
85     "skytemple_files_test/common/spritecollab/sc_online_test.py"
86     "skytemple_files_test/compression_container/atupx/atupx_test.py" # Particularly long test
87   ];
89   pythonImportsCheck = [ "skytemple_files" ];
91   meta = with lib; {
92     homepage = "https://github.com/SkyTemple/skytemple-files";
93     description = "Python library to edit the ROM of Pokémon Mystery Dungeon Explorers of Sky";
94     mainProgram = "skytemple_export_maps";
95     license = licenses.gpl3Plus;
96     maintainers = with maintainers; [ marius851000 ];
97     broken = stdenv.hostPlatform.isDarwin; # pyobjc is missing
98   };