From 455689301962fc8a02c298ba67a4e56a102c1948 Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Wed, 23 Jun 2021 19:12:38 -0500 Subject: [PATCH] pystring: Use CMake build Has a pull request open on the upstream repo, thus may be upstreamed in the future as opposed to the previous makefile patch. --- .../libraries/pystring/default.nix | 15 ++++++----- .../libraries/pystring/makefile.patch | 26 ------------------- 2 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 pkgs/development/libraries/pystring/makefile.patch diff --git a/pkgs/development/libraries/pystring/default.nix b/pkgs/development/libraries/pystring/default.nix index df80bb773e3..3a1e64c0b00 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 0bbd6522d39..00000000000 --- 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