summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-11-29 22:17:01 +0100
committertv <tv@krebsco.de>2022-11-29 22:17:01 +0100
commitf65c77bdcc58be2081a0ffbda849289c5191b5e8 (patch)
tree9f5fee5b934e0f3ca9c7dad4a4218b27a65d5c4d /pkgs
parentc528cf970e292790b414b4c1c8c8e9d7e73b2a71 (diff)
pkgs: add writeDeno{,Bin}
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index d6127a1..8c62f1b 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -235,6 +235,20 @@ pkgs: oldpkgs: {
assert types.filename.check name;
pkgs.writeDash "/bin/${name}";
+ writeDeno = name: text: let
+ script = builtins.toFile "${name}.deno" text;
+ in
+ pkgs.writeDash name ''
+ exec ${pkgs.deno}/bin/deno run \
+ --allow-all \
+ --quiet \
+ ${script} "$@"
+ '';
+
+ writeDenoBin = name:
+ assert types.filename.check name;
+ pkgs.writeDeno "/bin/${name}";
+
writeEximConfig = name: text: pkgs.runCommand name {
inherit text;
passAsFile = [ "text" ];