Skip to content

Commit

Permalink
crc32c: enable static
Browse files Browse the repository at this point in the history
  • Loading branch information
freezeboy authored and Jon committed Sep 23, 2020
1 parent e283133 commit 160f169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/development/libraries/crc32c/default.nix
@@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, gflags }:
{ stdenv, lib, fetchFromGitHub, cmake, gflags
, staticOnly ? false }:

stdenv.mkDerivation rec {
pname = "crc32c";
version = "1.1.0";
Expand All @@ -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";
Expand Down
3 changes: 3 additions & 0 deletions pkgs/top-level/static.nix
Expand Up @@ -191,6 +191,9 @@ in {
gsm = super.gsm.override {
staticSupport = true;
};
crc32c = super.crc32c.override {
staticOnly = true;
};
parted = super.parted.override {
enableStatic = true;
};
Expand Down

0 comments on commit 160f169

Please sign in to comment.