muscle: compile with GCC for Darwin (#321551)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-17 01:20:26 +02:00 committed by GitHub
commit b0330ee78d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 9 deletions

View File

@ -1,10 +1,9 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib, gccStdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "muscle";
gccStdenv.mkDerivation rec {
pname = "muscle";
version = "5.1.0";
src = fetchFromGitHub {
owner = "rcedgar";
repo = pname;
@ -14,15 +13,26 @@ stdenv.mkDerivation rec {
sourceRoot = "${src.name}/src";
installPhase = ''
install -m755 -D Linux/muscle $out/bin/muscle
'';
patches = [
./muscle-darwin-g++.patch
];
installPhase =
let
target =
if gccStdenv.isDarwin
then "Darwin"
else "Linux";
in
''
install -m755 -D ${target}/muscle $out/bin/muscle
'';
meta = with lib; {
description = "Multiple sequence alignment with top benchmark scores scalable to thousands of sequences";
mainProgram = "muscle";
license = licenses.gpl3Plus;
homepage = "https://www.drive5.com/muscle/";
license = licenses.gpl3Plus;
homepage = "https://www.drive5.com/muscle/";
maintainers = with maintainers; [ unode thyol ];
};
}

View File

@ -0,0 +1,15 @@
diff --git a/Makefile b/Makefile
index df16673..be3bd0d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,6 @@ OS := $(shell uname)
CPPFLAGS := $(CPPFLAGS) -DNDEBUG -pthread
CXX := g++
-ifeq ($(OS),Darwin)
- CXX := g++-11
-endif
CXXFLAGS := $(CXXFLAGS) -O3 -fopenmp -ffast-math