about summary refs log tree commit diff
path: root/utils/builder.nix
diff options
context:
space:
mode:
Diffstat (limited to 'utils/builder.nix')
-rw-r--r--utils/builder.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/builder.nix b/utils/builder.nix
new file mode 100644
index 000000000000..45e783cf0ba8
--- /dev/null
+++ b/utils/builder.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+let
+  inherit (pkgs) writeShellScriptBin;
+in {
+  # Create a derivation that creates an executable shell script named `as` that
+  # calls the program located at `path`, forwarding all of the arguments.
+  wrapNonNixProgram = { path, as }: writeShellScriptBin as ''
+    exec ${path} "$@"
+  '';
+}