Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

kak-tree-sitter: init at 1.1.2

+62
+35
pkgs/by-name/ka/kak-tree-sitter-unwrapped/package.nix
···
··· 1 + { 2 + lib, 3 + rustPlatform, 4 + fetchFromSourcehut, 5 + nix-update-script, 6 + testers, 7 + kak-tree-sitter-unwrapped, 8 + }: 9 + 10 + rustPlatform.buildRustPackage rec { 11 + pname = "kak-tree-sitter-unwrapped"; 12 + version = "1.1.2"; 13 + 14 + src = fetchFromSourcehut { 15 + owner = "~hadronized"; 16 + repo = "kak-tree-sitter"; 17 + rev = "kak-tree-sitter-v${version}"; 18 + hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA="; 19 + }; 20 + 21 + cargoHash = "sha256-v0DNcWPoHdquOlyPoPLoFulz66yCPR1W1Z3uuTjli5k="; 22 + 23 + passthru = { 24 + updateScript = nix-update-script { }; 25 + tests.version = testers.testVersion { package = kak-tree-sitter-unwrapped; }; 26 + }; 27 + 28 + meta = { 29 + homepage = "https://git.sr.ht/~hadronized/kak-tree-sitter"; 30 + description = "Server that interfaces tree-sitter with kakoune"; 31 + mainProgram = "kak-tree-sitter"; 32 + license = with lib.licenses; [ bsd3 ]; 33 + maintainers = with lib.maintainers; [ lelgenio ]; 34 + }; 35 + }
+27
pkgs/by-name/ka/kak-tree-sitter/package.nix
···
··· 1 + { 2 + lib, 3 + makeWrapper, 4 + symlinkJoin, 5 + tinycc, 6 + kak-tree-sitter-unwrapped, 7 + }: 8 + 9 + symlinkJoin rec { 10 + pname = lib.replaceStrings [ "-unwrapped" ] [ "" ] kak-tree-sitter-unwrapped.pname; 11 + inherit (kak-tree-sitter-unwrapped) version; 12 + name = "${pname}-${version}"; 13 + 14 + paths = [ kak-tree-sitter-unwrapped ]; 15 + nativeBuildInputs = [ makeWrapper ]; 16 + 17 + # Tree-Sitter grammars are C programs that need to be compiled 18 + # Use tinycc as cc to reduce closure size 19 + postBuild = '' 20 + mkdir -p $out/libexec/tinycc/bin 21 + ln -s ${lib.getExe tinycc} $out/libexec/tinycc/bin/cc 22 + wrapProgram "$out/bin/ktsctl" \ 23 + --suffix PATH : $out/libexec/tinycc/bin 24 + ''; 25 + 26 + inherit (kak-tree-sitter-unwrapped) meta; 27 + }