From c3038ff45d1991a40e0fab3bf66db234cc71c496 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Thu, 9 Jul 2026 15:16:46 -0500 Subject: [PATCH] hh-suite: switch from openmp to llvmPackages.openmp and modernize derivation This updates hh-suite to use llvmPackages.openmp instead of requiring openmp to be passed at the call site. The callPackage override in all-packages.nix is removed accordingly. Additional cleanups: - migrate fetchFromGitHub to `tag` + `hash` - enable strictDeps and __structuredAttrs - adopt finalAttrs form for mkDerivation --- .../science/biology/hh-suite/default.nix | 13 ++++++++----- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/science/biology/hh-suite/default.nix b/pkgs/applications/science/biology/hh-suite/default.nix index d5ba108135c6..0cda352af86e 100644 --- a/pkgs/applications/science/biology/hh-suite/default.nix +++ b/pkgs/applications/science/biology/hh-suite/default.nix @@ -7,19 +7,22 @@ xxd, enableMpi ? false, mpi, - openmp, + llvmPackages, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hh-suite"; version = "3.3.0"; src = fetchFromGitHub { owner = "soedinglab"; repo = "hh-suite"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-kjNqJddioCZoh/cZL3YNplweIGopWIGzCYQOnKDqZmw="; }; + strictDeps = true; + __structuredAttrs = true; + patches = [ # Should be removable as soon as this upstream PR is merged: https://github.com/soedinglab/hh-suite/pull/357 (fetchpatch { @@ -39,7 +42,7 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.hostPlatform.avx2Support "-DHAVE_AVX2=1" ++ lib.optional stdenv.hostPlatform.sse4_1Support "-DHAVE_SSE4_1=1"; - buildInputs = lib.optional stdenv.cc.isClang openmp ++ lib.optional enableMpi mpi; + buildInputs = lib.optional stdenv.cc.isClang llvmPackages.openmp ++ lib.optional enableMpi mpi; postPatch = '' substituteInPlace CMakeLists.txt \ @@ -55,4 +58,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ natsukium ]; platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dbf846bfadc4..af60b2b5c5dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10322,9 +10322,7 @@ with pkgs; deep-translator = with python3Packages; toPythonApplication deep-translator; - hh-suite = callPackage ../applications/science/biology/hh-suite { - inherit (llvmPackages) openmp; - }; + hh-suite = callPackage ../applications/science/biology/hh-suite { }; nest-mpi = nest.override { withMpi = true; };