about summary refs log tree commit diff
path: root/users/wpcarro/utils/builder.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/utils/builder.nix')
-rw-r--r--users/wpcarro/utils/builder.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/users/wpcarro/utils/builder.nix b/users/wpcarro/utils/builder.nix
new file mode 100644
index 000000000000..45e783cf0ba8
--- /dev/null
+++ b/users/wpcarro/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} "$@"
+  '';
+}