Unverified Commit b0330ee7 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

muscle: compile with GCC for Darwin (#321551)

parents a7d27ef5 609f8e05
Loading
Loading
Loading
Loading
+19 −9
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub }:
{ lib, gccStdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
gccStdenv.mkDerivation rec {
  pname = "muscle";
  version = "5.1.0";


  src = fetchFromGitHub {
    owner = "rcedgar";
    repo = pname;
@@ -14,8 +13,19 @@ 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; {
+15 −0
Original line number Diff line number Diff line

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