From 479ca09609e7210b73df28f869bfbdddc9551519 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 21 Jan 2022 03:38:24 +0100 Subject: [PATCH 1/2] tulip: 5.2.1 -> 5.6.1 --- pkgs/applications/science/misc/tulip/default.nix | 15 ++++++++------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/science/misc/tulip/default.nix b/pkgs/applications/science/misc/tulip/default.nix index 1dfd47a3d381..87a05f146e9e 100644 --- a/pkgs/applications/science/misc/tulip/default.nix +++ b/pkgs/applications/science/misc/tulip/default.nix @@ -1,19 +1,20 @@ -{ fetchurl, lib, stdenv, libxml2, freetype, libGLU, libGL, glew, qt4 -, cmake, makeWrapper, libjpeg, python2 }: +{ fetchurl, lib, stdenv, libxml2, freetype, libGLU, libGL, glew +, qtbase, wrapQtAppsHook, python3 +, cmake, libjpeg }: -let version = "5.2.1"; in stdenv.mkDerivation rec { pname = "tulip"; - inherit version; + version = "5.6.1"; src = fetchurl { url = "mirror://sourceforge/auber/${pname}-${version}_src.tar.gz"; - sha256 = "0bqmqy6sri87a8xv5xf7ffaq5zin4hiaa13g0l64b84i7yckfwky"; + sha256 = "1fy3nvgxv3igwc1d23zailcgigj1d0f2kkh7a5j24c0dyqz5zxmw"; }; - buildInputs = [ libxml2 freetype glew libGLU libGL qt4 libjpeg python2 ]; + buildInputs = [ libxml2 freetype glew libGLU libGL libjpeg qtbase python3 ]; + nativeBuildInputs = [ cmake wrapQtAppsHook ]; - nativeBuildInputs = [ cmake makeWrapper ]; + qtWrapperArgs = [ ''--prefix PATH : ${lib.makeBinPath [ python3 ]}'' ]; # FIXME: "make check" needs Docbook's DTD 4.4, among other things. doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e9853a6702b..3edef50f4248 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32517,9 +32517,7 @@ with pkgs; astrolabe-generator = callPackage ../applications/science/astronomy/astrolabe-generator { }; - tulip = callPackage ../applications/science/misc/tulip { - cmake = cmake_2_8; - }; + tulip = libsForQt5.callPackage ../applications/science/misc/tulip { }; vite = callPackage ../applications/science/misc/vite { }; From 5161de0a1ec43a7bd7f5c3af7428f99b4f0905f3 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 21 Jan 2022 03:38:53 +0100 Subject: [PATCH 2/2] cmake_2_8: drop --- .../tools/build-managers/cmake/2.8.nix | 88 ------------------ .../cmake/search-path-2.8.patch | 92 ------------------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 182 deletions(-) delete mode 100644 pkgs/development/tools/build-managers/cmake/2.8.nix delete mode 100644 pkgs/development/tools/build-managers/cmake/search-path-2.8.patch diff --git a/pkgs/development/tools/build-managers/cmake/2.8.nix b/pkgs/development/tools/build-managers/cmake/2.8.nix deleted file mode 100644 index ec03e285603f..000000000000 --- a/pkgs/development/tools/build-managers/cmake/2.8.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ lib, stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2 -, useNcurses ? false, ncurses, useQt4 ? false, qt4, ps -}: - -with lib; - -assert stdenv ? cc; -assert stdenv.cc ? libc; - -let - os = lib.optionalString; - majorVersion = "2.8"; - minorVersion = "12.2"; - version = "${majorVersion}.${minorVersion}"; -in - -stdenv.mkDerivation rec { - pname = "cmake${os useNcurses "-cursesUI"}${os useQt4 "-qt4UI"}"; - inherit version; - - inherit majorVersion; - - src = fetchurl { - url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - sha256 = "0phf295a9cby0v7zqdswr238v5aiy3rb2fs6dz39zjxbmzlp8rcc"; - }; - - enableParallelBuilding = true; - - patches = - [(fetchpatch { # see https://www.cmake.org/Bug/view.php?id=13959 - name = "FindFreetype-2.5.patch"; - url = "https://public.kitware.com/Bug/file/4660/0001-Support-finding-freetype2-using-pkg-config.patch"; - sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj"; - })] ++ - # Don't search in non-Nix locations such as /usr, but do search in our libc. - [ ./search-path-2.8.patch ] ++ - optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchurl { - name = "fix-darwin-cross-compile.patch"; - url = "https://public.kitware.com/Bug/file_download.php?" - + "file_id=4981&type=bug"; - sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv"; - }); - - postPatch = '' - substituteInPlace Utilities/cmlibarchive/CMakeLists.txt \ - --replace '"-framework CoreServices"' '""' - ''; - - buildInputs = [ setupHook curl expat zlib bzip2 ] - ++ optional useNcurses ncurses - ++ optional useQt4 qt4; - - propagatedBuildInputs = [ ps ]; - - CMAKE_PREFIX_PATH = concatStringsSep ":" - (concatMap (p: [ (p.dev or p) (p.out or p) ]) buildInputs); - - configureFlags = [ - "--docdir=/share/doc/${pname}-${version}" - "--mandir=/share/man" - "--system-libs" - "--no-system-libarchive" - ] ++ lib.optional useQt4 "--qt-gui"; - - setupHook = ./setup-hook.sh; - - dontUseCmakeConfigure = true; - - preConfigure = with stdenv; '' - fixCmakeFiles . - substituteInPlace Modules/Platform/UnixPaths.cmake \ - --subst-var-by libc_bin ${getBin cc.libc} \ - --subst-var-by libc_dev ${getDev cc.libc} \ - --subst-var-by libc_lib ${getLib cc.libc} - configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags" - ''; - - hardeningDisable = [ "format" ]; - - meta = { - homepage = "https://cmake.org"; - description = "Cross-Platform Makefile Generator"; - platforms = if useQt4 then qt4.meta.platforms else lib.platforms.unix; - maintainers = with lib.maintainers; [ xfix ]; - license = lib.licenses.bsd3; - }; -} diff --git a/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch b/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch deleted file mode 100644 index 9fc949661686..000000000000 --- a/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff -ru3 cmake-2.8.12.2/Modules/Platform/Linux.cmake cmake-2.8.12.2-new/Modules/Platform/Linux.cmake ---- cmake-2.8.12.2/Modules/Platform/Linux.cmake 2014-01-16 21:15:08.000000000 +0400 -+++ cmake-2.8.12.2-new/Modules/Platform/Linux.cmake 2016-04-13 22:00:32.928575740 +0300 -@@ -36,22 +36,11 @@ - # checking the platform every time. This option is advanced enough - # that only package maintainers should need to adjust it. They are - # capable of providing a setting on the command line. -- if(EXISTS "/etc/debian_version") -- set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL -- "Install .so files without execute permission.") -- else() -- set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL -- "Install .so files without execute permission.") -- endif() -+ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL -+ "Install .so files without execute permission.") - endif() - - # Match multiarch library directory names. - set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") - - include(Platform/UnixPaths) -- --# Debian has lib64 paths only for compatibility so they should not be --# searched. --if(EXISTS "/etc/debian_version") -- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) --endif() -diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake ---- cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake 2014-01-16 21:15:08.000000000 +0400 -+++ cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake 2016-04-14 00:09:10.106362636 +0300 -@@ -32,9 +32,6 @@ - # List common installation prefixes. These will be used for all - # search types. - list(APPEND CMAKE_SYSTEM_PREFIX_PATH -- # Standard -- /usr/local /usr / -- - # CMake install location - "${_CMAKE_INSTALL_DIR}" - -@@ -44,44 +41,26 @@ - - # List common include file locations not under the common prefixes. - list(APPEND CMAKE_SYSTEM_INCLUDE_PATH -- # Windows API on Cygwin -- /usr/include/w32api -- -- # X11 -- /usr/X11R6/include /usr/include/X11 -- -- # Other -- /usr/pkg/include -- /opt/csw/include /opt/include -- /usr/openwin/include -+ @libc_dev@/include - ) - - list(APPEND CMAKE_SYSTEM_LIBRARY_PATH -- # Windows API on Cygwin -- /usr/lib/w32api -- -- # X11 -- /usr/X11R6/lib /usr/lib/X11 -- -- # Other -- /usr/pkg/lib -- /opt/csw/lib /opt/lib -- /usr/openwin/lib -+ @libc_lib@/lib - ) - - list(APPEND CMAKE_SYSTEM_PROGRAM_PATH -- /usr/pkg/bin -+ @libc_bin@/bin - ) - - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES -- /lib /usr/lib /usr/lib32 /usr/lib64 -+ @libc_lib@/lib - ) - - list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @libc_dev@/include - ) - list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @libc_dev@/include - ) - - # Enable use of lib64 search path variants by default. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3edef50f4248..667d794a6508 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14433,8 +14433,6 @@ with pkgs; ctmg = callPackage ../tools/security/ctmg { }; - cmake_2_8 = callPackage ../development/tools/build-managers/cmake/2.8.nix { }; - cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { inherit (darwin.apple_sdk.frameworks) SystemConfiguration; };