From 3e9c5e71c15f1133580c2dc327ff24ea49a68ad8 Mon Sep 17 00:00:00 2001 From: emaryn Date: Mon, 28 Apr 2025 20:51:30 +0800 Subject: [PATCH] gnudatalanguage: 1.0.1 -> 1.1.1 --- .../interpreters/gnudatalanguage/default.nix | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/pkgs/development/interpreters/gnudatalanguage/default.nix b/pkgs/development/interpreters/gnudatalanguage/default.nix index f7570e745d3d..9f7f222949e2 100644 --- a/pkgs/development/interpreters/gnudatalanguage/default.nix +++ b/pkgs/development/interpreters/gnudatalanguage/default.nix @@ -1,6 +1,6 @@ { - stdenv, lib, + stdenv, fetchFromGitHub, cmake, wrapGAppsHook3, @@ -24,6 +24,7 @@ libtiff, libgeotiff, libjpeg, + qhull, # eccodes is broken on darwin enableGRIB ? stdenv.hostPlatform.isLinux, eccodes, @@ -32,7 +33,6 @@ # We enable it in hdf4 and use libtirpc as a dependency here from the passthru # of hdf4 enableLibtirpc ? stdenv.hostPlatform.isLinux, - libtirpc, python3, enableMPI ? (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), # Choose MPICH over OpenMPI because it currently builds on AArch and Darwin @@ -110,19 +110,31 @@ let ; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gnudatalanguage"; - version = "1.0.1"; + version = "1.1.1"; src = fetchFromGitHub { - owner = pname; + owner = "gnudatalanguage"; repo = "gdl"; - rev = "v${version}"; - sha256 = "sha256-IrCLL8MQp0SkWj7sbfZlma5FrnMbgdl4E/1nPGy0Y60="; + tag = "v${finalAttrs.version}"; + hash = "sha256-fLsa/R8+7QZcxjqJLnHZivRF6dD4a6J6KuCqYvazaCU="; + fetchSubmodules = true; }; + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail 'FATAL_ERROR "The src' 'WARNING "The src' \ + --replace-fail "find_package(Git REQUIRED)" "" \ + --replace-fail "-D GIT_EXECUTABLE=''${GIT_EXECUTABLE}" "" + echo -e 'set(VERSION "${finalAttrs.version}")\n\nconfigure_file(''${SRC} ''${DST})' > CMakeModules/GenerateVersionHeader.cmake + ''; + + nativeBuildInputs = [ cmake ] ++ lib.optional enableWX wrapGAppsHook3; + buildInputs = [ + qhull readline ncurses zlib @@ -161,10 +173,6 @@ stdenv.mkDerivation rec { (python3.withPackages (ps: with ps; [ numpy ])) ]; - nativeBuildInputs = [ - cmake - ] ++ lib.optional enableWX wrapGAppsHook3; - cmakeFlags = lib.optional (!enableHDF4) "-DHDF=OFF" ++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ] @@ -199,6 +207,8 @@ stdenv.mkDerivation rec { "test_call_external" "test_tic_toc" "test_timestamp" + "test_bugs_poly2d" + "test_formats" ] }'") ''; @@ -219,7 +229,7 @@ stdenv.mkDerivation rec { ; }; - meta = with lib; { + meta = { description = "Free incremental compiler of IDL"; longDescription = '' GDL (GNU Data Language) is a free/libre/open source incremental compiler @@ -227,9 +237,9 @@ stdenv.mkDerivation rec { GDL is aimed as a drop-in replacement for IDL. ''; homepage = "https://github.com/gnudatalanguage/gdl"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ ShamrockLee ]; - platforms = platforms.all; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ ShamrockLee ]; + platforms = lib.platforms.all; mainProgram = "gdl"; }; -} +})