summaryrefslogtreecommitdiff
path: root/nix/package
diff options
context:
space:
mode:
authorยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2025-12-23 06:22:23 +0000
committerยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2025-12-23 06:22:23 +0000
commit950daf7fc384606605cafca1617bf12676485bed (patch)
tree42ef41294793b2e90ebe7c97c179280016e51380 /nix/package
parent2ffd302bd0f7268c5d45691170b4f87339d1b2e4 (diff)
downloadnixtaml-950daf7fc384606605cafca1617bf12676485bed.tar
nixtaml-950daf7fc384606605cafca1617bf12676485bed.tar.gz
nixtaml-950daf7fc384606605cafca1617bf12676485bed.tar.bz2
nixtaml-950daf7fc384606605cafca1617bf12676485bed.tar.lz
nixtaml-950daf7fc384606605cafca1617bf12676485bed.tar.xz
nixtaml-950daf7fc384606605cafca1617bf12676485bed.tar.zst
nixtaml-950daf7fc384606605cafca1617bf12676485bed.zip
mark-darcs-weak-hash: move to Nix
Diffstat (limited to 'nix/package')
-rw-r--r--nix/package/dev-shell.nix2
-rw-r--r--nix/package/mark-darcs-weak-hash.nix26
2 files changed, 28 insertions, 0 deletions
diff --git a/nix/package/dev-shell.nix b/nix/package/dev-shell.nix
index 77a9ac1..3cfec5c 100644
--- a/nix/package/dev-shell.nix
+++ b/nix/package/dev-shell.nix
@@ -7,6 +7,7 @@
kdlfmt,
topiary,
ocamlPackages,
+ mark-darcs-weak-hash,
nixtamal,
nixfmt-3-space,
ocamlformat-rpc-bin,
@@ -19,6 +20,7 @@ mkShell {
];
packages = [
kdlfmt
+ mark-darcs-weak-hash
nixfmt-3-space
topiary
diff --git a/nix/package/mark-darcs-weak-hash.nix b/nix/package/mark-darcs-weak-hash.nix
new file mode 100644
index 0000000..7f644e1
--- /dev/null
+++ b/nix/package/mark-darcs-weak-hash.nix
@@ -0,0 +1,26 @@
+#โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
+# SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/> โ”‚
+# SPDX-License-Identifier: LGPL-2.1-or-later โ”‚
+#โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
+{
+ lib,
+ writeDashBinScript,
+ darcs,
+ gawk,
+}:
+
+let
+ path = lib.makeBinPath [
+ darcs
+ gawk
+ ];
+in
+writeDashBinScript {
+ name = "mark-darcs-weak-hash";
+ text = /* sh */ ''
+ export PATH="${path}:$PATH"
+
+ darcs show repo \
+ | awk '/^[[:space:]]*Weak Hash:/ { sub(/^[[:space:]]*Weak Hash:[[:space:]]*/, "", $0); printf $0 }' > "$PWD/_darcs/weak_hash"
+ '';
+}