NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.64k stars 1.51k forks source link

Nix Shell Issue: Poetry 'Dulwich' Dependency #10631

Closed chandler-scott closed 6 months ago

chandler-scott commented 6 months ago

Describe the bug I am unable to run a nix shell with python3.* and poetry. When I try, I receive an error about a dulwich dependency.

dulwich<0.22.0,>=0.21.2 not satisfied by version 0.22.1

Steps To Reproduce In a shell.nix file:

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = [
    pkgs.python311
    pkgs.poetry
  ];

  shellHook = ''
    echo "Environment ready."
  '';
}

Or via command line: nix-shell -p python3 poetry

Expected behavior Should open a nix shell with python3.* and poetry packages.

chandler-scott commented 6 months ago

This is a new Nix installation from the official download website.

I installed Nix via: sh <(curl -L https://nixos.org/nix/install) --daemon

imadnyc commented 6 months ago

This seems like a Nixpkgs issue. I can't replicate this.

chandler-scott commented 6 months ago

I changed my shell.nix to the tutorial's shell.nix and was able to open a shell successfully.

let
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
  pkgs = import nixpkgs { config = {}; overlays = []; };
in

pkgs.mkShell {
  buildInputs = [
    pkgs.python311
    pkgs.poetry
  ];

  shellHook = ''
    echo "Environment ready for Embedded Development."
  '';
}
geekodour commented 6 months ago

Faced this today with unstable.^