From 500706995d4928646c34937f55408ae1e1437c2c Mon Sep 17 00:00:00 2001 From: Harinn Date: Wed, 20 May 2026 18:54:43 +0700 Subject: [PATCH] kallisto: fix build with gcc 15 --- ...bifrost-fix-datastorage-sz_link-typo.patch | 26 +++++++++++++++++++ pkgs/by-name/ka/kallisto/package.nix | 7 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/ka/kallisto/bifrost-fix-datastorage-sz_link-typo.patch diff --git a/pkgs/by-name/ka/kallisto/bifrost-fix-datastorage-sz_link-typo.patch b/pkgs/by-name/ka/kallisto/bifrost-fix-datastorage-sz_link-typo.patch new file mode 100644 index 0000000000000..4aebfd351033d --- /dev/null +++ b/pkgs/by-name/ka/kallisto/bifrost-fix-datastorage-sz_link-typo.patch @@ -0,0 +1,26 @@ +diff --git a/ext/bifrost/src/DataStorage.hpp b/ext/bifrost/src/DataStorage.hpp +index 016775f..deb849d 100644 +--- a/ext/bifrost/src/DataStorage.hpp ++++ b/ext/bifrost/src/DataStorage.hpp +@@ -67,6 +67,8 @@ class DataStorage { + + inline size_t getNbColors() const { return color_names.size(); } + ++ inline vector const& getColorNames() const { return color_names; } ++ + size_t getUnitigColorsSize(const size_t nb_threads = 1) const; + + uint64_t getHash(const UnitigColorMap& um) const; +diff --git a/ext/bifrost/src/DataStorage.tcc b/ext/bifrost/src/DataStorage.tcc +index 02929d9..10b844e 100644 +--- a/ext/bifrost/src/DataStorage.tcc ++++ b/ext/bifrost/src/DataStorage.tcc +@@ -78,7 +78,7 @@ DataStorage::DataStorage(const DataStorage& o) : color_sets(nullptr), shared_ + + unitig_cs_link = new atomic[sz_link]; + +- for (size_t i = 0; i != sz_link; ++i) unitig_cs_link[i] = o.sz_link[i].load(); ++ for (size_t i = 0; i != sz_link; ++i) unitig_cs_link[i] = o.unitig_cs_link[i].load(); + } + + if ((o.data != nullptr) && (o.sz_cs != 0)){ diff --git a/pkgs/by-name/ka/kallisto/package.nix b/pkgs/by-name/ka/kallisto/package.nix index 63ed552052cb9..e772852c46422 100644 --- a/pkgs/by-name/ka/kallisto/package.nix +++ b/pkgs/by-name/ka/kallisto/package.nix @@ -18,9 +18,14 @@ stdenv.mkDerivation (finalAttrs: { repo = "kallisto"; owner = "pachterlab"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-hfdeztEyHvuOnLS71oSv8sPqFe2UCX5KlANqrT/Gfx8="; + hash = "sha256-hfdeztEyHvuOnLS71oSv8sPqFe2UCX5KlANqrT/Gfx8="; }; + patches = [ + # https://github.com/pmelsted/bifrost/pull/18 + ./bifrost-fix-datastorage-sz_link-typo.patch + ]; + postPatch = '' substituteInPlace CMakeLists.txt ext/bifrost/CMakeLists.txt \ --replace-fail "cmake_minimum_required(VERSION 3.0.0)" "cmake_minimum_required(VERSION 3.10)"