mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Fix http_parser build on darwin
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
c982e84df4
commit
2794d74506
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, gyp, utillinux }:
|
||||
{ stdenv, fetchurl, gyp, utillinux, python }:
|
||||
|
||||
let
|
||||
version = "2.1";
|
||||
@ -16,9 +16,9 @@ in stdenv.mkDerivation {
|
||||
|
||||
buildFlags = [ "BUILDTYPE=Release" ];
|
||||
|
||||
buildInputs = [ gyp ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
|
||||
buildInputs = [ gyp ] ++ (stdenv.lib.optional stdenv.isLinux utillinux) ++ stdenv.lib.optional stdenv.isDarwin python;
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
out/Release/test-nonstrict
|
||||
@ -26,13 +26,18 @@ in stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv out/Release/lib.target $out/lib
|
||||
mkdir -p $out/lib
|
||||
mv out/Release/${if stdenv.isDarwin then "*.dylib" else "lib.target/*"} $out/lib
|
||||
|
||||
mkdir -p $out/include
|
||||
mv http_parser.h $out/include
|
||||
'';
|
||||
|
||||
postFixup = if stdenv.isDarwin then ''
|
||||
install_name_tool -id $out/lib/libhttp_parser.dylib $out/lib/libhttp_parser.dylib
|
||||
install_name_tool -id $out/lib/libhttp_parser_strict.dylib $out/lib/libhttp_parser_strict.dylib
|
||||
'' else null;
|
||||
|
||||
meta = {
|
||||
description = "An HTTP message parser written in C";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user