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
|
|
@ -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; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
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" -- "$@"
|
||||||
|
''
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue