diff --git a/pkgs/by-name/fo/foonathan-memory/0001-Use-system-doctest.patch.patch b/pkgs/by-name/fo/foonathan-memory/0001-Use-system-doctest.patch.patch new file mode 100644 index 000000000000..6c7934370722 --- /dev/null +++ b/pkgs/by-name/fo/foonathan-memory/0001-Use-system-doctest.patch.patch @@ -0,0 +1,26 @@ +From: =?utf-8?q?Timo_R=C3=B6hling?= +Date: Wed, 2 Dec 2020 15:59:22 +0100 +Subject: Use system doctest + +Forwarded: not-needed +--- + test/CMakeLists.txt | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 37359ea..f269cfb 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -8,11 +8,7 @@ target_link_libraries(foonathan_memory_profiling foonathan_memory) + target_include_directories(foonathan_memory_profiling PRIVATE + ${FOONATHAN_MEMORY_SOURCE_DIR}/include/foonathan/memory) + +-# Fetch doctest. +-message(STATUS "Fetching doctest") +-include(FetchContent) +-FetchContent_Declare(doctest URL https://github.com/doctest/doctest/archive/refs/tags/v2.4.12.zip) +-FetchContent_MakeAvailable(doctest) ++find_package(doctest REQUIRED) + + set(tests + test_allocator.hpp diff --git a/pkgs/by-name/fo/foonathan-memory/package.nix b/pkgs/by-name/fo/foonathan-memory/package.nix index ecfd1a226b8b..703ff9e464ec 100644 --- a/pkgs/by-name/fo/foonathan-memory/package.nix +++ b/pkgs/by-name/fo/foonathan-memory/package.nix @@ -2,28 +2,25 @@ stdenv, lib, fetchFromGitHub, - fetchpatch, cmake, doctest, }: stdenv.mkDerivation (finalAttrs: { pname = "foonathan-memory"; - version = "0.7-3"; + version = "0.7-4"; src = fetchFromGitHub { owner = "foonathan"; repo = "memory"; rev = "v${finalAttrs.version}"; - hash = "sha256-nLBnxPbPKiLCFF2TJgD/eJKJJfzktVBW3SRW2m3WK/s="; + hash = "sha256-qGbI7SL6lDbJzn2hkqaYw35QAyvSPxcZTb0ltDkPUSo="; }; patches = [ # do not download doctest, use the system doctest instead - (fetchpatch { - url = "https://sources.debian.org/data/main/f/foonathan-memory/0.7.3-2/debian/patches/0001-Use-system-doctest.patch"; - hash = "sha256-/MuDeeIh+7osz11VfsAsQzm9HMZuifff+MDU3bDDxRE="; - }) + # originally from: https://sources.debian.org/data/main/f/foonathan-memory/0.7.3-2/debian/patches/0001-Use-system-doctest.patch + ./0001-Use-system-doctest.patch.patch ]; outputs = [ @@ -44,12 +41,13 @@ stdenv.mkDerivation (finalAttrs: { # fix a circular dependency between "out" and "dev" outputs postInstall = '' - mkdir -p $dev/lib - mv $out/lib/foonathan_memory $dev/lib/ + mkdir -p $out/lib/cmake + mv $out/lib/foonathan_memory/cmake $out/lib/cmake/foonathan_memory + rmdir $out/lib/foonathan_memory ''; meta = with lib; { - homepage = "https://github.com/foonathan/memory"; + homepage = "https://memory.foonathan.net/"; changelog = "https://github.com/foonathan/memory/releases/tag/${finalAttrs.src.rev}"; description = "STL compatible C++ memory allocator library"; mainProgram = "nodesize_dbg";