cachix / nixpkgs-python

All Python versions, kept up-to-date on hourly basis using Nix.
Apache License 2.0
176 stars 11 forks source link

Error when specifying python.version #16

Closed kyerpotts closed 8 months ago

kyerpotts commented 1 year ago

When attempting to specify a python version, I receive the following error: error: … while updating the lock file of flake 'git+file:///home/squidmilk/Projects/VisualModule?ref=refs%2fheads%2fdev&rev=e2808402805fef9a1b890029794d72593d57eb05'

   … while updating the flake input 'nixpkgs-python'

   … while updating the flake input 'nixpkgs-python/flake-utils'

   error: cannot find flake 'flake:flake-utils' in the flake registrie
domenkozar commented 1 year ago

Could you provide a full example to reproduce?

kyerpotts commented 1 year ago

I'm using devenv to create a python environment and trying to specify the python version. To do so I have to specify an input that points to nixpkgs-python.url = github:cachix/nixpkgs-python. I then try to update devenv with the new inputs and nixpkgs-python gives an error stating that it can't find flake-utils

domenkozar commented 1 year ago

Can you please give the full example of files here, so that I can spot the error?

kyerpotts commented 1 year ago

devenv.yaml:

inputs:
  nixpkgs:
    url: github:NixOS/nixpkgs/nixpkgs-unstable
  nixpkgs-python:
    url: github:cachix/nixpkgs-python

devenv.nix

{inputs, pkgs, ...}:
{
  packages = [pkgs.git ];
  languages.python.enable = true;
  languages.python.version = "3.9.2";
  languages.python.venv.enable = true;

  enterShell = ''
    git --version
  '';
}
domenkozar commented 1 year ago

I have checked and it works for me, so there must be something strange going on.