mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
snappy: add pkgsStatic support
This commit is contained in:
parent
0aeacdeaae
commit
a244885c63
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, cmake }:
|
||||
{ stdenv, fetchFromGitHub, cmake, static ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "snappy";
|
||||
|
@ -17,7 +17,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \
|
||||
|
@ -29,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://google.github.io/snappy/;
|
||||
homepage = "https://google.github.io/snappy/";
|
||||
license = licenses.bsd3;
|
||||
description = "Compression/decompression library for very high speeds";
|
||||
platforms = platforms.all;
|
||||
|
|
|
@ -206,6 +206,9 @@ in {
|
|||
woff2 = super.woff2.override {
|
||||
static = true;
|
||||
};
|
||||
snappy = super.snappy.override {
|
||||
static = true;
|
||||
};
|
||||
lz4 = super.lz4.override {
|
||||
enableShared = false;
|
||||
enableStatic = true;
|
||||
|
|
Loading…
Reference in a new issue