diff --git a/_generator/langserver.json b/_generator/langserver.json index e5418b2..b3249d2 100644 --- a/_generator/langserver.json +++ b/_generator/langserver.json @@ -1,4 +1,9 @@ [ + { + "langserver": "ada-language-server", + "packages": "", + "langserver_binary": "ada_language_server" + }, { "langserver": "ansible-language-server", "packages": "", @@ -9,6 +14,11 @@ "packages": "", "langserver_binary": "astro-ls" }, + { + "langserver": "basedpyright", + "packages": "", + "langserver_binary": "basedpyright-langserver" + }, { "langserver": "bash-language-server", "packages": "", @@ -104,6 +114,16 @@ "packages": "", "langserver_binary": "fsautocomplete" }, + { + "langserver": "futhark-lsp", + "packages": "", + "langserver_binary": "futhark" + }, + { + "langserver": "gleam", + "packages": "", + "langserver_binary": "gleam" + }, { "langserver": "gopls", "packages": "", @@ -169,11 +189,26 @@ "packages": "", "langserver_binary": "start_lexical.sh" }, + { + "langserver": "lua-lsp", + "packages": "", + "langserver_binary": "lua-lsp" + }, + { + "langserver": "marksman", + "packages": "", + "langserver_binary": "marksman" + }, { "langserver": "metals", "packages": "", "langserver_binary": "metals" }, + { + "langserver": "mint-ls", + "packages": "", + "langserver_binary": "mint" + }, { "langserver": "mojo-lsp-server", "packages": "", @@ -219,11 +254,21 @@ "packages": "", "langserver_binary": "mono" }, + { + "langserver": "perl-language-server", + "packages": "", + "langserver_binary": "perl" + }, { "langserver": "phpactor", "packages": "", "langserver_binary": "phpactor" }, + { + "langserver": "purescript-language-server", + "packages": "", + "langserver_binary": "purescript-language-server" + }, { "langserver": "pylsp", "packages": "", @@ -339,6 +384,11 @@ "packages": "nodePackages.typescript-language-server", "langserver_binary": "typescript-language-server" }, + { + "langserver": "typescriptreact_eslint", + "packages": "nodePackages.typescript-language-server,vscode-langservers-extracted", + "langserver_binary": "typescript-language-server,vscode-eslint-language-server" + }, { "langserver": "typst-lsp", "packages": "typst-lsp", diff --git a/_generator/src_template/{{cookiecutter.langserver}}/devcontainer-feature.json b/_generator/src_template/{{cookiecutter.langserver}}/devcontainer-feature.json index 9d5cd2b..7bcb850 100644 --- a/_generator/src_template/{{cookiecutter.langserver}}/devcontainer-feature.json +++ b/_generator/src_template/{{cookiecutter.langserver}}/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "{{cookiecutter.langserver}}", - "version": "0.4.2", - "name": "emacs lsp-bridge {{cookiecutter.langserver}} language server", - "description": "emacs lsp-bridge {{cookiecutter.langserver}} language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "{{cookiecutter.langserver}}", + "version": "0.4.3", + "name": "emacs lsp-bridge {{cookiecutter.langserver}} language server", + "description": "emacs lsp-bridge {{cookiecutter.langserver}} language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/_generator/src_template/{{cookiecutter.langserver}}/lsp-bridge.nix b/_generator/src_template/{{cookiecutter.langserver}}/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/_generator/src_template/{{cookiecutter.langserver}}/lsp-bridge.nix +++ b/_generator/src_template/{{cookiecutter.langserver}}/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/docker-langserver/devcontainer-feature.json b/src/docker-langserver/devcontainer-feature.json index 2f3d123..eb8dc17 100644 --- a/src/docker-langserver/devcontainer-feature.json +++ b/src/docker-langserver/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "docker-langserver", - "version": "0.4.2", - "name": "emacs lsp-bridge docker-langserver language server", - "description": "emacs lsp-bridge docker-langserver language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "docker-langserver", + "version": "0.4.3", + "name": "emacs lsp-bridge docker-langserver language server", + "description": "emacs lsp-bridge docker-langserver language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/docker-langserver/lsp-bridge.nix b/src/docker-langserver/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/docker-langserver/lsp-bridge.nix +++ b/src/docker-langserver/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/javascript/devcontainer-feature.json b/src/javascript/devcontainer-feature.json index fdba51f..cbb49b7 100644 --- a/src/javascript/devcontainer-feature.json +++ b/src/javascript/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "javascript", - "version": "0.4.2", - "name": "emacs lsp-bridge javascript language server", - "description": "emacs lsp-bridge javascript language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "javascript", + "version": "0.4.3", + "name": "emacs lsp-bridge javascript language server", + "description": "emacs lsp-bridge javascript language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/javascript/lsp-bridge.nix b/src/javascript/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/javascript/lsp-bridge.nix +++ b/src/javascript/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/jedi/devcontainer-feature.json b/src/jedi/devcontainer-feature.json index 161caee..fa70655 100644 --- a/src/jedi/devcontainer-feature.json +++ b/src/jedi/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "jedi", - "version": "0.4.2", - "name": "emacs lsp-bridge jedi language server", - "description": "emacs lsp-bridge jedi language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "jedi", + "version": "0.4.3", + "name": "emacs lsp-bridge jedi language server", + "description": "emacs lsp-bridge jedi language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/jedi/lsp-bridge.nix b/src/jedi/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/jedi/lsp-bridge.nix +++ b/src/jedi/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/jedi_ruff/devcontainer-feature.json b/src/jedi_ruff/devcontainer-feature.json index 8366baa..850a498 100644 --- a/src/jedi_ruff/devcontainer-feature.json +++ b/src/jedi_ruff/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "jedi_ruff", - "version": "0.4.2", - "name": "emacs lsp-bridge jedi_ruff language server", - "description": "emacs lsp-bridge jedi_ruff language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "jedi_ruff", + "version": "0.4.3", + "name": "emacs lsp-bridge jedi_ruff language server", + "description": "emacs lsp-bridge jedi_ruff language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/jedi_ruff/lsp-bridge.nix b/src/jedi_ruff/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/jedi_ruff/lsp-bridge.nix +++ b/src/jedi_ruff/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/nil/devcontainer-feature.json b/src/nil/devcontainer-feature.json index 0208b05..2139538 100644 --- a/src/nil/devcontainer-feature.json +++ b/src/nil/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "nil", - "version": "0.4.2", - "name": "emacs lsp-bridge nil language server", - "description": "emacs lsp-bridge nil language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "nil", + "version": "0.4.3", + "name": "emacs lsp-bridge nil language server", + "description": "emacs lsp-bridge nil language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/nil/lsp-bridge.nix b/src/nil/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/nil/lsp-bridge.nix +++ b/src/nil/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/pyright-background-analysis/devcontainer-feature.json b/src/pyright-background-analysis/devcontainer-feature.json index b9d5aec..61725e6 100644 --- a/src/pyright-background-analysis/devcontainer-feature.json +++ b/src/pyright-background-analysis/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "pyright-background-analysis", - "version": "0.4.2", - "name": "emacs lsp-bridge pyright-background-analysis language server", - "description": "emacs lsp-bridge pyright-background-analysis language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "pyright-background-analysis", + "version": "0.4.3", + "name": "emacs lsp-bridge pyright-background-analysis language server", + "description": "emacs lsp-bridge pyright-background-analysis language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/pyright-background-analysis/lsp-bridge.nix b/src/pyright-background-analysis/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/pyright-background-analysis/lsp-bridge.nix +++ b/src/pyright-background-analysis/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/pyright-background-analysis_ruff/devcontainer-feature.json b/src/pyright-background-analysis_ruff/devcontainer-feature.json index 8f772da..9916787 100644 --- a/src/pyright-background-analysis_ruff/devcontainer-feature.json +++ b/src/pyright-background-analysis_ruff/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "pyright-background-analysis_ruff", - "version": "0.4.2", - "name": "emacs lsp-bridge pyright-background-analysis_ruff language server", - "description": "emacs lsp-bridge pyright-background-analysis_ruff language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "pyright-background-analysis_ruff", + "version": "0.4.3", + "name": "emacs lsp-bridge pyright-background-analysis_ruff language server", + "description": "emacs lsp-bridge pyright-background-analysis_ruff language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/pyright-background-analysis_ruff/lsp-bridge.nix b/src/pyright-background-analysis_ruff/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/pyright-background-analysis_ruff/lsp-bridge.nix +++ b/src/pyright-background-analysis_ruff/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/pyright/devcontainer-feature.json b/src/pyright/devcontainer-feature.json index 1446e56..86cc2bf 100644 --- a/src/pyright/devcontainer-feature.json +++ b/src/pyright/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "pyright", - "version": "0.4.2", - "name": "emacs lsp-bridge pyright language server", - "description": "emacs lsp-bridge pyright language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "pyright", + "version": "0.4.3", + "name": "emacs lsp-bridge pyright language server", + "description": "emacs lsp-bridge pyright language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/pyright/lsp-bridge.nix b/src/pyright/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/pyright/lsp-bridge.nix +++ b/src/pyright/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/pyright_ruff/devcontainer-feature.json b/src/pyright_ruff/devcontainer-feature.json index 6e02360..2828ef9 100644 --- a/src/pyright_ruff/devcontainer-feature.json +++ b/src/pyright_ruff/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "pyright_ruff", - "version": "0.4.2", - "name": "emacs lsp-bridge pyright_ruff language server", - "description": "emacs lsp-bridge pyright_ruff language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "pyright_ruff", + "version": "0.4.3", + "name": "emacs lsp-bridge pyright_ruff language server", + "description": "emacs lsp-bridge pyright_ruff language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/pyright_ruff/lsp-bridge.nix b/src/pyright_ruff/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/pyright_ruff/lsp-bridge.nix +++ b/src/pyright_ruff/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/ruff/devcontainer-feature.json b/src/ruff/devcontainer-feature.json index 03d4e9d..e547136 100644 --- a/src/ruff/devcontainer-feature.json +++ b/src/ruff/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "ruff", - "version": "0.4.2", - "name": "emacs lsp-bridge ruff language server", - "description": "emacs lsp-bridge ruff language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "ruff", + "version": "0.4.3", + "name": "emacs lsp-bridge ruff language server", + "description": "emacs lsp-bridge ruff language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/ruff/lsp-bridge.nix b/src/ruff/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/ruff/lsp-bridge.nix +++ b/src/ruff/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/typescript/devcontainer-feature.json b/src/typescript/devcontainer-feature.json index 0c87e93..c1352a7 100644 --- a/src/typescript/devcontainer-feature.json +++ b/src/typescript/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "typescript", - "version": "0.4.2", - "name": "emacs lsp-bridge typescript language server", - "description": "emacs lsp-bridge typescript language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "typescript", + "version": "0.4.3", + "name": "emacs lsp-bridge typescript language server", + "description": "emacs lsp-bridge typescript language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/typescript/lsp-bridge.nix b/src/typescript/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/typescript/lsp-bridge.nix +++ b/src/typescript/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/typescript_eslint/devcontainer-feature.json b/src/typescript_eslint/devcontainer-feature.json index fce0838..37e10a6 100644 --- a/src/typescript_eslint/devcontainer-feature.json +++ b/src/typescript_eslint/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "typescript_eslint", - "version": "0.4.2", - "name": "emacs lsp-bridge typescript_eslint language server", - "description": "emacs lsp-bridge typescript_eslint language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "typescript_eslint", + "version": "0.4.3", + "name": "emacs lsp-bridge typescript_eslint language server", + "description": "emacs lsp-bridge typescript_eslint language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/typescript_eslint/lsp-bridge.nix b/src/typescript_eslint/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/typescript_eslint/lsp-bridge.nix +++ b/src/typescript_eslint/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/typescriptreact/devcontainer-feature.json b/src/typescriptreact/devcontainer-feature.json index ca0ddc3..791f63d 100644 --- a/src/typescriptreact/devcontainer-feature.json +++ b/src/typescriptreact/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "typescriptreact", - "version": "0.4.2", - "name": "emacs lsp-bridge typescriptreact language server", - "description": "emacs lsp-bridge typescriptreact language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "typescriptreact", + "version": "0.4.3", + "name": "emacs lsp-bridge typescriptreact language server", + "description": "emacs lsp-bridge typescriptreact language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/typescriptreact/lsp-bridge.nix b/src/typescriptreact/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/typescriptreact/lsp-bridge.nix +++ b/src/typescriptreact/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/typescriptreact_eslint/NOTES.md b/src/typescriptreact_eslint/NOTES.md new file mode 100644 index 0000000..b3b5347 --- /dev/null +++ b/src/typescriptreact_eslint/NOTES.md @@ -0,0 +1,35 @@ +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise Linux, Fedora, RockyLinux, and Alpine Linux. + +## Location of Flakes + +Currently `flakeUri` works best with a remote URI (e.g., `github:nixos/nixpkgs/nixpkgs-unstable#hello`) as local files need to be in the image. + +> Proposed support for lifecycle hooks in Features ([#60](https://github.com/devcontainers/spec/issues/60)) would allow for expressions files or Flakes to exist in the source tree to be automatically installed on initial container startup, but today you will have to manually add the appropriate install command to `postCreateCommand` to your `devcontainer.json` instead. + +## Multi-user vs. single-user installs + +This Dev Container Feature supports two installation models for Nix: multi-user and single user. Multi-user is the default, but each has pros and cons. + +| Installation Model | Pros | Cons | +| --- | --- | --- | +| *Multi-User* | Nix can be used with any user including root.

Also still works if the UID or GID of any user is updated. | Only works with Nix 2.11 and up due to a Nix installer limitation.

Container must run either: run as root (but `remoteUser` in devcontainer.json can be non-root), or includes `sudo` with the `remoteUser` being configured to use it.

Note that automated start of the `nix-daemon` requires passwordless `sudo` if the container itself (e.g., `containerUser`) is not running as root. Manual startup using `sudo` can require a password, however (more next). | +| *Single-User* | Does not require the container to run as root or `sudo` to be included in the image. | Only works with the user specified in the `remoteUser` property or an auto-detected user. If this user's UID/GID is updated, that user will no longer be able to work with Nix. This is primarily a consideration when running on Linux where the UID/GID is sync'd to the local user. | + +### Manually starting the Nix daemon + +If you have `sudo` in your base image, but have a password set so automatic startup is not possible, you can manually start the Nix daemon by running the following command in a terminal: + +```bash +sudo /usr/local/share/nix-entrypoint.sh +``` + +This same command can be used to restart the daemon if it has stopped for some reason. Logs are available at `/tmp/nix-daemon.log`. + + +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. + +`bash` is required to execute the `install.sh` script. diff --git a/src/typescriptreact_eslint/README.md b/src/typescriptreact_eslint/README.md new file mode 100644 index 0000000..4d789a3 --- /dev/null +++ b/src/typescriptreact_eslint/README.md @@ -0,0 +1,64 @@ + +# emacs lsp-bridge typescriptreact_eslint language server (typescriptreact_eslint) + +emacs lsp-bridge typescriptreact_eslint language server environment installed by Nix Pacakge Manager + +## Example Usage + +```json +"features": { + "ghcr.io/nohzafk/devcontainer-feature-emacs-lsp-bridge/typescriptreact_eslint:0": {} +} +``` + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| version | Version of Nix to install. | string | latest | +| multiUser | Perform a multi-user install (instead of single user) | boolean | true | +| packages | Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge. | string | - | +| useAttrPath | Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command. | boolean | true | +| flakeUri | Optional URI to a Nix Flake to install in profile. | string | - | +| extraNixConfig | Optional comma separated list of extra lines to add to /etc/nix/nix.conf. | string | - | + +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise Linux, Fedora, RockyLinux, and Alpine Linux. + +## Location of Flakes + +Currently `flakeUri` works best with a remote URI (e.g., `github:nixos/nixpkgs/nixpkgs-unstable#hello`) as local files need to be in the image. + +> Proposed support for lifecycle hooks in Features ([#60](https://github.com/devcontainers/spec/issues/60)) would allow for expressions files or Flakes to exist in the source tree to be automatically installed on initial container startup, but today you will have to manually add the appropriate install command to `postCreateCommand` to your `devcontainer.json` instead. + +## Multi-user vs. single-user installs + +This Dev Container Feature supports two installation models for Nix: multi-user and single user. Multi-user is the default, but each has pros and cons. + +| Installation Model | Pros | Cons | +| --- | --- | --- | +| *Multi-User* | Nix can be used with any user including root.

Also still works if the UID or GID of any user is updated. | Only works with Nix 2.11 and up due to a Nix installer limitation.

Container must run either: run as root (but `remoteUser` in devcontainer.json can be non-root), or includes `sudo` with the `remoteUser` being configured to use it.

Note that automated start of the `nix-daemon` requires passwordless `sudo` if the container itself (e.g., `containerUser`) is not running as root. Manual startup using `sudo` can require a password, however (more next). | +| *Single-User* | Does not require the container to run as root or `sudo` to be included in the image. | Only works with the user specified in the `remoteUser` property or an auto-detected user. If this user's UID/GID is updated, that user will no longer be able to work with Nix. This is primarily a consideration when running on Linux where the UID/GID is sync'd to the local user. | + +### Manually starting the Nix daemon + +If you have `sudo` in your base image, but have a password set so automatic startup is not possible, you can manually start the Nix daemon by running the following command in a terminal: + +```bash +sudo /usr/local/share/nix-entrypoint.sh +``` + +This same command can be used to restart the daemon if it has stopped for some reason. Logs are available at `/tmp/nix-daemon.log`. + + +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. + +`bash` is required to execute the `install.sh` script. + + +--- + +_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/nohzafk/devcontainer-feature-emacs-lsp-bridge/blob/main/src/typescriptreact_eslint/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/typescriptreact_eslint/devcontainer-feature.json b/src/typescriptreact_eslint/devcontainer-feature.json new file mode 100644 index 0000000..b59e454 --- /dev/null +++ b/src/typescriptreact_eslint/devcontainer-feature.json @@ -0,0 +1,48 @@ +{ + "id": "typescriptreact_eslint", + "version": "0.4.3", + "name": "emacs lsp-bridge typescriptreact_eslint language server", + "description": "emacs lsp-bridge typescriptreact_eslint language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." + }, + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" + }, + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/typescriptreact_eslint/install.sh b/src/typescriptreact_eslint/install.sh new file mode 100644 index 0000000..214f327 --- /dev/null +++ b/src/typescriptreact_eslint/install.sh @@ -0,0 +1,144 @@ +#!/bin/bash +# Move to the same directory as this script +set -e +FEATURE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "${FEATURE_DIR}" + +# Option defaults +VERSION="${VERSION:-"latest"}" +MULTIUSER="${MULTIUSER:-"true"}" +PACKAGES="${PACKAGES//,/ }" +USEATTRPATH="${USEATTRPATH:-"false"}" +FLAKEURI="${FLAKEURI:-""}" +EXTRANIXCONFIG="${EXTRANIXCONFIG:-""}" +USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}" + +if [ "$(id -u)" -ne 0 ]; then + echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' + exit 1 +fi + +# ... rest of your installation script + +# Import common utils +. ./utils.sh + +# Import pre-defined packages +. ./nix-packages.sh + +if [ -z "$PACKAGES" ]; then + PACKAGES="${LANGSERVER_PACKAGES//,/ }" +else + LANGSERVER_PACKAGES="${LANGSERVER_PACKAGES//,/ }" + PACKAGES="$PACKAGES $LANGSERVER_PACKAGES" +fi +PACKAGES=$(add_nixpkgs_prefix "$PACKAGES") + +detect_user USERNAME + +if [ -e "/nix" ]; then + echo "(!) Nix is already installed! Skipping installation." +else + if [ "${USERNAME}" = "root" ] && [ "${MULTIUSER}" != "true" ]; then + echo "(!) A single user install is not allowed for root. Add a non-root user to your image or set multiUser to true in your feature configuration." + exit 1 + fi + + # Verify dependencies + apt_get_update_if_exists + check_command curl "curl ca-certificates" "curl ca-certificates" "curl ca-certificates" + check_command gpg2 gnupg2 gnupg gnupg2 + check_command dirmngr dirmngr dirmngr dirmngr + check_command xz xz-utils xz xz + check_command git git git git + check_command xargs findutils findutils findutils + + # Determine version + find_version_from_git_tags VERSION https://github.com/NixOS/nix "tags/" + + # Download and verify install per https://nixos.org/download.html#nix-verify-installation + tmpdir="$(mktemp -d)" + echo "(*) Downloading Nix installer..." + set +e + curl -sSLf -o "${tmpdir}/install-nix" https://releases.nixos.org/nix/nix-${VERSION}/install + exit_code=$? + set -e + if [ "$exit_code" != "0" ]; then + # Handle situation where git tags are ahead of what was is available to actually download + echo "(!) Nix version ${VERSION} failed to download. Attempting to fall back one version to retry..." + find_prev_version_from_git_tags VERSION https://github.com/NixOS/nix "tags/" + curl -sSLf -o "${tmpdir}/install-nix" https://releases.nixos.org/nix/nix-${VERSION}/install + fi + cd "${FEATURE_DIR}" + + # Do a multi or single-user setup based on feature config + if [ "${MULTIUSER}" = "true" ]; then + echo "(*) Performing multi-user install..." + sh "${tmpdir}/install-nix" --daemon + else + home_dir="$(eval echo ~${USERNAME})" + if [ ! -e "${home_dir}" ]; then + echo "(!) Home directory ${home_dir} does not exist for ${USERNAME}. Nix install will fail." + exit 1 + fi + echo "(*) Performing single-user install..." + echo -e "\n**NOTE: Nix will only work for user ${USERNAME} on Linux if the host machine user's UID is $(id -u ${USERNAME}). You will need to chown /nix otherwise.**\n" + # Install per https://nixos.org/manual/nix/stable/installation/installing-binary.html#single-user-installation + mkdir -p /nix + chown ${USERNAME} /nix ${tmpdir} + su ${USERNAME} -c "sh \"${tmpdir}/install-nix\" --no-daemon --no-modify-profile" + # nix installer does not update ~/.bashrc, and USER may or may not be defined, so update rc/profile files directly to handle that + snippet=' + if [ "${PATH#*$HOME/.nix-profile/bin}" = "${PATH}" ]; then if [ -z "$USER" ]; then USER=$(whoami); fi; . $HOME/.nix-profile/etc/profile.d/nix.sh; fi + ' + update_rc_file "$home_dir/.bashrc" "${snippet}" + update_rc_file "$home_dir/.zshenv" "${snippet}" + update_rc_file "$home_dir/.profile" "${snippet}" + fi + rm -rf "${tmpdir}" "/tmp/tmp-gnupg" +fi + +# Set nix config +mkdir -p /etc/nix +create_or_update_file /etc/nix/nix.conf 'sandbox = false' +if [ ! -z "${FLAKEURI}" ] && [ "${FLAKEURI}" != "none" ]; then + create_or_update_file /etc/nix/nix.conf 'experimental-features = nix-command flakes' +fi +# Extra nix config +if [ ! -z "${EXTRANIXCONFIG}" ]; then + OLDIFS=$IFS + IFS="," + read -a extra_nix_config <<<"$EXTRANIXCONFIG" + for line in "${extra_nix_config[@]}"; do + create_or_update_file /etc/nix/nix.conf "$line" + done + IFS=$OLDIFS +fi + +# Create entrypoint if needed +if [ ! -e "/usr/local/share/nix-entrypoint.sh" ]; then + if [ "${MULTIUSER}" = "true" ]; then + echo "(*) Setting up entrypoint..." + cp -f nix-entrypoint.sh /usr/local/share/ + else + echo -e '#!/bin/bash\nexec "$@"' >/usr/local/share/nix-entrypoint.sh + fi + chmod +x /usr/local/share/nix-entrypoint.sh +fi + +# Install packages, flakes, etc if specified +chmod +x,o+r ${FEATURE_DIR} ${FEATURE_DIR}/post-install-steps.sh +if [ "${MULTIUSER}" = "true" ]; then + /usr/local/share/nix-entrypoint.sh + su ${USERNAME} -c " + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + ${FEATURE_DIR}/post-install-steps.sh + " +else + su ${USERNAME} -c " + . \$HOME/.nix-profile/etc/profile.d/nix.sh + ${FEATURE_DIR}/post-install-steps.sh + " +fi + +echo "Done!" diff --git a/src/typescriptreact_eslint/lsp-bridge-env.nix b/src/typescriptreact_eslint/lsp-bridge-env.nix new file mode 100644 index 0000000..0781ae9 --- /dev/null +++ b/src/typescriptreact_eslint/lsp-bridge-env.nix @@ -0,0 +1,28 @@ +{ pkgs ? import { } }: +let + lspBridgeSrc = pkgs.callPackage ./lsp-bridge.nix { }; + lspBridgeVenvDir = "/tmp/lsp-bridge-venv"; + lspBridgeLinkDir = "/tmp/lsp-bridge"; +in pkgs.mkShell { + + venvDir = lspBridgeVenvDir; + + buildInputs = [ + pkgs.python311Packages.venvShellHook + lspBridgeSrc + ]; + + # this is run once only, after the virtual environment is created + postVenvCreation = '' + # ensure that the build will not be affected by changes in the system time + unset SOURCE_DATE_EPOCH + + pip install -r requirements.txt + ''; + + postShellHook = '' + if [[ ! -d ${lspBridgeLinkDir} ]]; then + ln -s ${lspBridgeSrc} ${lspBridgeLinkDir} + fi + ''; +} diff --git a/src/typescriptreact_eslint/lsp-bridge-start.sh b/src/typescriptreact_eslint/lsp-bridge-start.sh new file mode 100644 index 0000000..40ef477 --- /dev/null +++ b/src/typescriptreact_eslint/lsp-bridge-start.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eu + +PYTHON_CMD="/tmp/lsp-bridge-venv/bin/python3" +LSP_BRIDGE_SCRIPT="/tmp/lsp-bridge/lsp_bridge.py" +LOG_FILE="/tmp/lsp-bridge.log" + +if ! pidof $PYTHON_CMD >/dev/null 2>&1; then + echo -e "Start lsp-bridge process as user $(whoami)" | tee >$LOG_FILE + start_ok=false + # start the process in background + $PYTHON_CMD $LSP_BRIDGE_SCRIPT >>$LOG_FILE 2>&1 & + if [ "$?" = "0" ]; then + start_ok=true + fi + if [ "${start_ok}" = "false" ]; then + echo -e 'Start lsp-bridge failed' | tee >>$LOG_FILE + else + echo -e 'Start lsp-bridge successfully' | tee >>$LOG_FILE + fi +fi diff --git a/src/typescriptreact_eslint/lsp-bridge.nix b/src/typescriptreact_eslint/lsp-bridge.nix new file mode 100644 index 0000000..53a3acc --- /dev/null +++ b/src/typescriptreact_eslint/lsp-bridge.nix @@ -0,0 +1,19 @@ +{ pkgs ? import { } }: + +pkgs.stdenv.mkDerivation { + pname = "lsp-bridge-src"; + version = "20240717-master"; + src = pkgs.fetchFromGitHub { + owner = "manateelazycat"; + repo = "lsp-bridge"; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; + }; + buildInputs = [ pkgs.python311Packages.python ]; + dontConfigure = true; + doUnpack = true; + installPhase = '' + mkdir -p $out; + cp -r $src/* $out; + ''; +} diff --git a/src/typescriptreact_eslint/nix-entrypoint.sh b/src/typescriptreact_eslint/nix-entrypoint.sh new file mode 100644 index 0000000..1367bff --- /dev/null +++ b/src/typescriptreact_eslint/nix-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Attempt to start daemon +set +e +if ! pidof nix-daemon > /dev/null 2>&1; then + start_ok=false + if [ "$(id -u)" = "0" ]; then + ( . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh; /nix/var/nix/profiles/default/bin/nix-daemon > /tmp/nix-daemon.log 2>&1 ) & + if [ "$?" = "0" ]; then + start_ok=true + fi + elif type sudo > /dev/null 2>&1; then + sudo -n sh -c '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh; /nix/var/nix/profiles/default/bin/nix-daemon > /tmp/nix-daemon.log 2>&1' & + if [ "$?" = "0" ]; then + start_ok=true + fi + fi + if [ "${start_ok}" = "false" ]; then + echo -e 'Failed to start nix-daemon as root. Set multiUser to false in your feature configuration if you would\nprefer to run the container as a non-root. You may also start the daemon manually if you have sudo\ninstalled and configured for your user by running "sudo -c nix-daemon &"' + fi +fi + +exec "$@" diff --git a/src/typescriptreact_eslint/nix-packages.sh b/src/typescriptreact_eslint/nix-packages.sh new file mode 100644 index 0000000..d5fc240 --- /dev/null +++ b/src/typescriptreact_eslint/nix-packages.sh @@ -0,0 +1 @@ +LANGSERVER_PACKAGES="nodePackages.typescript-language-server,vscode-langservers-extracted" diff --git a/src/typescriptreact_eslint/post-install-steps.sh b/src/typescriptreact_eslint/post-install-steps.sh new file mode 100644 index 0000000..4f80e0f --- /dev/null +++ b/src/typescriptreact_eslint/post-install-steps.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e +echo "(*) Executing post-installation steps..." + +# Import add_nixpkgs_prefix +. ./utils.sh + +# Install list of packages in profile if specified. +if [ ! -z "${PACKAGES}" ] && [ "${PACKAGES}" != "none" ]; then + if [ "${USEATTRPATH}" = "true" ]; then + PACKAGES=$(add_nixpkgs_prefix "$PACKAGES") + echo "Installing packages \"${PACKAGES}\" in profile..." + nix-env -iA ${PACKAGES} + else + echo "Installing packages \"${PACKAGES}\" in profile..." + nix-env --install ${PACKAGES} + fi +fi + +# Install Nix flake in profile if specified +if [ ! -z "${FLAKEURI}" ] && [ "${FLAKEURI}" != "none" ]; then + echo "Installing flake ${FLAKEURI} in profile..." + nix profile install "${FLAKEURI}" +fi + +# use nix-shell to create a virtualenv and exit +nix-env -i -f ./lsp-bridge.nix +nix-shell ./lsp-bridge-env.nix --command "echo 'finish lsp bridge env setup'" +cp -f ./lsp-bridge-start.sh /tmp/lsp-bridge-start.sh + +# nix-collect-garbage --delete-old +# nix-store --optimise diff --git a/src/typescriptreact_eslint/requirements.txt b/src/typescriptreact_eslint/requirements.txt new file mode 100644 index 0000000..29e5d4d --- /dev/null +++ b/src/typescriptreact_eslint/requirements.txt @@ -0,0 +1,7 @@ +epc==0.0.5 +orjson==3.9.10 +sexpdata==1.0.0 +setuptools==69.0.2 +rapidfuzz==3.6.1 +paramiko==3.4.0 +six==1.16.0 diff --git a/src/typescriptreact_eslint/utils.sh b/src/typescriptreact_eslint/utils.sh new file mode 100644 index 0000000..6cfa1d8 --- /dev/null +++ b/src/typescriptreact_eslint/utils.sh @@ -0,0 +1,285 @@ +# Function to run apt-get if needed +apt_get_update_if_needed() +{ + export DEBIAN_FRONTEND=noninteractive + if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update + else + echo "Skipping apt-get update." + fi +} + +# Function to run apt-get if command exists +apt_get_update_if_exists() +{ + if type apt-get > /dev/null 2>&1; then + apt-get update + fi +} + +# Checks if packages are installed and installs them if not +check_packages() { + if type dpkg > /dev/null 2>&1 && dpkg -s $1 > /dev/null 2>&1; then + return 0 + elif type apk > /dev/null 2>&1 && apk -e info $2 > /dev/null 2>&1; then + return 0 + elif type rpm > /dev/null 2>&1 && rpm -q $3 > /dev/null 2>&1; then + return 0 + else + echo "Unable to find package manager to check for packages." + exit 1 + fi + install_packages "$@" + return $? +} + +# Checks if command exists, installs it if not +# check_command "" "" "" +check_command() { + command_to_check=$1 + shift + if type "${command_to_check}" > /dev/null 2>&1; then + return 0 + fi + install_packages "$@" + return $? +} + +# Installs packages using the appropriate package manager (apt, apk, dnf, or yum) +# install_packages "" "" "" +install_packages() { + if type apt-get > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install --no-install-recommends $1 + elif type apk > /dev/null 2>&1; then + apk add $2 + elif type dnf > /dev/null 2>&1; then + dnf install -y $3 + elif type yum > /dev/null 2>&1; then + yum install -y $3 + else + echo "Unable to find package manager to install ${command_to_check}" + exit 1 + fi +} + +# If in automatic mode, determine if a user already exists, if not use root +detect_user() { + local user_variable_name=${1:-username} + local possible_users=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") + if [ "${!user_variable_name}" = "auto" ] || [ "${!user_variable_name}" = "automatic" ]; then + declare -g ${user_variable_name}="" + for current_user in ${possible_users[@]}; do + if id -u "${current_user}" > /dev/null 2>&1; then + declare -g ${user_variable_name}="${current_user}" + break + fi + done + fi + if [ "${!user_variable_name}" = "" ] || [ "${!user_variable_name}" = "none" ] || ! id -u "${!user_variable_name}" > /dev/null 2>&1; then + declare -g ${user_variable_name}=root + fi +} + +# Figure out correct version of a three part version number is not passed +find_version_from_git_tags() { + local variable_name=$1 + local requested_version=${!variable_name} + if [ "${requested_version}" = "none" ]; then return; fi + local repository=$2 + # Normally a "v" is used before the version number, but support alternate cases + local prefix=${3:-"tags/v"} + # Some repositories use "_" instead of "." for version number part separation, support that + local separator=${4:-"."} + # Some tools release versions that omit the last digit (e.g. go) + local last_part_optional=${5:-"false"} + # Some repositories may have tags that include a suffix (e.g. actions/node-versions) + local version_suffix_regex=$6 + + local escaped_separator=${separator//./\\.} + local break_fix_digit_regex + if [ "${last_part_optional}" = "true" ]; then + break_fix_digit_regex="(${escaped_separator}[0-9]+)?" + else + break_fix_digit_regex="${escaped_separator}[0-9]+" + fi + local version_regex="[0-9]+${escaped_separator}[0-9]+${break_fix_digit_regex}${version_suffix_regex//./\\.}" + # If we're passed a matching version number, just return it, otherwise look for a version + if ! echo "${requested_version}" | grep -E "^${versionMatchRegex}$" > /dev/null 2>&1; then + local version_list="$(git ls-remote --tags ${repository} | grep -oP "${prefix}\\K${version_regex}$" | tr -d ' ' | tr "${separator}" "." | sort -rV)" + if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then + declare -g ${variable_name}="$(echo "${version_list}" | head -n 1)" + else + set +e + declare -g ${variable_name}="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|${version_suffix_regex//./\\.}|$)")" + set -e + fi + if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" > /dev/null 2>&1; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2 + exit 1 + fi + fi + echo "Adjusted ${variable_name}=${!variable_name}" +} + +# Soft version matching that resolves a version for a given package in the *current apt-cache* +# Return value is stored in first argument (the unprocessed version) +apt_cache_version_soft_match() { + # Version + local variable_name="$1" + local requested_version=${!variable_name} + # Package Name + local package_name="$2" + # Exit on no match? + local exit_on_no_match="${3:-true}" + + # Ensure we've exported useful variables + . /etc/os-release + local architecture="$(dpkg --print-architecture)" + + dot_escaped="${requested_version//./\\.}" + dot_plus_escaped="${dot_escaped//+/\\+}" + # Regex needs to handle debian package version number format: https://www.systutorials.com/docs/linux/man/5-deb-version/ + version_regex="^(.+:)?${dot_plus_escaped}([\\.\\+ ~:-]|$)" + set +e # Don't exit if finding version fails - handle gracefully + fuzzy_version="$(apt-cache madison ${package_name} | awk -F"|" '{print $2}' | sed -e 's/^[ \t]*//' | grep -E -m 1 "${version_regex}")" + set -e + if [ -z "${fuzzy_version}" ]; then + echo "(!) No full or partial for package \"${package_name}\" match found in apt-cache for \"${requested_version}\" on OS ${ID} ${VERSION_CODENAME} (${architecture})." + + if $exit_on_no_match; then + echo "Available versions:" + apt-cache madison ${package_name} | awk -F"|" '{print $2}' | grep -oP '^(.+:)?\K.+' + exit 1 # Fail entire script + else + echo "Continuing to fallback method (if available)" + return 1; + fi + fi + + # Globally assign fuzzy_version to this value + # Use this value as the return value of this function + declare -g ${variable_name}="=${fuzzy_version}" + echo "${variable_name}=${!variable_name}" +} + +# Checks if a marker file exists with the correct contents +# check_marker [argument to be validated]... +check_marker() { + local marker_path="$1" + shift + local verifier_string="$(echo "$@")" + if [ -e "${marker_path}" ] && [ "${verifier_string}" = "$(cat ${marker_path})" ]; then + return 1 + else + return 0 + fi +} + +# Updates marker for future checking +# update_marker [argument to be validated]... +update_marker() { + local marker_path="$1" + shift + mkdir -p "$(dirname "${marker_path}")" + echo "$(echo "$@")" > "${marker_path}" +} + +# run_if_exists ... +run_if_exists() { + if [ -e "$1" ]; then + "$@" + fi +} + +# run_as_user_if_exists ... +run_as_user_if_exists() { + local username=$1 + shift + if [ -e "$1" ]; then + local command_string="$@" + su "${username}" -c "${command_string//"/\\"}" + fi +} + +# symlink_if_ne +symlink_if_ne() { + if [ ! -e "$2" ]; then + ln -s "$1" "$2" + fi +} + +# Update a rc/profile file if it exists and string is not already present +update_rc_file() { + # see if folder containing file exists + local rc_file_folder="$(dirname "$1")" + if [ ! -d "${rc_file_folder}" ]; then + echo "${rc_file_folder} does not exist. Skipping update of $1." + elif [ ! -e "$1" ] || [[ "$(cat "$1")" != *"$2"* ]]; then + echo "$2" >> "$1" + fi +} + +# Update a file if with string if not already present +# create_or_update_file +create_or_update_file() { + if [ ! -e "$1" ] || [[ "$(cat "$1")" != *"$2"* ]]; then + echo "$2" >> "$1" + fi +} + +# Use semver logic to decrement a version number then look for the closest match +find_prev_version_from_git_tags() { + local variable_name=$1 + local current_version=${!variable_name} + local repository=$2 + # Normally a "v" is used before the version number, but support alternate cases + local prefix=${3:-"tags/v"} + # Some repositories use "_" instead of "." for version number part separation, support that + local separator=${4:-"."} + # Some tools release versions that omit the last digit (e.g. go) + local last_part_optional=${5:-"false"} + # Some repositories may have tags that include a suffix (e.g. actions/node-versions) + local version_suffix_regex=$6 + # Try one break fix version number less if we get a failure. Use "set +e" since "set -e" can cause failures in valid scenarios. + set +e + major="$(echo "${current_version}" | grep -oE '^[0-9]+' || echo '')" + minor="$(echo "${current_version}" | grep -oP '^[0-9]+\.\K[0-9]+' || echo '')" + breakfix="$(echo "${current_version}" | grep -oP '^[0-9]+\.[0-9]+\.\K[0-9]+' 2>/dev/null || echo '')" + + if [ "${minor}" = "0" ] && [ "${breakfix}" = "0" ]; then + ((major=major-1)) + declare -g ${variable_name}="${major}" + # Look for latest version from previous major release + find_version_from_git_tags "${variable_name}" "${repository}" "${prefix}" "${separator}" "${last_part_optional}" + # Handle situations like Go's odd version pattern where "0" releases omit the last part + elif [ "${breakfix}" = "" ] || [ "${breakfix}" = "0" ]; then + ((minor=minor-1)) + declare -g ${variable_name}="${major}.${minor}" + # Look for latest version from previous minor release + find_version_from_git_tags "${variable_name}" "${repository}" "${prefix}" "${separator}" "${last_part_optional}" + else + ((breakfix=breakfix-1)) + if [ "${breakfix}" = "0" ] && [ "${last_part_optional}" = "true" ]; then + declare -g ${variable_name}="${major}.${minor}" + else + declare -g ${variable_name}="${major}.${minor}.${breakfix}" + fi + fi + + set -e +} + +# if not starts with "nixpkgs." add it as prefix to package name +add_nixpkgs_prefix() { + local packages=$1 + local -a addr + IFS=' ' read -ra addr <<<"$packages" + for i in "${!addr[@]}"; do + if [[ ${addr[i]} != nixpkgs.* ]]; then + addr[i]="nixpkgs.${addr[i]}" + fi + done + IFS=' ' echo "${addr[*]}" +} diff --git a/src/typst-lsp/devcontainer-feature.json b/src/typst-lsp/devcontainer-feature.json index 9379d50..5685c7c 100644 --- a/src/typst-lsp/devcontainer-feature.json +++ b/src/typst-lsp/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "typst-lsp", - "version": "0.4.2", - "name": "emacs lsp-bridge typst-lsp language server", - "description": "emacs lsp-bridge typst-lsp language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "typst-lsp", + "version": "0.4.3", + "name": "emacs lsp-bridge typst-lsp language server", + "description": "emacs lsp-bridge typst-lsp language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/typst-lsp/lsp-bridge.nix b/src/typst-lsp/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/typst-lsp/lsp-bridge.nix +++ b/src/typst-lsp/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/vscode-css-language-server/devcontainer-feature.json b/src/vscode-css-language-server/devcontainer-feature.json index 5b5f95c..27b8519 100644 --- a/src/vscode-css-language-server/devcontainer-feature.json +++ b/src/vscode-css-language-server/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "vscode-css-language-server", - "version": "0.4.2", - "name": "emacs lsp-bridge vscode-css-language-server language server", - "description": "emacs lsp-bridge vscode-css-language-server language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "vscode-css-language-server", + "version": "0.4.3", + "name": "emacs lsp-bridge vscode-css-language-server language server", + "description": "emacs lsp-bridge vscode-css-language-server language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/vscode-css-language-server/lsp-bridge.nix b/src/vscode-css-language-server/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/vscode-css-language-server/lsp-bridge.nix +++ b/src/vscode-css-language-server/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/vscode-eslint-language-server/devcontainer-feature.json b/src/vscode-eslint-language-server/devcontainer-feature.json index c791de4..9b52236 100644 --- a/src/vscode-eslint-language-server/devcontainer-feature.json +++ b/src/vscode-eslint-language-server/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "vscode-eslint-language-server", - "version": "0.4.2", - "name": "emacs lsp-bridge vscode-eslint-language-server language server", - "description": "emacs lsp-bridge vscode-eslint-language-server language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "vscode-eslint-language-server", + "version": "0.4.3", + "name": "emacs lsp-bridge vscode-eslint-language-server language server", + "description": "emacs lsp-bridge vscode-eslint-language-server language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/vscode-eslint-language-server/lsp-bridge.nix b/src/vscode-eslint-language-server/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/vscode-eslint-language-server/lsp-bridge.nix +++ b/src/vscode-eslint-language-server/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/vscode-html-language-server/devcontainer-feature.json b/src/vscode-html-language-server/devcontainer-feature.json index c99639e..ea3c229 100644 --- a/src/vscode-html-language-server/devcontainer-feature.json +++ b/src/vscode-html-language-server/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "vscode-html-language-server", - "version": "0.4.2", - "name": "emacs lsp-bridge vscode-html-language-server language server", - "description": "emacs lsp-bridge vscode-html-language-server language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "vscode-html-language-server", + "version": "0.4.3", + "name": "emacs lsp-bridge vscode-html-language-server language server", + "description": "emacs lsp-bridge vscode-html-language-server language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/vscode-html-language-server/lsp-bridge.nix b/src/vscode-html-language-server/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/vscode-html-language-server/lsp-bridge.nix +++ b/src/vscode-html-language-server/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/src/vscode-json-language-server/devcontainer-feature.json b/src/vscode-json-language-server/devcontainer-feature.json index acc6564..27e5e6a 100644 --- a/src/vscode-json-language-server/devcontainer-feature.json +++ b/src/vscode-json-language-server/devcontainer-feature.json @@ -1,51 +1,48 @@ { - "id": "vscode-json-language-server", - "version": "0.4.2", - "name": "emacs lsp-bridge vscode-json-language-server language server", - "description": "emacs lsp-bridge vscode-json-language-server language server environment installed by Nix Pacakge Manager", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "2.11" - ], - "default": "latest", - "description": "Version of Nix to install." - }, - "multiUser": { - "type": "boolean", - "default": true, - "description": "Perform a multi-user install (instead of single user)" - }, - "packages": { - "type": "string", - "default": "", - "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." - }, - "useAttrPath": { - "type": "boolean", - "default": true, - "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." - }, - "flakeUri": { - "type": "string", - "default": "", - "description": "Optional URI to a Nix Flake to install in profile." - }, - "extraNixConfig": { - "type": "string", - "default": "", - "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." - } + "id": "vscode-json-language-server", + "version": "0.4.3", + "name": "emacs lsp-bridge vscode-json-language-server language server", + "description": "emacs lsp-bridge vscode-json-language-server language server environment installed by Nix Pacakge Manager", + "options": { + "version": { + "type": "string", + "proposals": ["latest", "2.11"], + "default": "latest", + "description": "Version of Nix to install." }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers/features/sshd" - ], - "containerEnv": { - "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + "multiUser": { + "type": "boolean", + "default": true, + "description": "Perform a multi-user install (instead of single user)" }, - "entrypoint": "/usr/local/share/nix-entrypoint.sh", - "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" -} \ No newline at end of file + "packages": { + "type": "string", + "default": "", + "description": "Optinal additional comma separated list of Nix packages to install in profile besides default language server pacakge." + }, + "useAttrPath": { + "type": "boolean", + "default": true, + "description": "Enable this option to use exact attribute path of the package in the Nixpkgs repository, aligning with the nix-env -iA command." + }, + "flakeUri": { + "type": "string", + "default": "", + "description": "Optional URI to a Nix Flake to install in profile." + }, + "extraNixConfig": { + "type": "string", + "default": "", + "description": "Optional comma separated list of extra lines to add to /etc/nix/nix.conf." + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/sshd" + ], + "containerEnv": { + "PATH": "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}" + }, + "entrypoint": "/usr/local/share/nix-entrypoint.sh", + "postStartCommand": "nohup bash /tmp/lsp-bridge-start.sh" +} diff --git a/src/vscode-json-language-server/lsp-bridge.nix b/src/vscode-json-language-server/lsp-bridge.nix index 9e2ba4a..53a3acc 100644 --- a/src/vscode-json-language-server/lsp-bridge.nix +++ b/src/vscode-json-language-server/lsp-bridge.nix @@ -2,12 +2,12 @@ pkgs.stdenv.mkDerivation { pname = "lsp-bridge-src"; - version = "20240609-master"; + version = "20240717-master"; src = pkgs.fetchFromGitHub { - owner = "nohzafk"; + owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "feature/run-in-container"; - sha256 = "sha256-Y1gc2aPDTTPLPjPpyCfvA7jaeww/v6dgZGscAKjW3qw="; + rev = "f47cf14"; + sha256 = "sha256-Rg3oA+wYdhsT2q4QQ/0aCGdluoaZ9ZY9JAeXRV2M34s="; }; buildInputs = [ pkgs.python311Packages.python ]; dontConfigure = true; diff --git a/test/typescriptreact_eslint/test.sh b/test/typescriptreact_eslint/test.sh new file mode 100644 index 0000000..cb64e2e --- /dev/null +++ b/test/typescriptreact_eslint/test.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +uid="$(id -u)" +echo "Current user UID is ${uid}." +if [ "${uid}" != "1000" ]; then + echo "Current user UID was adjusted." +fi +set +e +vscode_uid="$(id -u vscode)" +set -e +if [ "${vscode_uid}" != "" ]; then + echo "User vscode UID is ${vscode_uid}." + if [ "${vscode_uid}" != "1000" ]; then + echo "User vscode UID was adjusted." + fi +fi +nix_uid="$(stat /nix -c "%u")" +echo "/nix UID is ${nix_uid}." + +cat /etc/os-release + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. +check "nix-env" type nix-env + +langserver_binary="typescript-language-server,vscode-eslint-language-server" + +IFS=',' +for item in $langserver_binary; do + # Trim leading and trailing whitespace + item=$(echo $item | xargs) + # Perform the check + check "$item installed" type $item +done + +check "lsp_bridge can be started successfully" cat /tmp/lsp-bridge.log | grep successfully + +# Report result +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults &2>1 \ No newline at end of file