diff options
| author | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-23 06:22:23 +0000 |
|---|---|---|
| committer | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-23 06:22:23 +0000 |
| commit | 950daf7fc384606605cafca1617bf12676485bed (patch) | |
| tree | 42ef41294793b2e90ebe7c97c179280016e51380 /nix/package | |
| parent | 2ffd302bd0f7268c5d45691170b4f87339d1b2e4 (diff) | |
| download | nixtaml-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.nix | 2 | ||||
| -rw-r--r-- | nix/package/mark-darcs-weak-hash.nix | 26 |
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" + ''; +} |
