summary refs log tree commit diff
path: root/pkgs/development/libraries/crc32c/default.nix
blob: a7313c2055367c152b96e30f0433d1ed8d9191d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ stdenv, fetchFromGitHub, cmake, gflags }:
stdenv.mkDerivation rec {
  pname = "crc32c";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "google";
    repo = "crc32c";
    rev = version;
    sha256 = "1sazkis9rzbrklfrvk7jn1mqywnq4yghmzg94mxd153h8b1sb149";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ gflags ];
  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc";

  meta = with stdenv.lib; {
    homepage = https://github.com/google/crc32c;
    description = "CRC32C implementation with support for CPU-specific acceleration instructions";
    license = with licenses; [ bsd3 ];
    maintainers = with maintainers; [ andir ];
  };
}