crc32c: enable static

This commit is contained in:
freezeboy 2020-09-21 15:09:15 +02:00 committed by Jon
parent e283133520
commit 160f169f03
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, gflags }:
{ stdenv, lib, fetchFromGitHub, cmake, gflags
, staticOnly ? false }:
stdenv.mkDerivation rec {
pname = "crc32c";
version = "1.1.0";
@ -14,6 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ gflags ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc";
cmakeFlags = lib.optionals (!staticOnly) [ "-DBUILD_SHARED_LIBS=1" ];
meta = with stdenv.lib; {
homepage = "https://github.com/google/crc32c";

View file

@ -191,6 +191,9 @@ in {
gsm = super.gsm.override {
staticSupport = true;
};
crc32c = super.crc32c.override {
staticOnly = true;
};
parted = super.parted.override {
enableStatic = true;
};