Skip to content
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

stt latest version 1.4.0 fails to install #528

Open
Ferdev opened this issue Dec 6, 2022 · 1 comment
Open

stt latest version 1.4.0 fails to install #528

Ferdev opened this issue Dec 6, 2022 · 1 comment

Comments

@Ferdev
Copy link

Ferdev commented Dec 6, 2022

Nix newbie here. While trying to run a shell using this flake:

{
  inputs = {
    mach-nix.url = "mach-nix/3.5.0";
  };

  outputs = {self, nixpkgs, mach-nix }@inp:
    let
      l = nixpkgs.lib // builtins;
      supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
      forAllSystems = f: l.genAttrs supportedSystems
        (system: f system (import nixpkgs {inherit system;}));
    in
    {
      # enter this python environment by executing `nix shell .`
      defaultPackage = forAllSystems (system: pkgs: mach-nix.lib."${system}".mkPython {
        requirements = ''
          stt == 1.4.0
        '';
      });
    };
}

The installation fails with the following message:

error: builder for '/nix/store/c66r33dww5g0qiskbrgigrxdb2mdhn4h-mach_nix_file.drv' failed with exit code 1;
       last 10 log lines:
       > Mach-nix version: master
       > Python: 3.9.9
       > Cause: Requirements conflict: stt (<SpecifierSet('==1.4.0')>,)
       > The requirements which caused the error:
       >   stt (<SpecifierSet('==1.4.0')>,)
       >
       > The given requirements might contain package versions which are not yet part of the dependency DB
       > currently used. The DB can be updated by specifying 'pypiDataRev' when importing mach-nix.
       > For examples see: https://github.com/DavHau/mach-nix/blob/master/examples.md
       >
       For full logs, run 'nix log /nix/store/c66r33dww5g0qiskbrgigrxdb2mdhn4h-mach_nix_file.drv'.
(use '--show-trace' to show detailed location information)

I've cheked, and the latest pypi-deps-db includes stt@1.4.0. If I don't specify a version (== 1.4.0), it does install, but not the latest version. It installs 0.10.0-alpha.10 instead.

What am I doing wrong?

@TyberiusPrime
Copy link
Collaborator

You're not updating to the newest pypi-debs-db.
mach-nix defaults to a version of pypi-debs-db that was current when it was released.

You want something like this in your inputs:

inputs = {
    mach-nix = {
      url = "github:DavHau/mach-nix/3.5.0";
      inputs.pypi-deps-db.follows = "pypi-deps-db";
    };
    pypi-deps-db = {
      url = "github:DavHau/pypi-deps-db?rev=ba35683c35218acb5258b69a9916994979dc73a9";
      inputs.mach-nix.follows = "mach-nix";
    };

(or just define pyp-debs-dp without a rev, and rely on nix flake locking instead. The important part is to a) declare the input and b) have mach-nix 'follow' it. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants