From fad9d559a3d2a5ed34a1cb841e3d4bc5f7081ae5 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 31 Dec 2022 20:07:08 -0500 Subject: [PATCH 1/2] nurl: 0.1.1 -> 0.2.1 Diff: https://github.com/nix-community/nurl/compare/v0.1.1...v0.2.1 Changelog: https://github.com/nix-community/nurl/blob/v0.2.1/CHANGELOG.md --- .../vim/plugins/nvim-treesitter/generated.nix | 8 +++++--- .../vim/plugins/nvim-treesitter/update.py | 7 ++++++- pkgs/tools/misc/nurl/default.nix | 16 ++++++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) 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"; From 108b709361eea88dc90b319841b4350b1e0fded8 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 1 Jan 2023 14:30:17 -0500 Subject: [PATCH 2/2] nurl: 0.2.1 -> 0.2.2 Diff: https://github.com/nix-community/nurl/compare/v0.2.1...v0.2.2 Changelog: https://github.com/nix-community/nurl/blob/v0.2.2/CHANGELOG.md --- pkgs/tools/misc/nurl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/nurl/default.nix b/pkgs/tools/misc/nurl/default.nix index bf8e75deb6e1..b3ba4ca3a6aa 100644 --- a/pkgs/tools/misc/nurl/default.nix +++ b/pkgs/tools/misc/nurl/default.nix @@ -10,16 +10,16 @@ rustPlatform.buildRustPackage rec { pname = "nurl"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "nix-community"; repo = "nurl"; rev = "v${version}"; - hash = "sha256-bL0HNoHHFH7ouw4gFl0QJCjAOCzHPnTS76OmrgQN3V4="; + hash = "sha256-hK3bHaMzpqz3W/iJpSPf4Iv6nrLpVLBIkAy5QxI+yrg="; }; - cargoSha256 = "sha256-UfJeYAN1f/JvPpEKzlG2BzUulreDqv3NEnSoOb2TlM0="; + cargoSha256 = "sha256-eHk9mBaHbKVp7lCmSmrHQoRMDFCmUJ+LN5TVa3LhNZ8="; nativeBuildInputs = [ installShellFiles