summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-01-13 07:26:19 -0500
committerGitHub <noreply@github.com>2023-01-13 07:26:19 -0500
commite495e5dfa6818c5392ed627df836ee50a7f540fe (patch)
treee77bbaf7333bf5ebcb527f92c880c6a9a1d892eb
parent5c7fa218c12a7a15685b0bb123c75201837e2503 (diff)
parent04bbb6fb78fbb5d69bb51fb4e9029ee11c74972f (diff)
Merge pull request #210163 from Munksgaard/smlfmt
smlfmt: init at 1.0.0
-rw-r--r--maintainers/maintainer-list.nix10
-rw-r--r--pkgs/development/tools/smlfmt/default.nix37
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 49 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 99f620877b05..18663efeecd7 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -9831,6 +9831,16 @@
githubId = 5047140;
name = "Victor Collod";
};
+ munksgaard = {
+ name = "Philip Munksgaard";
+ email = "philip@munksgaard.me";
+ github = "munksgaard";
+ githubId = 230613;
+ matrix = "@philip:matrix.munksgaard.me";
+ keys = [{
+ fingerprint = "5658 4D09 71AF E45F CC29 6BD7 4CE6 2A90 EFC0 B9B2";
+ }];
+ };
muscaln = {
email = "muscaln@protonmail.com";
github = "muscaln";
diff --git a/pkgs/development/tools/smlfmt/default.nix b/pkgs/development/tools/smlfmt/default.nix
new file mode 100644
index 000000000000..1475de94193d
--- /dev/null
+++ b/pkgs/development/tools/smlfmt/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, mlton }:
+
+stdenv.mkDerivation rec {
+ pname = "smlfmt";
+ version = "1.0.0";
+
+ src = fetchFromGitHub {
+ owner = "shwestrick";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-7CTfMiEvuOena5SOE0qKpFPq6ARxmkE6d+loznZNbC0=";
+ };
+
+ nativeBuildInputs = [ mlton ];
+
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 -t $out/bin smlfmt
+ runHook postInstall
+ '';
+
+ meta = {
+ description = "A custom parser/auto-formatter for Standard ML";
+ longDescription = ''
+ A custom parser and code formatter for Standard ML, with helpful error messages.
+
+ Supports SML source files (.sml, .sig, .fun, etc.) as well as MLBasis
+ compilation files (.mlb) using MLton conventions, including MLBasis path
+ maps.
+ '';
+
+ license = lib.licenses.mit;
+ maintainers = with lib.maintainers; [ munksgaard ];
+ platforms = mlton.meta.platforms;
+ homepage = "https://github.com/shwestrick/smlfmt";
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 227a33c67ad5..212f49362096 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15656,6 +15656,8 @@ with pkgs;
shmig = callPackage ../development/tools/database/shmig { };
+ smlfmt = callPackage ../development/tools/smlfmt { };
+
# smlnjBootstrap should be redundant, now that smlnj works on Darwin natively
smlnjBootstrap = callPackage ../development/compilers/smlnj/bootstrap.nix { };
smlnj = callPackage ../development/compilers/smlnj {