about summary refs log tree commit diff
path: root/pkgs/development/python-modules/google-crc32c
diff options
context:
space:
mode:
authorfreezeboy <freezeboy@users.noreply.github.com>2020-09-21 15:10:08 +0200
committerJon <jonringer@users.noreply.github.com>2020-09-22 23:10:00 -0700
commit2468315f2b4715ea3392450966e832aab756bc41 (patch)
tree2ae63c8bf291f26f99477f963f13d67b5867ee3e /pkgs/development/python-modules/google-crc32c
parent160f169f03cd338c065d2060512259c140666e2d (diff)
python3Packages.crc32c: init at 1.0.0
Diffstat (limited to 'pkgs/development/python-modules/google-crc32c')
-rw-r--r--pkgs/development/python-modules/google-crc32c/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/google-crc32c/default.nix b/pkgs/development/python-modules/google-crc32c/default.nix
new file mode 100644
index 0000000000000..fbed406cebcea
--- /dev/null
+++ b/pkgs/development/python-modules/google-crc32c/default.nix
@@ -0,0 +1,31 @@
+{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, cffi, crc32c, pytestCheckHook }:
+
+buildPythonPackage rec {
+  pname = "google-crc32c";
+  version = "1.0.0";
+
+  disabled = !isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "googleapis";
+    repo = "python-crc32c";
+    rev = "v${version}";
+    sha256 = "0n3ggsxmk1fhq0kz6p5rcj4gypfb05i26fcn7lsawakgl7fzxqyl";
+  };
+
+  buildInputs = [ crc32c  ];
+  propagatedBuildInputs = [ cffi ];
+
+  LDFLAGS = "-L${crc32c}/lib";
+  CFLAGS = "-I${crc32c}/include";
+
+  checkInputs = [ pytestCheckHook crc32c ];
+  pythonImportsCheck = [ "google_crc32c" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/googleapis/python-crc32c";
+    description = "Wrapper the google/crc32c hardware-based implementation of the CRC32C hashing algorithm";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ freezeboy ];
+  };
+}