mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 11:45:06 +01:00
add run binary
This commit is contained in:
parent
9397e7f43b
commit
7565b364ed
3 changed files with 11 additions and 0 deletions
9
custom-pkgs/run/default.nix
Normal file
9
custom-pkgs/run/default.nix
Normal 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" -- "$@"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue