Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ats2: add darwin support #208750

Merged
merged 2 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkgs/development/compilers/ats2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,21 @@ stdenv.mkDerivation rec {
hash = "sha256-UWgDjFojPBYgykrCrJyYvVWY+Gc5d4aRGjTWjc528AM=";
};

postPatch = lib.optionalString stdenv.cc.isClang ''
sed -i 's/gcc/clang/g' utils/*/DATS/atscc_util.dats
'';

buildInputs = [ gmp ];

# Disable parallel build, errors:
# *** No rule to make target 'patscc.dats', needed by 'patscc_dats.c'. Stop.
enableParallelBuilding = false;

makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CCOMP=${stdenv.cc.targetPrefix}cc"
];

setupHook = with lib;
let
hookFiles =
Expand All @@ -55,7 +64,7 @@ stdenv.mkDerivation rec {
description = "Functional programming language with dependent types";
homepage = "http://www.ats-lang.org";
license = licenses.gpl3Plus;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ];
};
}
5 changes: 5 additions & 0 deletions pkgs/development/tools/ats-acc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Wp39488YNL40GKp4KaJwhi75PsYP+gMtrZqAvs4Q/sw=";
};

postPatch = ''
substituteInPlace Makefile \
--replace "mv acc \''$(PATSHOME)/bin/" "install -Dm755 acc ${placeholder "out"}/bin/"
'';

nativeBuildInputs = [ ats2 ];

meta = with lib; {
Expand Down