diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix index ef31a552162c..74e519906d20 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix @@ -1,6 +1,6 @@ # generated by pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py -{ buildGrammar, fetchFromGitHub, fetchFromGitLab, fetchFromSourcehut, fetchgit }: +{ buildGrammar, fetchFromBitbucket, fetchFromGitHub, fetchFromGitLab, fetchFromGitea, fetchFromGitiles, fetchFromRepoOrCz, fetchFromSourcehut, fetchgit }: { ada = buildGrammar { @@ -1371,8 +1371,10 @@ t32 = buildGrammar { language = "t32"; version = "f8106fc"; - source = fetchgit { - url = "https://codeberg.org/xasc/tree-sitter-t32"; + source = fetchFromGitea { + domain = "codeberg.org"; + owner = "xasc"; + repo = "tree-sitter-t32"; rev = "f8106fcf5a27f905b3d9d55d9cd3e910bea70c60"; hash = "sha256-hKddSekx67Yqm4+LqVaH8Sf1+73RlCnXE6th2FTHB34="; }; diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py b/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py index 416a6d7f96a8..6b297cd59157 100755 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py @@ -60,7 +60,12 @@ def generate_grammar(item): generated_file = """# generated by pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py -{ buildGrammar, fetchFromGitHub, fetchFromGitLab, fetchFromSourcehut, fetchgit }: +{ buildGrammar""" + +for fetcher in subprocess.check_output(["nurl", "-L"], text=True).splitlines(): + generated_file += f", {fetcher}" + +generated_file += """ }: { """ diff --git a/pkgs/tools/misc/nurl/default.nix b/pkgs/tools/misc/nurl/default.nix index f52ecf18b8cf..bf8e75deb6e1 100644 --- a/pkgs/tools/misc/nurl/default.nix +++ b/pkgs/tools/misc/nurl/default.nix @@ -1,6 +1,7 @@ { lib , rustPlatform , fetchFromGitHub +, installShellFiles , makeWrapper , gitMinimal , mercurial @@ -9,24 +10,31 @@ rustPlatform.buildRustPackage rec { pname = "nurl"; - version = "0.1.1"; + version = "0.2.1"; src = fetchFromGitHub { owner = "nix-community"; repo = "nurl"; rev = "v${version}"; - hash = "sha256-dN53Xpb3zOVI6Xpi+RRFQPLIMP3+ATMXpYpFGgFpzPw="; + hash = "sha256-bL0HNoHHFH7ouw4gFl0QJCjAOCzHPnTS76OmrgQN3V4="; }; - cargoSha256 = "sha256-bdxHxLUeIPlRw7NKg0nTaDAkQam80eepqbuAmFVIMNs="; + cargoSha256 = "sha256-UfJeYAN1f/JvPpEKzlG2BzUulreDqv3NEnSoOb2TlM0="; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; postInstall = '' wrapProgram $out/bin/nurl \ --prefix PATH : ${lib.makeBinPath [ gitMinimal mercurial nix ]} + installManPage artifacts/nurl.1 + installShellCompletion artifacts/nurl.{bash,fish} --zsh artifacts/_nurl ''; + GEN_ARTIFACTS = "artifacts"; + meta = with lib; { description = "Command-line tool to generate Nix fetcher calls from repository URLs"; homepage = "https://github.com/nix-community/nurl";