diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-09-19 10:50:47 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2023-09-19 13:30:30 +0200 |
commit | 85fd87463918c383c46f8725b96eea6e63cf5d4f (patch) | |
tree | ac7b357fbafe74fdd320ab3f7e840eba540bc240 | |
parent | bd17fe35505e9684d8234b8c09cef7715639db5c (diff) |
compcert: add aarch64 support
-rw-r--r-- | pkgs/development/coq-modules/compcert/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/development/coq-modules/compcert/default.nix b/pkgs/development/coq-modules/compcert/default.nix index ebb227f29279e..4e25aeaec2e79 100644 --- a/pkgs/development/coq-modules/compcert/default.nix +++ b/pkgs/development/coq-modules/compcert/default.nix @@ -5,7 +5,20 @@ , version ? null }: -let compcert = mkCoqDerivation rec { +let + +# https://compcert.org/man/manual002.html +targets = { + x86_64-linux = "x86_64-linux"; + aarch64-linux = "aarch64-linux"; + x86_64-darwin = "x86_64-macos"; + aarch64-darwin = "aarch64-macos"; +}; + +target = targets.${stdenv.hostPlatform.system} + or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + +compcert = mkCoqDerivation { pname = "compcert"; owner = "AbsInt"; @@ -49,7 +62,7 @@ let compcert = mkCoqDerivation rec { -coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \ -toolprefix ${tools}/bin/ \ -use-external-Flocq \ - ${if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux"} + ${target} ''; installTargets = "documentation install"; @@ -80,7 +93,7 @@ let compcert = mkCoqDerivation rec { description = "Formally verified C compiler"; homepage = "https://compcert.org"; license = licenses.inria-compcert; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; + platforms = builtins.attrNames targets; maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ]; }; }; in |