Merge pull request #208750 from wegank/ats2-darwin

ats2: add darwin support
This commit is contained in:
Thiago Kenji Okada 2023-01-08 14:55:06 +00:00 committed by GitHub
commit 5dd1eee859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -34,12 +34,21 @@ stdenv.mkDerivation rec {
hash = "sha256-UWgDjFojPBYgykrCrJyYvVWY+Gc5d4aRGjTWjc528AM="; hash = "sha256-UWgDjFojPBYgykrCrJyYvVWY+Gc5d4aRGjTWjc528AM=";
}; };
postPatch = lib.optionalString stdenv.cc.isClang ''
sed -i 's/gcc/clang/g' utils/*/DATS/atscc_util.dats
'';
buildInputs = [ gmp ]; buildInputs = [ gmp ];
# Disable parallel build, errors: # Disable parallel build, errors:
# *** No rule to make target 'patscc.dats', needed by 'patscc_dats.c'. Stop. # *** No rule to make target 'patscc.dats', needed by 'patscc_dats.c'. Stop.
enableParallelBuilding = false; enableParallelBuilding = false;
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CCOMP=${stdenv.cc.targetPrefix}cc"
];
setupHook = with lib; setupHook = with lib;
let let
hookFiles = hookFiles =
@ -55,7 +64,7 @@ stdenv.mkDerivation rec {
description = "Functional programming language with dependent types"; description = "Functional programming language with dependent types";
homepage = "http://www.ats-lang.org"; homepage = "http://www.ats-lang.org";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ]; maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ];
}; };
} }

View file

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Wp39488YNL40GKp4KaJwhi75PsYP+gMtrZqAvs4Q/sw="; sha256 = "sha256-Wp39488YNL40GKp4KaJwhi75PsYP+gMtrZqAvs4Q/sw=";
}; };
postPatch = ''
substituteInPlace Makefile \
--replace "mv acc \''$(PATSHOME)/bin/" "install -Dm755 acc ${placeholder "out"}/bin/"
'';
nativeBuildInputs = [ ats2 ]; nativeBuildInputs = [ ats2 ];
meta = with lib; { meta = with lib; {