diff --git a/pkgs/development/libraries/pystring/default.nix b/pkgs/development/libraries/pystring/default.nix index df80bb773e30..3a1e64c0b000 100644 --- a/pkgs/development/libraries/pystring/default.nix +++ b/pkgs/development/libraries/pystring/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, libtool }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake }: stdenv.mkDerivation rec { pname = "pystring"; @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { sha256 = "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf"; }; - nativeBuildInputs = [ libtool ]; + patches = [ + (fetchpatch { + name = "pystring-cmake-configuration.patch"; + url = "https://github.com/imageworks/pystring/commit/4f653fc35421129eae8a2c424901ca7170059370.patch"; + sha256 = "1hynzz76ff4vvmi6kwixsmjswkpyj6s4vv05d7nw0zscj4cdp8k3"; + }) + ]; - patches = [ ./makefile.patch ]; + nativeBuildInputs = [ cmake ]; doCheck = true; - checkTarget = "test"; - - makeFlags = [ "PREFIX=$(out)" ]; meta = with lib; { homepage = "https://github.com/imageworks/pystring/"; diff --git a/pkgs/development/libraries/pystring/makefile.patch b/pkgs/development/libraries/pystring/makefile.patch deleted file mode 100644 index 0bbd6522d39d..000000000000 --- a/pkgs/development/libraries/pystring/makefile.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- pystring/Makefile.orig 2020-02-04 03:24:44.000000000 -0300 -+++ pystring/Makefile 2020-11-20 20:23:07.314247959 -0300 -@@ -1,7 +1,9 @@ --LIBTOOL = libtool --LIBDIR = /usr/lib --CXX = g++ --CXXFLAGS = -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -+LIBTOOL ?= libtool -+PREFIX ?= /usr -+INCLUDEDIR = ${PREFIX}/include/pystring -+LIBDIR = ${PREFIX}/lib -+CXX ?= g++ -+CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -fPIC - - all: libpystring.la - -@@ -12,7 +14,8 @@ - $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR) - - install: libpystring.la -- $(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$< -+ $(LIBTOOL) --mode=install install -Dm755 $< $(DESTDIR)$(LIBDIR)/$< -+ $(LIBTOOL) --mode=install install -Dm644 pystring.h $(DESTDIR)$(INCLUDEDIR)/pystring.h - - clean: - $(RM) -fr pystring.lo pystring.o libpystring.la .libs