From 76453944117eb9e9f9d12e8f834ef12b4a3fa472 Mon Sep 17 00:00:00 2001 From: Daniel Fahey Date: Mon, 2 Mar 2026 15:07:05 +0000 Subject: [PATCH] terminusdb: 12.0.2 -> 12.0.4 Release notes: https://github.com/terminusdb/terminusdb/releases/tag/v12.0.4 --- pkgs/by-name/te/terminusdb/package.nix | 37 +++++++++++++++----------- pkgs/by-name/te/terminusdb/tests.nix | 11 +------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/pkgs/by-name/te/terminusdb/package.nix b/pkgs/by-name/te/terminusdb/package.nix index aff90b470905..0ad90475818a 100644 --- a/pkgs/by-name/te/terminusdb/package.nix +++ b/pkgs/by-name/te/terminusdb/package.nix @@ -71,13 +71,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "terminusdb"; - version = "12.0.2"; + version = "12.0.4"; src = fetchFromGitHub { owner = "terminusdb"; repo = "terminusdb"; tag = "v${finalAttrs.version}"; - hash = "sha256-l573Drc76KSUXxhdleU/IBscDTul8VtgkZdrRPvNuNc="; + hash = "sha256-vJifp0U4FrbtI86M8pt022BQWIIeK8jWWFG1Ch1m7IQ="; leaveDotGit = true; postFetch = '' # Will be used for `TERMINUSDB_GIT_HASH` @@ -90,17 +90,17 @@ stdenv.mkDerivation (finalAttrs: { cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) src cargoRoot; - hash = "sha256-zF506S4SiWx/uYyN2Trm4XPVUIU2K/qoNSjfKthLVuw="; + hash = "sha256-SvWS18amC4FHuXc/N6e+tomwnVfJ/KlTLIACfl72Nqc="; }; - # TODO: remove if/when merged upstream https://github.com/terminusdb/terminusdb/pull/2360 - patches = [ - # Avoid building bundled GMP/MPFR/MPC in gmp-mpfr-sys during the Rust build - (fetchpatch2 { - url = "https://github.com/terminusdb/terminusdb/commit/b84dc6b28ef3fd0ef76db2cf7f69537b95af07cc.patch?full_index=1"; - hash = "sha256-L3U/MHZgMSoXIy6j+1+gKKY2+2obKgaJ3HdJOoMe2Sw="; - }) - ]; + postPatch = '' + # Fix MAKEFLAGS order in vendored tikv-jemalloc-sys + # TODO: remove when tikv-jemalloc-sys 0.6.2+ is released + # equivalent to https://github.com/tikv/jemallocator/pull/152 + substituteInPlace $cargoDepsCopy/tikv-jemalloc-sys-*/build.rs \ + --replace-fail 'format!("{orig_makeflags} {makeflags}")' \ + 'format!("{makeflags} {orig_makeflags}")' + ''; strictDeps = true; @@ -122,11 +122,16 @@ stdenv.mkDerivation (finalAttrs: { libmpc ]; - # Darwin: gmp-mpfr-sys (use-system-libs) runs raw `$CC ... -lgmp` probes without - # propagating `CFLAGS`/`CPPFLAGS`, so we must provide include/lib paths via - # compiler-native env vars - # https://gitlab.com/tspiteri/gmp-mpfr-sys/-/blob/v1.5.3/build.rs#L187 - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + env = { + # Use system GMP/MPFR/MPC + # Overrides FEATURES ?= in Makefile.rust + FEATURES = "--features terminusdb-community/use-system-gmp"; + } + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { + # Darwin: gmp-mpfr-sys (use-system-libs) runs raw `$CC ... -lgmp` probes without + # propagating `CFLAGS`/`CPPFLAGS`, so we must provide include/lib paths via + # compiler-native env vars + # https://gitlab.com/tspiteri/gmp-mpfr-sys/-/blob/v1.5.3/build.rs#L187 C_INCLUDE_PATH = lib.makeSearchPath "include" [ (lib.getDev gmp) (lib.getDev mpfr) diff --git a/pkgs/by-name/te/terminusdb/tests.nix b/pkgs/by-name/te/terminusdb/tests.nix index a9d0930fd919..be81bf37d78c 100644 --- a/pkgs/by-name/te/terminusdb/tests.nix +++ b/pkgs/by-name/te/terminusdb/tests.nix @@ -19,18 +19,9 @@ buildNpmPackage { sourceRoot = "${terminusdb.src.name}/tests"; - npmDepsHash = "sha256-vNafxS19++AszhcYTw1jnfI4HMUyy5lOgKvjHHcGpWg="; + npmDepsHash = "sha256-R2kbwHhlja5mH2AGpyiiVCz3YmSWF9cWptOTdcZb0PM="; # Test-only JS adjustments live here so the runtime package stays untouched - patches = [ - # TODO: remove if/when merged upstream https://github.com/terminusdb/terminusdb/pull/2362 - # Prefer an injected TerminusDB binary path in tests - (fetchpatch2 { - url = "https://github.com/terminusdb/terminusdb/commit/8ffe22b3e20bff8fe8efb1a2b8236bb8b40c0bc3.patch?full_index=1"; - relative = "tests"; - hash = "sha256-NrFQknjdrRJjHvkOrutSkzxkUwcC6S+S0kHuK/xQTj0="; - }) - ]; postPatch = '' # Read git hash from the COMMIT file in the source substituteInPlace lib/info.js --replace-fail \