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

@ -1,6 +1,7 @@
pkgs: { pkgs: {
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs; cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
monaspace = import ./monaspace.nix pkgs; monaspace = import ./monaspace.nix pkgs;
run = import ./run { inherit pkgs; };
x = import ./x { inherit pkgs; }; x = import ./x { inherit pkgs; };
} }

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" -- "$@"
''

View file

@ -30,6 +30,7 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
audacity audacity
customPkgs.cargo-bisect-rustc customPkgs.cargo-bisect-rustc
customPkgs.run
discord discord
jetbrains.idea-ultimate jetbrains.idea-ultimate
obs-studio obs-studio