diff --git a/pkgs/by-name/vm/vmmlib/disable-cpack.patch b/pkgs/by-name/vm/vmmlib/disable-cpack.patch deleted file mode 100644 index 8b9a7983a928..000000000000 --- a/pkgs/by-name/vm/vmmlib/disable-cpack.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 1970-01-01 00:00:01.000000000 +0000 -+++ b/CMakeLists.txt 2016-02-19 08:49:30.053759000 +0000 -@@ -178,6 +178,5 @@ - install(FILES ${DOCS} DESTINATION share/vmmlib COMPONENT dev) - - include(DoxygenRule) # must be after all targets --include(CPackConfig) - include(CTest) --include(PackageConfig) -+ diff --git a/pkgs/by-name/vm/vmmlib/package.nix b/pkgs/by-name/vm/vmmlib/package.nix index 3a15b69d453a..426a4c04fd80 100644 --- a/pkgs/by-name/vm/vmmlib/package.nix +++ b/pkgs/by-name/vm/vmmlib/package.nix @@ -9,18 +9,21 @@ }: stdenv.mkDerivation rec { - version = "1.6.2"; + version = "1.14.0"; pname = "vmmlib"; src = fetchFromGitHub { - owner = "VMML"; + owner = "Eyescale"; repo = "vmmlib"; - rev = "release-${version}"; - sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml"; + tag = "${version}"; + hash = "sha256-QEfeQcE66XbsFTN/Fojgldem5C+RhbOBmRyBX3sfUrg="; + + fetchSubmodules = true; }; - patches = [ - ./disable-cpack.patch # disable the need of cpack/rpm + cmakeFlags = [ + # Prevent -Werror=deprecated-copy from failing the build + "-DCMAKE_CXX_FLAGS=-Wno-error=deprecated-copy" ]; nativeBuildInputs = [ @@ -32,6 +35,14 @@ stdenv.mkDerivation rec { lapack ]; + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail "cmake_minimum_required(VERSION 3.1 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" \ + --replace-fail "include(CPackConfig)" "" + substituteInPlace CMake/common/Common.cmake \ + --replace-fail "cmake_minimum_required(VERSION 3.1 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" + ''; + doCheck = !stdenv.hostPlatform.isDarwin; checkTarget = "test";