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.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/users/wpcarro/utils/builder.nix b/users/wpcarro/utils/builder.nix
new file mode 100644
index 0000000000..2bc061d366
--- /dev/null
+++ b/users/wpcarro/utils/builder.nix
@@ -0,0 +1,12 @@
+{ 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} "$@"
+  '';
+}