summary refs log tree commit diff
path: root/pkgs/development/tools/rust/maturin/default.nix
diff options
context:
space:
mode:
authorDaniël de Kok <me@danieldk.eu>2019-08-30 20:59:44 +0200
committerDaniël de Kok <me@danieldk.eu>2019-08-30 20:59:44 +0200
commit7e29ce8a774ecf7831820feb3c82e69bf67c1fcb (patch)
tree7657312707d7dc8be7de9cbe11c85e8970dccc3a /pkgs/development/tools/rust/maturin/default.nix
parent3b67af56d7ce482e7534ae20d6ad42211c0f42a7 (diff)
downloadnixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar.gz
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar.bz2
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar.lz
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar.xz
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.tar.zst
nixpkgs-7e29ce8a774ecf7831820feb3c82e69bf67c1fcb.zip
maturin: 0.6.1 -> 0.7.0
pyo3-pack has been renamed to maturin version 0.7.0. Other larger
changes are:

- Mixed rust/python layout
- Added PEP 517 support
- Support settings all applicable fields from the python core
  metadata specification in Cargo.toml
Diffstat (limited to 'pkgs/development/tools/rust/maturin/default.nix')
-rw-r--r--pkgs/development/tools/rust/maturin/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix
new file mode 100644
index 00000000000..4b07129ae0e
--- /dev/null
+++ b/pkgs/development/tools/rust/maturin/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkgconfig
+, darwin }:
+
+let
+  inherit (darwin.apple_sdk.frameworks) Security;
+in rustPlatform.buildRustPackage rec {
+  name = "maturin-${version}";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "PyO3";
+    repo = "maturin";
+    rev = "v${version}";
+    sha256 = "1qscn8ycyg9ldkp1v5178mlw8r5ak2p12x52c0w4hgij7y1q5s39";
+  };
+
+  cargoSha256 = "0fk9dgwkgkkmxxd8ydl0vp14jhzi65pkz36v5h3nkp4cb4n4cvdj";
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ gmp openssl ]
+    ++ stdenv.lib.optional stdenv.isDarwin Security
+    ++ stdenv.lib.optional stdenv.isLinux dbus;
+
+  # Requires network access, fails in sandbox.
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Build and publish crates with pyo3 bindings as python packages";
+    homepage = https://github.com/PyO3/maturin;
+    license = licenses.mit;
+    maintainers = [ maintainers.danieldk ];
+    platforms = platforms.all;
+  };
+}