Commit efb7e1b9 authored by Dmitry Bogatov's avatar Dmitry Bogatov Committed by Frederik Rietdijk
Browse files

xxHash: fix static build

Patch upstream Makefile to not attempt to build dynamic library if host
platform is static only (pkgsStatic).
parent 8121c9ba
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
    sha256 = "0hpbzdd6kfki5f61g103vp7pfczqkdj0js63avl0ss552jfb8h96";
  };

  # Upstream Makefile does not anticipate that user may not want to
  # build .so library.
  postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isStatic ''
    sed -i 's/lib: libxxhash.a libxxhash/lib: libxxhash.a/' Makefile
    sed -i '/LIBXXH) $(DESTDIR/ d' Makefile
  '';

  outputs = [ "out" "dev" ];

  makeFlags = [ "PREFIX=$(dev)" "EXEC_PREFIX=$(out)" ];