Error building python package: No matching distribution found/could not find a version that satisfies the requirement six

I’m trying to build a package that requires sqlalchemy-json (GitHub - edelooff/sqlalchemy-json: Full-featured JSON type with mutation tracking for SQLAlchemy)

however its giving me the following error:

ERROR: Could not find a version that satisfies the requirement six (from sqlalchemy-json==0.4.0) (from versions: none)
ERROR: No matching distribution found for six (from sqlalchemy-json==0.4.0)

I dont understand the error, I’ve removed all the dependency constraints, and have six in the propagated build deps too.

This is all being done in an overlay.

the whole .nix file is here:

{ stdenv, python3Packages, pkgs, fetchgit }:
let
  sqlalchemy-json = python3Packages.buildPythonPackage rec {
    pname = "sqlalchemy-json";
    version = "0.4.0";
    src = python3Packages.fetchPypi {
      inherit pname version;
      sha256 = "09zahz04gyr5s86v6gpwx3qyk42rrg2vx63w2g61fjkja2n2rryq";
    };

    propagetedBuildInputs = with python3Packages; [
      six
      sqlalchemy
    ];

    prePatch = ''
      substituteInPlace ./setup.py --replace 'sqlalchemy>=0.7' 'sqlalchemy'
    '';

    meta = with stdenv.lib; {
      homepage = "https://github.com/edelooff/sqlalchemy-json";
      description = "JSON type with nested change tracking for SQLAlchemy";
      license = licenses.bsd2;
    };
  };

  betanin = python3Packages.buildPythonApplication rec {
    pname = "betanin";
    version = "0.3.25";
    src = fetchgit {
      url = "https://github.com/sentriz/betanin";
      rev = "v0.3.25";
      sha256 = "075abmn1745ad5da0rj7d7as7fvck23danajhyxjfs42lnwsjkxy";
    };

    propagatedBuildInputs = with python3Packages;  [
      alembic
      apprise
      loguru
      six
      sqlalchemy-json
    ];

    patches = [ ./constraints.patch ];
    meta = with stdenv.lib; {
      homepage = "https://github.com/sentriz/betanin";
      description = "beets based mitm for your torrent client and music player";
      license = licenses.gpl3;
    };
  };

in
betanin

propagetedBuildInputspropagatedBuildInputs

2 Likes

Wow, im a moron, i’ve been trying to figure this out for like… an embarassing number of hours.

Thanks so much!

1 Like

Hehe. It happens! :smiley: