about summary refs log tree commit diff stats
path: root/pkgs/by-name/tr/tree-sitter-yts
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
commit204731c0a69136c9cebcb54f1afecf5145e26bbe (patch)
treefc9132e5dc74e4a8e1327cdd411839a90f9410aa /pkgs/by-name/tr/tree-sitter-yts
parentrefactor(sys): Modularize and move to `modules/system` or `pkgs` (diff)
downloadnixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.tar.gz
nixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.zip
refactor(pkgs): Categorize into `by-name` shards
This might not be the perfect way to organize a package set --
especially if the set is not nearly the size of nixpkgs -- but it is
_at_ least a way of organization.
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/.editorconfig (renamed from pkgs/sources/tree-sitter-yts/.editorconfig)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/.envrc (renamed from pkgs/sources/tree-sitter-yts/.envrc)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/.gitignore (renamed from pkgs/sources/tree-sitter-yts/.gitignore)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/Cargo.toml (renamed from pkgs/sources/tree-sitter-yts/Cargo.toml)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/binding.gyp (renamed from pkgs/sources/tree-sitter-yts/binding.gyp)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/bindings/node/binding.cc (renamed from pkgs/sources/tree-sitter-yts/bindings/node/binding.cc)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/bindings/node/index.js (renamed from pkgs/sources/tree-sitter-yts/bindings/node/index.js)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/bindings/rust/build.rs (renamed from pkgs/sources/tree-sitter-yts/bindings/rust/build.rs)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/bindings/rust/lib.rs (renamed from pkgs/sources/tree-sitter-yts/bindings/rust/lib.rs)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/corpus/comments.txt (renamed from pkgs/sources/tree-sitter-yts/corpus/comments.txt)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/corpus/comments_correct.txt (renamed from pkgs/sources/tree-sitter-yts/corpus/comments_correct.txt)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/corpus/duration.txt (renamed from pkgs/sources/tree-sitter-yts/corpus/duration.txt)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/corpus/url.txt (renamed from pkgs/sources/tree-sitter-yts/corpus/url.txt)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/flake.lock (renamed from pkgs/sources/tree-sitter-yts/flake.lock)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/flake.nix (renamed from pkgs/sources/tree-sitter-yts/flake.nix)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/grammar.js (renamed from pkgs/sources/tree-sitter-yts/grammar.js)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/highlight.yts (renamed from pkgs/sources/tree-sitter-yts/highlight.yts)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/package.json (renamed from pkgs/sources/tree-sitter-yts/package.json)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/package.nix59
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/queries/highlights.scm (renamed from pkgs/sources/tree-sitter-yts/queries/highlights.scm)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/src/grammar.json (renamed from pkgs/sources/tree-sitter-yts/src/grammar.json)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/src/node-types.json (renamed from pkgs/sources/tree-sitter-yts/src/node-types.json)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/src/parser.c (renamed from pkgs/sources/tree-sitter-yts/src/parser.c)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/src/tree_sitter/parser.h (renamed from pkgs/sources/tree-sitter-yts/src/tree_sitter/parser.h)0
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/treefmt.toml (renamed from pkgs/sources/tree-sitter-yts/treefmt.toml)0
25 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/sources/tree-sitter-yts/.editorconfig b/pkgs/by-name/tr/tree-sitter-yts/.editorconfig
index 919c78fa..919c78fa 100644
--- a/pkgs/sources/tree-sitter-yts/.editorconfig
+++ b/pkgs/by-name/tr/tree-sitter-yts/.editorconfig
diff --git a/pkgs/sources/tree-sitter-yts/.envrc b/pkgs/by-name/tr/tree-sitter-yts/.envrc
index 3550a30f..3550a30f 100644
--- a/pkgs/sources/tree-sitter-yts/.envrc
+++ b/pkgs/by-name/tr/tree-sitter-yts/.envrc
diff --git a/pkgs/sources/tree-sitter-yts/.gitignore b/pkgs/by-name/tr/tree-sitter-yts/.gitignore
index c4e2e389..c4e2e389 100644
--- a/pkgs/sources/tree-sitter-yts/.gitignore
+++ b/pkgs/by-name/tr/tree-sitter-yts/.gitignore
diff --git a/pkgs/sources/tree-sitter-yts/Cargo.toml b/pkgs/by-name/tr/tree-sitter-yts/Cargo.toml
index 5287c420..5287c420 100644
--- a/pkgs/sources/tree-sitter-yts/Cargo.toml
+++ b/pkgs/by-name/tr/tree-sitter-yts/Cargo.toml
diff --git a/pkgs/sources/tree-sitter-yts/binding.gyp b/pkgs/by-name/tr/tree-sitter-yts/binding.gyp
index b05038b4..b05038b4 100644
--- a/pkgs/sources/tree-sitter-yts/binding.gyp
+++ b/pkgs/by-name/tr/tree-sitter-yts/binding.gyp
diff --git a/pkgs/sources/tree-sitter-yts/bindings/node/binding.cc b/pkgs/by-name/tr/tree-sitter-yts/bindings/node/binding.cc
index a042be54..a042be54 100644
--- a/pkgs/sources/tree-sitter-yts/bindings/node/binding.cc
+++ b/pkgs/by-name/tr/tree-sitter-yts/bindings/node/binding.cc
diff --git a/pkgs/sources/tree-sitter-yts/bindings/node/index.js b/pkgs/by-name/tr/tree-sitter-yts/bindings/node/index.js
index 32179742..32179742 100644
--- a/pkgs/sources/tree-sitter-yts/bindings/node/index.js
+++ b/pkgs/by-name/tr/tree-sitter-yts/bindings/node/index.js
diff --git a/pkgs/sources/tree-sitter-yts/bindings/rust/build.rs b/pkgs/by-name/tr/tree-sitter-yts/bindings/rust/build.rs
index c6061f09..c6061f09 100644
--- a/pkgs/sources/tree-sitter-yts/bindings/rust/build.rs
+++ b/pkgs/by-name/tr/tree-sitter-yts/bindings/rust/build.rs
diff --git a/pkgs/sources/tree-sitter-yts/bindings/rust/lib.rs b/pkgs/by-name/tr/tree-sitter-yts/bindings/rust/lib.rs
index f1868b2d..f1868b2d 100644
--- a/pkgs/sources/tree-sitter-yts/bindings/rust/lib.rs
+++ b/pkgs/by-name/tr/tree-sitter-yts/bindings/rust/lib.rs
diff --git a/pkgs/sources/tree-sitter-yts/corpus/comments.txt b/pkgs/by-name/tr/tree-sitter-yts/corpus/comments.txt
index 0070baf8..0070baf8 100644
--- a/pkgs/sources/tree-sitter-yts/corpus/comments.txt
+++ b/pkgs/by-name/tr/tree-sitter-yts/corpus/comments.txt
diff --git a/pkgs/sources/tree-sitter-yts/corpus/comments_correct.txt b/pkgs/by-name/tr/tree-sitter-yts/corpus/comments_correct.txt
index 40cdab7d..40cdab7d 100644
--- a/pkgs/sources/tree-sitter-yts/corpus/comments_correct.txt
+++ b/pkgs/by-name/tr/tree-sitter-yts/corpus/comments_correct.txt
diff --git a/pkgs/sources/tree-sitter-yts/corpus/duration.txt b/pkgs/by-name/tr/tree-sitter-yts/corpus/duration.txt
index 59476b98..59476b98 100644
--- a/pkgs/sources/tree-sitter-yts/corpus/duration.txt
+++ b/pkgs/by-name/tr/tree-sitter-yts/corpus/duration.txt
diff --git a/pkgs/sources/tree-sitter-yts/corpus/url.txt b/pkgs/by-name/tr/tree-sitter-yts/corpus/url.txt
index 1ae3d106..1ae3d106 100644
--- a/pkgs/sources/tree-sitter-yts/corpus/url.txt
+++ b/pkgs/by-name/tr/tree-sitter-yts/corpus/url.txt
diff --git a/pkgs/sources/tree-sitter-yts/flake.lock b/pkgs/by-name/tr/tree-sitter-yts/flake.lock
index bff9f1fa..bff9f1fa 100644
--- a/pkgs/sources/tree-sitter-yts/flake.lock
+++ b/pkgs/by-name/tr/tree-sitter-yts/flake.lock
diff --git a/pkgs/sources/tree-sitter-yts/flake.nix b/pkgs/by-name/tr/tree-sitter-yts/flake.nix
index 1b6f8ab0..1b6f8ab0 100644
--- a/pkgs/sources/tree-sitter-yts/flake.nix
+++ b/pkgs/by-name/tr/tree-sitter-yts/flake.nix
diff --git a/pkgs/sources/tree-sitter-yts/grammar.js b/pkgs/by-name/tr/tree-sitter-yts/grammar.js
index 655f6dea..655f6dea 100644
--- a/pkgs/sources/tree-sitter-yts/grammar.js
+++ b/pkgs/by-name/tr/tree-sitter-yts/grammar.js
diff --git a/pkgs/sources/tree-sitter-yts/highlight.yts b/pkgs/by-name/tr/tree-sitter-yts/highlight.yts
index 319ee95c..319ee95c 100644
--- a/pkgs/sources/tree-sitter-yts/highlight.yts
+++ b/pkgs/by-name/tr/tree-sitter-yts/highlight.yts
diff --git a/pkgs/sources/tree-sitter-yts/package.json b/pkgs/by-name/tr/tree-sitter-yts/package.json
index 2511ccb7..2511ccb7 100644
--- a/pkgs/sources/tree-sitter-yts/package.json
+++ b/pkgs/by-name/tr/tree-sitter-yts/package.json
diff --git a/pkgs/by-name/tr/tree-sitter-yts/package.nix b/pkgs/by-name/tr/tree-sitter-yts/package.nix
new file mode 100644
index 00000000..11ab5a8d
--- /dev/null
+++ b/pkgs/by-name/tr/tree-sitter-yts/package.nix
@@ -0,0 +1,59 @@
+# taken from nixpgks: pkgs/development/tools/parsing/tree-sitter/grammar.nix
+{
+  stdenv,
+  nodejs,
+  tree-sitter,
+  lib,
+}:
+# # Build a parser grammar and put the resulting shared object in `$out/parser`
+# {
+#   # language name
+#   language ? "yts",
+#   version ? "1.0.0",
+#   src ? ./.,
+#   location ? null,
+#   generate ? false,
+#   ...
+# } @ args:
+stdenv.mkDerivation {
+  pname = "yts-grammar";
+  version = "1.0.0";
+
+  src = ./.;
+
+  nativeBuildInputs = [nodejs tree-sitter];
+
+  CFLAGS = ["-Isrc" "-O2"];
+  CXXFLAGS = ["-Isrc" "-O2"];
+
+  stripDebugList = ["parser"];
+
+  configurePhase = ''
+    tree-sitter generate
+  '';
+
+  # When both scanner.{c,cc} exist, we should not link both since they may be the same but in
+  # different languages. Just randomly prefer C++ if that happens.
+  buildPhase = ''
+    runHook preBuild
+    if [[ -e src/scanner.cc ]]; then
+      $CXX -fPIC -c src/scanner.cc -o scanner.o $CXXFLAGS
+    elif [[ -e src/scanner.c ]]; then
+      $CC -fPIC -c src/scanner.c -o scanner.o $CFLAGS
+    fi
+    $CC -fPIC -c src/parser.c -o parser.o $CFLAGS
+    rm -rf parser
+    $CXX -shared -o parser *.o
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    mv parser $out/
+    if [[ -d queries ]]; then
+      cp -r queries $out
+    fi
+    runHook postInstall
+  '';
+}
diff --git a/pkgs/sources/tree-sitter-yts/queries/highlights.scm b/pkgs/by-name/tr/tree-sitter-yts/queries/highlights.scm
index 674cbf18..674cbf18 100644
--- a/pkgs/sources/tree-sitter-yts/queries/highlights.scm
+++ b/pkgs/by-name/tr/tree-sitter-yts/queries/highlights.scm
diff --git a/pkgs/sources/tree-sitter-yts/src/grammar.json b/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
index a35a5464..a35a5464 100644
--- a/pkgs/sources/tree-sitter-yts/src/grammar.json
+++ b/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
diff --git a/pkgs/sources/tree-sitter-yts/src/node-types.json b/pkgs/by-name/tr/tree-sitter-yts/src/node-types.json
index 1a63a552..1a63a552 100644
--- a/pkgs/sources/tree-sitter-yts/src/node-types.json
+++ b/pkgs/by-name/tr/tree-sitter-yts/src/node-types.json
diff --git a/pkgs/sources/tree-sitter-yts/src/parser.c b/pkgs/by-name/tr/tree-sitter-yts/src/parser.c
index ded5c342..ded5c342 100644
--- a/pkgs/sources/tree-sitter-yts/src/parser.c
+++ b/pkgs/by-name/tr/tree-sitter-yts/src/parser.c
diff --git a/pkgs/sources/tree-sitter-yts/src/tree_sitter/parser.h b/pkgs/by-name/tr/tree-sitter-yts/src/tree_sitter/parser.h
index 972913cf..972913cf 100644
--- a/pkgs/sources/tree-sitter-yts/src/tree_sitter/parser.h
+++ b/pkgs/by-name/tr/tree-sitter-yts/src/tree_sitter/parser.h
diff --git a/pkgs/sources/tree-sitter-yts/treefmt.toml b/pkgs/by-name/tr/tree-sitter-yts/treefmt.toml
index 3d604b40..3d604b40 100644
--- a/pkgs/sources/tree-sitter-yts/treefmt.toml
+++ b/pkgs/by-name/tr/tree-sitter-yts/treefmt.toml