add run binary

This commit is contained in:
nora 2024-05-26 17:17:30 +02:00
parent 3d54963a23
commit fdd4072580
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" -- "$@"
''