mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: rename custom -> packages
This commit is contained in:
parent
754882bf0d
commit
afc2eea47a
24 changed files with 1 additions and 1 deletions
43
nix/packages/tokei/default.nix
Normal file
43
nix/packages/tokei/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
libiconv,
|
||||
darwin,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
let
|
||||
rev = "6392516c47d4573d16886b9fe5f79592b1c70d49";
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "tokei";
|
||||
version = lib.substring 0 7 rev;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "XAMPPRocky";
|
||||
repo = "tokei";
|
||||
inherit rev;
|
||||
hash = "sha256-EYr4K1Bt+74jb85UQ3So0efrOcYAq71/4++kMCSPi1E=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-fdAJwQNJczRqy0KQqse8QRx5+1gZTCBw+kkwgn6UGKU=";
|
||||
|
||||
patches = [
|
||||
./hledger.patch
|
||||
./skel.patch
|
||||
./why3.patch
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
libiconv
|
||||
darwin.Security
|
||||
];
|
||||
|
||||
checkInputs = lib.optionals stdenv.isDarwin [ zlib ];
|
||||
|
||||
# enable all output formats
|
||||
buildFeatures = [ "all" ];
|
||||
}
|
||||
42
nix/packages/tokei/hledger.patch
Normal file
42
nix/packages/tokei/hledger.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/languages.json b/languages.json
|
||||
index ac548b9..b2899f1 100644
|
||||
--- a/languages.json
|
||||
+++ b/languages.json
|
||||
@@ -846,6 +846,13 @@
|
||||
"nested": true,
|
||||
"extensions": ["lean", "hlean"]
|
||||
},
|
||||
+ "Hledger": {
|
||||
+ "name": "hledger",
|
||||
+ "line_comment": [";", "#"],
|
||||
+ "multi_line_comments": [["comment", "end comment"]],
|
||||
+ "nested": false,
|
||||
+ "extensions": ["hledger"]
|
||||
+ },
|
||||
"Less": {
|
||||
"name": "LESS",
|
||||
"line_comment": ["//"],
|
||||
diff --git a/tests/data/hledger.hledger b/tests/data/hledger.hledger
|
||||
new file mode 100644
|
||||
index 0000000..df7259d
|
||||
--- /dev/null
|
||||
+++ b/tests/data/hledger.hledger
|
||||
@@ -0,0 +1,18 @@
|
||||
+# 18 lines 6 code 10 comments 2 blanks
|
||||
+# a comment
|
||||
+; another comment
|
||||
+
|
||||
+; ^ a blank line
|
||||
+comment
|
||||
+account assets ; Declare valid account names and display order.
|
||||
+a block comment
|
||||
+end comment
|
||||
+
|
||||
+account assets:savings ; A subaccount. This one represents a bank account.
|
||||
+account assets:checking ; Another. Note, 2+ spaces after the account name.
|
||||
+account assets:receivable ; Accounting type is inferred from english names,
|
||||
+account passifs ; or declared with a "type" tag, type:L
|
||||
+account expenses ; type:X
|
||||
+ ; A follow-on comment line, indented.
|
||||
+account expenses:rent ; Expense and revenue categories are also accounts.
|
||||
+ ; Subaccounts inherit their parent's type.
|
||||
32
nix/packages/tokei/skel.patch
Normal file
32
nix/packages/tokei/skel.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/languages.json b/languages.json
|
||||
index b2899f1..dfeff47 100644
|
||||
--- a/languages.json
|
||||
+++ b/languages.json
|
||||
@@ -1406,6 +1406,10 @@
|
||||
"quotes": [["\\\"", "\\\""]],
|
||||
"extensions": ["shader", "cginc"]
|
||||
},
|
||||
+ "Skel": {
|
||||
+ "multi_line_comments": [["(*", "*)"]],
|
||||
+ "extensions": ["skel", "sk"]
|
||||
+ },
|
||||
"Slang": {
|
||||
"name": "Slang",
|
||||
"line_comment": ["//"],
|
||||
diff --git a/tests/data/skel.sk b/tests/data/skel.sk
|
||||
new file mode 100644
|
||||
index 0000000..c6e8a68
|
||||
--- /dev/null
|
||||
+++ b/tests/data/skel.sk
|
||||
@@ -0,0 +1,11 @@
|
||||
+(* 11 lines 5 code 5 comments 1 blanks *)
|
||||
+
|
||||
+(* ^ a blank line, a comment *)
|
||||
+(*
|
||||
+a multiline comment
|
||||
+*)
|
||||
+type ident
|
||||
+type term =
|
||||
+| Var ident
|
||||
+| Lam (ident, term)
|
||||
+| App (term, term)
|
||||
30
nix/packages/tokei/why3.patch
Normal file
30
nix/packages/tokei/why3.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/languages.json b/languages.json
|
||||
index dfeff47..0baedb7 100644
|
||||
--- a/languages.json
|
||||
+++ b/languages.json
|
||||
@@ -1742,6 +1742,12 @@
|
||||
"line_comment": ["//"],
|
||||
"extensions": ["wgsl"]
|
||||
},
|
||||
+ "Why3": {
|
||||
+ "name": "Why3",
|
||||
+ "quotes": [["\\\"", "\\\""]],
|
||||
+ "multi_line_comments": [["(*", "*)"]],
|
||||
+ "extensions": ["mlw"]
|
||||
+ },
|
||||
"Wolfram": {
|
||||
"quotes": [["\\\"", "\\\""]],
|
||||
"multi_line_comments": [["(*", "*)"]],
|
||||
diff --git a/tests/data/why3.mlw b/tests/data/why3.mlw
|
||||
new file mode 100644
|
||||
index 0000000..0d07bb2
|
||||
--- /dev/null
|
||||
+++ b/tests/data/why3.mlw
|
||||
@@ -0,0 +1,7 @@
|
||||
+(* 7 lines 3 code 3 comments 1 blanks *)
|
||||
+module Exercice3
|
||||
+ (* ^ ligne vide *)
|
||||
+
|
||||
+ val foo (bar) : baz
|
||||
+ (* commentaire *)
|
||||
+end
|
||||
Loading…
Add table
Add a link
Reference in a new issue