From 86e4ca0710377672b3da4bd5c2f2bb5a4b0aaa92 Mon Sep 17 00:00:00 2001 From: Luis Eduardo Bueso de Barrio Date: Tue, 14 Apr 2026 10:35:14 +0200 Subject: [PATCH] harper-ls --- devshells/default.nix | 11 +- flake.lock | 455 +------------------------------------ flake.nix | 8 +- pkgs/default.nix | 1 + pkgs/harper-ls/default.nix | 32 +++ 5 files changed, 36 insertions(+), 471 deletions(-) create mode 100644 pkgs/harper-ls/default.nix diff --git a/devshells/default.nix b/devshells/default.nix index f3e0227..9c54474 100644 --- a/devshells/default.nix +++ b/devshells/default.nix @@ -1,8 +1,5 @@ { pkgs, - system, - jailed-agents, - mcp-servers, }: pkgs.mkShell { packages = @@ -12,16 +9,10 @@ pkgs.mkShell { nil nix-tree nix - (jailed-agents.lib.${system}.makeJailed system { - agentTool = "opencode"; - extraPkgs = - (with pkgs; [ mcp-nixos ]) - ++ (with mcp-servers.packages.${system}; [ duckduckgo-mcp-server ]); - }) ]; shellHook = '' echo "Nix packages development environment" - echo "Available tools: nixfmt-rfc-style, nil, nix-tree, opencode (jailed agent)" + echo "Available tools: nixfmt-rfc-style, nil, nix-tree" ''; } diff --git a/flake.lock b/flake.lock index b96b7ac..c97bf14 100644 --- a/flake.lock +++ b/flake.lock @@ -1,52 +1,5 @@ { "nodes": { - "blueprint": { - "inputs": { - "nixpkgs": [ - "jailed-agents", - "llm-agents", - "nixpkgs" - ], - "systems": "systems_3" - }, - "locked": { - "lastModified": 1769353768, - "narHash": "sha256-zI+7cbMI4wMIR57jMjDSEsVb3grapTnURDxxJPYFIW0=", - "owner": "numtide", - "repo": "blueprint", - "rev": "c7da5c70ad1c9b60b6f5d4f674fbe205d48d8f6c", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "blueprint", - "type": "github" - } - }, - "blueprint_2": { - "inputs": { - "nixpkgs": [ - "mcp-servers", - "jailed-agents", - "llm-agents", - "nixpkgs" - ], - "systems": "systems_6" - }, - "locked": { - "lastModified": 1769353768, - "narHash": "sha256-zI+7cbMI4wMIR57jMjDSEsVb3grapTnURDxxJPYFIW0=", - "owner": "numtide", - "repo": "blueprint", - "rev": "c7da5c70ad1c9b60b6f5d4f674fbe205d48d8f6c", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "blueprint", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -65,273 +18,7 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "jail-nix": { - "locked": { - "lastModified": 1765903853, - "narHash": "sha256-buoPpx7moJzAXbLuHAImn6x9fGRdk3x0T57goPv1vnc=", - "owner": "~alexdavid", - "repo": "jail.nix", - "rev": "bf9f49c8118e7a77b68a675dbe26e93e91412066", - "type": "sourcehut" - }, - "original": { - "owner": "~alexdavid", - "repo": "jail.nix", - "type": "sourcehut" - } - }, - "jail-nix_2": { - "locked": { - "lastModified": 1765903853, - "narHash": "sha256-buoPpx7moJzAXbLuHAImn6x9fGRdk3x0T57goPv1vnc=", - "owner": "~alexdavid", - "repo": "jail.nix", - "rev": "bf9f49c8118e7a77b68a675dbe26e93e91412066", - "type": "sourcehut" - }, - "original": { - "owner": "~alexdavid", - "repo": "jail.nix", - "type": "sourcehut" - } - }, - "jailed-agents": { - "inputs": { - "flake-utils": "flake-utils_2", - "jail-nix": "jail-nix", - "llm-agents": "llm-agents", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1770246631, - "narHash": "sha256-a44ePXknnnWC7B3r8D4XgvypAdJ0hSfkBXuvRC/3j7M=", - "ref": "refs/heads/main", - "rev": "fc658b4112f5d924a038d5a3699eae3917371654", - "revCount": 6, - "type": "git", - "url": "https://gitea@gitea.bueso.eu/luis/jailed-agents" - }, - "original": { - "type": "git", - "url": "https://gitea@gitea.bueso.eu/luis/jailed-agents" - } - }, - "jailed-agents_2": { - "inputs": { - "flake-utils": "flake-utils_4", - "jail-nix": "jail-nix_2", - "llm-agents": "llm-agents_2", - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1770110471, - "narHash": "sha256-oAbwoCzhq/skEKzaPTtzCh1Eix2fwfsE2aJmpJZZhx8=", - "ref": "refs/heads/main", - "rev": "9cfc57d6a605466ed9a359abcaee86b4ec9f62e0", - "revCount": 2, - "type": "git", - "url": "ssh://gitea@gitea.bueso.eu/luis/jailed-agents" - }, - "original": { - "type": "git", - "url": "ssh://gitea@gitea.bueso.eu/luis/jailed-agents" - } - }, - "llm-agents": { - "inputs": { - "blueprint": "blueprint", - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1769813338, - "narHash": "sha256-IlRKon8+bfoi/uOa8CUPAAWW0Pv6AHBSF1jVSD4QO8U=", - "owner": "numtide", - "repo": "llm-agents.nix", - "rev": "58939415e56d01c30d429cf0c49a9d8e2a6a07c3", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "llm-agents.nix", - "type": "github" - } - }, - "llm-agents_2": { - "inputs": { - "blueprint": "blueprint_2", - "nixpkgs": "nixpkgs_3", - "treefmt-nix": "treefmt-nix_2" - }, - "locked": { - "lastModified": 1769813338, - "narHash": "sha256-IlRKon8+bfoi/uOa8CUPAAWW0Pv6AHBSF1jVSD4QO8U=", - "owner": "numtide", - "repo": "llm-agents.nix", - "rev": "58939415e56d01c30d429cf0c49a9d8e2a6a07c3", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "llm-agents.nix", - "type": "github" - } - }, - "mcp-servers": { - "inputs": { - "flake-utils": "flake-utils_3", - "jailed-agents": "jailed-agents_2", - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1770307561, - "narHash": "sha256-02lZaoZMUOLISczahZHuEwSlMQ5aIX1plUN59ifdu38=", - "ref": "refs/heads/main", - "rev": "734bf103018687943a63d301b569dc3b3d6bf7fe", - "revCount": 16, - "type": "git", - "url": "https://gitea@gitea.bueso.eu/luis/mcp-servers" - }, - "original": { - "type": "git", - "url": "https://gitea@gitea.bueso.eu/luis/mcp-servers" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1769740369, - "narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6308c3b21396534d8aaeac46179c14c439a89b8a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1769740369, - "narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6308c3b21396534d8aaeac46179c14c439a89b8a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1770181073, - "narHash": "sha256-ksTL7P9QC1WfZasNlaAdLOzqD8x5EPyods69YBqxSfk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bf922a59c5c9998a6584645f7d0de689512e444c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { "locked": { "lastModified": 1770169770, "narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", @@ -350,10 +37,7 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "jailed-agents": "jailed-agents", - "mcp-servers": "mcp-servers", - "nixpkgs": "nixpkgs_6", - "texlab-src": "texlab-src" + "nixpkgs": "nixpkgs" } }, "systems": { @@ -370,143 +54,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "texlab-src": { - "flake": false, - "locked": { - "lastModified": 1767083273, - "narHash": "sha256-hd7fDnZqNEz4Ayop3uPqL4IU6xgGsTjMhGvgF+Trgcw=", - "owner": "latex-lsp", - "repo": "texlab", - "rev": "d89bf0fa65bd931ab57183d067f66189fc31e6c9", - "type": "github" - }, - "original": { - "owner": "latex-lsp", - "ref": "v5.25.1", - "repo": "texlab", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "jailed-agents", - "llm-agents", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769691507, - "narHash": "sha256-8aAYwyVzSSwIhP2glDhw/G0i5+wOrren3v6WmxkVonM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "mcp-servers", - "jailed-agents", - "llm-agents", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769691507, - "narHash": "sha256-8aAYwyVzSSwIhP2glDhw/G0i5+wOrren3v6WmxkVonM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fc37b61..8223c60 100644 --- a/flake.nix +++ b/flake.nix @@ -13,8 +13,6 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; - jailed-agents.url = "git+https://gitea@gitea.bueso.eu/luis/jailed-agents"; - mcp-servers.url = "git+https://gitea@gitea.bueso.eu/luis/mcp-servers"; }; outputs = @@ -22,8 +20,6 @@ self, nixpkgs, flake-utils, - jailed-agents, - mcp-servers, }: flake-utils.lib.eachDefaultSystem ( system: @@ -36,9 +32,7 @@ }; devShells.default = import ./devshells { - inherit pkgs system; - jailed-agents = jailed-agents; - mcp-servers = mcp-servers; + inherit pkgs; }; checks = import ./checks { inherit pkgs; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index d8c1121..ff24c64 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -12,6 +12,7 @@ let khal-export = pkgs.callPackage ./khal-export { }; org-zotero-export = pkgs.callPackage ./org-zotero-export { }; jls = pkgs.callPackage ./jls { }; + harper-ls = pkgs.callPackage ./harper-ls { }; }; in self // { default = self.example-a; } diff --git a/pkgs/harper-ls/default.nix b/pkgs/harper-ls/default.nix new file mode 100644 index 0000000..dc34dca --- /dev/null +++ b/pkgs/harper-ls/default.nix @@ -0,0 +1,32 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, +}: + +rustPlatform.buildRustPackage rec { + pname = "harper-ls"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "Automattic"; + repo = "harper"; + rev = "v${version}"; + hash = "sha256-3NwQOs0G0b13dnCN0oif863/BJ2zAUFXsF9TpFeMDLA="; + }; + + cargoBuildFlags = [ + "-p" + "harper-ls" + ]; + + cargoHash = "sha256-+WUmNmFBuk9lQsUXYBEpTo49Ygul0BPRY0kcHCCC0GU="; + + meta = { + description = "Language server for Harper, an offline grammar checker"; + homepage = "https://github.com/Automattic/harper"; + license = lib.licenses.asl20; + mainProgram = "harper-ls"; + platforms = lib.platforms.unix; + }; +}