uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
36
pkgs/development/web/woff2/brotli-static.patch
Normal file
36
pkgs/development/web/woff2/brotli-static.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
diff a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake
|
||||
--- a/cmake/FindBrotliDec.cmake
|
||||
+++ b/cmake/FindBrotliDec.cmake
|
||||
@@ -18,10 +18,10 @@ find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
HINTS ${PC_BROTLIDEC_INCLUDEDIR}
|
||||
)
|
||||
|
||||
-find_library(BROTLIDEC_LIBRARIES
|
||||
- NAMES brotlidec
|
||||
- HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
-)
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
+ set(_S "STATIC_")
|
||||
+endif()
|
||||
+set(BROTLIDEC_LIBRARIES ${PC_BROTLIDEC_${_S}LIBRARIES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BrotliDec
|
||||
diff a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake
|
||||
--- a/cmake/FindBrotliEnc.cmake
|
||||
+++ b/cmake/FindBrotliEnc.cmake
|
||||
@@ -18,10 +18,10 @@ find_path(BROTLIENC_INCLUDE_DIRS
|
||||
HINTS ${PC_BROTLIENC_INCLUDEDIR}
|
||||
)
|
||||
|
||||
-find_library(BROTLIENC_LIBRARIES
|
||||
- NAMES brotlienc
|
||||
- HINTS ${PC_BROTLIENC_LIBDIR}
|
||||
-)
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
+ set(_S "STATIC_")
|
||||
+endif()
|
||||
+set(BROTLIENC_LIBRARIES ${PC_BROTLIENC_${_S}LIBRARIES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BrotliEnc
|
||||
42
pkgs/development/web/woff2/default.nix
Normal file
42
pkgs/development/web/woff2/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ brotli, cmake, pkg-config, fetchFromGitHub, lib, stdenv
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "woff2";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "woff2";
|
||||
rev = "v${version}";
|
||||
sha256 = "13l4g536h0pr84ww4wxs2za439s0xp1va55g6l478rfbb1spp44y";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
# Need to explicitly link to brotlicommon
|
||||
patches = lib.optional static ./brotli-static.patch;
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCANONICAL_PREFIXES=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optional static "-DCMAKE_SKIP_RPATH:BOOL=TRUE";
|
||||
|
||||
propagatedBuildInputs = [ brotli ];
|
||||
|
||||
postPatch = ''
|
||||
# without this binaries only get built if shared libs are disable
|
||||
sed 's@^if (NOT BUILD_SHARED_LIBS)$@if (TRUE)@g' -i CMakeLists.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Webfont compression reference code";
|
||||
homepage = "https://github.com/google/woff2";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.hrdinka ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue