Skip to content

Add git derivation to PATH of uv binary #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,21 @@
let
# due to the nixpkgs that we use in this flake being outdated, uv is also heavily outdated
# we can just use the binary release of uv provided by uv2nix
uvOverlay = final: prev: {
uv = uv2nix.packages.${final.system}.uv-bin;
uvOverlay = final: prev:
let
uv-bin = uv2nix.packages.${final.system}.uv-bin;
in {
# haskell-backend uses kontrol for profiling and uses a nix develop shell with the `--ignore-environment` flag set
# uv has an optional runtime dependency on git, which is not included by default in the uv derivation
uv = final.symlinkJoin {
name = "uv";
paths = [ uv-bin ];
buildInputs = [ uv-bin final.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/uv \
--prefix PATH : ${final.git}/bin
'';
};
};
kontrolOverlay = final: prev:
let
Expand Down