about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix b/nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix
new file mode 100644
index 000000000000..d22d61099587
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix
@@ -0,0 +1,31 @@
+{ lib, buildPythonPackage, fetchFromGitHub, rustPlatform, setuptools-rust }:
+
+buildPythonPackage rec {
+  pname = "skytemple-rust";
+  version = "unstable-2021-05-30"; # Contains build bug fixes, but is otherwise identical to 0.0.1.post0
+
+  src = fetchFromGitHub {
+    owner = "SkyTemple";
+    repo = pname;
+    rev = "cff8b2930af6d25d41331fab8c04f56a4fd75e95";
+    sha256 = "18y6wwvzyw062zlv3gcirr1hgld9d97ffyrvy0jvw8nr3b9h9x0i";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    sha256 = "1ypcsf9gbq1bz29kfn7g4kg8741mxg1lfcbb14a0vfhjq4d6pnx9";
+  };
+
+  nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
+
+  doCheck = false; # there are no tests
+  pythonImportsCheck = [ "skytemple_rust" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/SkyTemple/skytemple-rust";
+    description = "Binary Rust extensions for SkyTemple";
+    license = licenses.mit;
+    maintainers = with maintainers; [ xfix ];
+  };
+}