add run binary

This commit is contained in:
nora 2024-05-26 17:17:30 +02:00
parent 9397e7f43b
commit 7565b364ed
3 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{ pkgs ? import <nixpkgs> { } }: pkgs.writeShellScriptBin "run" ''
first="$1"
if [ -z "$first" ]; then
echo "error: must provide package name"
exit 1
fi
shift
nix run nixpkgs#"$first" -- "$@"
''