about summary refs log tree commit diff
path: root/pkgs/development/python-modules/google-crc32c
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-01-06 10:46:48 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-01-06 23:59:50 +0100
commitac391fdc0bad04e7c83c53eb2ef527c8bc9d16cb (patch)
tree4c3d2acf80ff6876cf447dc6c144c6fe8079986a /pkgs/development/python-modules/google-crc32c
parent692345a57070f2a03b59ac66b62872717b3b2d99 (diff)
pythonPackages:google*: Noramlize names by replacing _ with -
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..aaf16d9e7c82a
--- /dev/null
+++ b/pkgs/development/python-modules/google-crc32c/default.nix
@@ -0,0 +1,31 @@
+{ lib, buildPythonPackage, fetchFromGitHub, cffi, crc32c, pytestCheckHook }:
+
+buildPythonPackage rec {
+  pname = "google-crc32c";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "googleapis";
+    repo = "python-crc32c";
+    rev = "v${version}";
+    sha256 = "0vbidg9yrv9k8xvk8rl43lsf4cg3dci4a9k4srwwrchbxivz1gr6";
+  };
+
+  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 SuperSandro2000 ];
+  };
+}