From 3de54e3d7408cc69ac80a8668edfcdb7986ca4f3 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 19:54:45 -0600 Subject: [PATCH 1/3] ats2: format --- pkgs/development/compilers/ats2/default.nix | 32 ++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/development/compilers/ats2/default.nix index 2dad47c08abc..b475eab689c5 100644 --- a/pkgs/development/compilers/ats2/default.nix +++ b/pkgs/development/compilers/ats2/default.nix @@ -1,6 +1,11 @@ -{ lib, stdenv, fetchurl, gmp -, withEmacsSupport ? true -, withContrib ? true }: +{ + lib, + stdenv, + fetchurl, + gmp, + withEmacsSupport ? true, + withContrib ? true, +}: let versionPkg = "0.4.2"; @@ -10,15 +15,13 @@ let hash = "sha256-m0hfBLsaNiLaIktcioK+ZtWUsWht3IDSJ6CzgJmS06c="; }; - postInstallContrib = lib.optionalString withContrib - '' + postInstallContrib = lib.optionalString withContrib '' local contribDir=$out/lib/ats2-postiats-*/ ; mkdir -p $contribDir ; tar -xzf "${contrib}" --strip-components 1 -C $contribDir ; ''; - postInstallEmacs = lib.optionalString withEmacsSupport - '' + postInstallEmacs = lib.optionalString withEmacsSupport '' local siteLispDir=$out/share/emacs/site-lisp/ats2 ; mkdir -p $siteLispDir ; install -m 0644 -v ./utils/emacs/*.el $siteLispDir ; @@ -53,16 +56,19 @@ stdenv.mkDerivation rec { let hookFiles = [ ./setup-hook.sh ] ++ lib.optional withContrib ./setup-contrib-hook.sh; in - builtins.toFile "setupHook.sh" - (lib.concatMapStringsSep "\n" builtins.readFile hookFiles); + builtins.toFile "setupHook.sh" (lib.concatMapStringsSep "\n" builtins.readFile hookFiles); postInstall = postInstallContrib + postInstallEmacs; meta = with lib; { description = "Functional programming language with dependent types"; - homepage = "http://www.ats-lang.org"; - license = licenses.gpl3Plus; - platforms = platforms.unix; - maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ]; + homepage = "http://www.ats-lang.org"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ + thoughtpolice + ttuegel + bbarker + ]; }; } From f4f2eb89bf4a6ba7bf13760893c69a3ca62127c7 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 19:55:13 -0600 Subject: [PATCH 2/3] ats2: fix darwin build --- pkgs/development/compilers/ats2/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/development/compilers/ats2/default.nix index b475eab689c5..339d9e6b7e31 100644 --- a/pkgs/development/compilers/ats2/default.nix +++ b/pkgs/development/compilers/ats2/default.nix @@ -52,6 +52,8 @@ stdenv.mkDerivation rec { "CCOMP=${stdenv.cc.targetPrefix}cc" ]; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration"; + setupHook = let hookFiles = [ ./setup-hook.sh ] ++ lib.optional withContrib ./setup-contrib-hook.sh; From 6bd632f1646c3ee798e2e09c9fc3ad265436e3f8 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 20:01:28 -0600 Subject: [PATCH 3/3] ats2: move to by-name --- .../compilers/ats2/default.nix => by-name/at/ats2/package.nix} | 0 .../compilers => by-name/at}/ats2/setup-contrib-hook.sh | 0 pkgs/{development/compilers => by-name/at}/ats2/setup-hook.sh | 0 pkgs/top-level/all-packages.nix | 1 - 4 files changed, 1 deletion(-) rename pkgs/{development/compilers/ats2/default.nix => by-name/at/ats2/package.nix} (100%) rename pkgs/{development/compilers => by-name/at}/ats2/setup-contrib-hook.sh (100%) rename pkgs/{development/compilers => by-name/at}/ats2/setup-hook.sh (100%) diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/by-name/at/ats2/package.nix similarity index 100% rename from pkgs/development/compilers/ats2/default.nix rename to pkgs/by-name/at/ats2/package.nix diff --git a/pkgs/development/compilers/ats2/setup-contrib-hook.sh b/pkgs/by-name/at/ats2/setup-contrib-hook.sh similarity index 100% rename from pkgs/development/compilers/ats2/setup-contrib-hook.sh rename to pkgs/by-name/at/ats2/setup-contrib-hook.sh diff --git a/pkgs/development/compilers/ats2/setup-hook.sh b/pkgs/by-name/at/ats2/setup-hook.sh similarity index 100% rename from pkgs/development/compilers/ats2/setup-hook.sh rename to pkgs/by-name/at/ats2/setup-hook.sh diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 324161235eb4..9b8e8f385fdb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14180,7 +14180,6 @@ with pkgs; aspectj = callPackage ../development/compilers/aspectj { }; ats = callPackage ../development/compilers/ats { }; - ats2 = callPackage ../development/compilers/ats2 { }; ats-acc = callPackage ../development/tools/ats-acc { };