feat(devenv): add uv wrapper shortcuts
This commit is contained in:
1 parent
f0ec70c9fd
commit
ae3a42cda6
1 file changed
+9
@@ -10,11 +10,20 @@
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
# Define shortcuts using writeShellScriptBin
|
||||
# Use "$@" at the end so the script accepts extra flags/arguments
|
||||
uv-run = pkgs.writeShellScriptBin "uvr" "exec uv run \"$@\"";
|
||||
uv-sync = pkgs.writeShellScriptBin "uvs" "exec uv sync \"$@\"";
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
uv
|
||||
ruff
|
||||
|
||||
# Inject shortcuts directly into the packages array
|
||||
uv-run
|
||||
uv-sync
|
||||
];
|
||||
|
||||
# Expose libraries to the nix-ld environment
|
||||
|
||||
Reference in new issue
Block a user