From 96c93afd6127276ab84a634641a49fefdfdd5e5f Mon Sep 17 00:00:00 2001 From: jervw Date: Wed, 12 Feb 2025 22:51:29 +0200 Subject: [PATCH] mpls: init at 0.12.0 --- pkgs/by-name/mp/mpls/package.nix | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/mp/mpls/package.nix diff --git a/pkgs/by-name/mp/mpls/package.nix b/pkgs/by-name/mp/mpls/package.nix new file mode 100644 index 000000000000..b848022a8116 --- /dev/null +++ b/pkgs/by-name/mp/mpls/package.nix @@ -0,0 +1,42 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, + versionCheckHook, +}: +buildGoModule rec { + pname = "mpls"; + version = "0.12.0"; + + src = fetchFromGitHub { + owner = "mhersson"; + repo = "mpls"; + tag = "v${version}"; + hash = "sha256-2NOP5k3N2T2T8zg/6SlKDRJsWt+LcjAOmYe/tMrjCnc="; + }; + + vendorHash = "sha256-6iXZWLCF0LfchcGSFrCtILLeR1Yx7oxD/7JIYyrrkHM="; + + ldflags = [ + "-s" + "-w" + "-X github.com/mhersson/mpls/cmd.Version=${version}" + "-X github.com/mhersson/mpls/internal/mpls.Version=${version}" + ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Live preview of markdown using Language Server Protocol"; + homepage = "https://github.com/mhersson/mpls"; + changelog = "https://github.com/mhersson/mpls/releases/tag/${src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ jervw ]; + mainProgram = "mpls"; + }; +}