figsoda 2022-12-31 20:07:08 -05:00
parent ac949b8892
commit fad9d559a3
3 changed files with 23 additions and 8 deletions

View File

@ -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=";
};

View File

@ -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 += """ }:
{
"""

View File

@ -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";