Skip to content

Commit

Permalink
make pip work
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed May 20, 2024
1 parent 1c32915 commit c3b239d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/cog.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ let
};
toCogPythonVersion = builtins.replaceStrings ["-alpha" "-beta"] ["a" "b"];
pyEnvWithPip = config.python-env.public.pyEnv.override {
postBuild = "$out/bin/python -m ensurepip";
postBuild = ''
$out/bin/python -m ensurepip
ln -s $out/bin/pip3 $out/bin/pip
'';
};
in {
imports = [
Expand Down Expand Up @@ -102,11 +105,12 @@ in {
bashInteractive
busybox
cacert
] ++ (lib.optional config.cognix.fake_pip fakePip) ++ [
pyEnvWithPip
entirePackage
glibc.out
curl
] ++ (lib.optional config.cognix.fake_pip fakePip) ++ resolvedSystemPackages;

This comment has been minimized.

Copy link
@technillogue

technillogue May 20, 2024

Collaborator

how come?

This comment has been minimized.

Copy link
@yorickvP

yorickvP Jun 17, 2024

Author Member

$PATH is resolved left to right

] ++ resolvedSystemPackages;
config = {
Entrypoint = [ "${pkgs.tini}/bin/tini" "--" ];
Env = lib.mapAttrsToList (name: val: "${name}=${toString val}") config.cognix.environment;
Expand Down

0 comments on commit c3b239d

Please sign in to comment.