about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
commitf4d4283e3992c3f559831b1c030cd1fda6d45f98 (patch)
treec2cc63060849298d9a8e7a329010bb0fc4abb219 /nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix
parentdac53cd746c10feddd48d4a1981235a653d7d32a (diff)
parent0ace63bed8f561e4cc5b1c8fa5fee6be61fbcf8b (diff)
downloadnixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.gz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.bz2
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.lz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.xz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.zst
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix b/nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix
new file mode 100644
index 000000000000..fd00ff5df8e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/fast-histogram/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, buildPythonPackage
+, pytestCheckHook
+, fetchFromGitHub
+, python
+, pythonOlder
+, setuptools
+, setuptools-scm
+, numpy
+, wheel
+, hypothesis
+, pytest-cov
+}:
+
+buildPythonPackage rec {
+  pname = "fast-histogram";
+  version = "0.12";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "astrofrog";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Cz4BgbtxbUPxL2NSzvZYjbYIN4KUuliUV0bXRRtyvfM=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
+    wheel
+  ];
+
+  propagatedBuildInputs = [ numpy ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    hypothesis
+    pytest-cov
+  ];
+
+  pytestFlagsArray = [ "${builtins.placeholder "out"}/${python.sitePackages}" ];
+
+  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  pythonImportsCheck = [ "fast_histogram" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/astrofrog/fast-histogram";
+    description = "Fast 1D and 2D histogram functions in Python";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ ifurther ];
+  };
+}