Override package version with overlay

I’m trying to override mopidy-gmusic version to master branch.
So I’ve built an overlay

self: super:
  mopidy-gmusic = super.mopidy-gmusic.overrideAttrs (old: rec {
    version = "master";
    pname = "mopidy-gmusic";
    src = super.fetchurl {
      url = "https://github.com/mopidy/mopidy-gmusic/archive/${version}.tar.gz";
      sha256 = "94e81d0e30e89d99266ba7af06e1d73fdb94ec433d7ff6264ac707573f347bc6";

and included it in my configuration.nix as

  nixpkgs.overlays = [
    (import ./gmusic.nix)

But, while switching to new configuration got error

Processing ./Mopidy_GMusic-4.0.0-py2.py3-none-any.whl
Requirement already satisfied: Pykka>=1.1 in /nix/store/8i2lza9vj07wh73inkaz31m4nqw83cqh-python2.7-pykka-1.2.0/lib/python2.7/site-packages (from Mopidy-GMusic==4.0.0) (1.2.0)
Requirement already satisfied: Mopidy>=1.0 in /nix/store/xcsh1imhrhnfdzswdbskakgrl7jjbak6-mopidy-2.2.3/lib/python2.7/site-packages (from Mopidy-GMusic==4.0.0) (2.2.3)
Collecting gmusicapi>=12.1 (from Mopidy-GMusic==4.0.0)
  ERROR: Could not find a version that satisfies the requirement gmusicapi>=12.1 (from Mopidy-GMusic==4.0.0) (from versions: none)
ERROR: No matching distribution found for gmusicapi>=12.1 (from Mopidy-GMusic==4.0.0)
builder for '/nix/store/2csd92ln9g54ccfwc27s260rsmfqh6iz-mopidy-gmusic-3.0.0.drv' failed with exit code 1

On pypi latest version of gmusicapi is 12.1.1

Could someone explain, what I’m doing wrong?

1 Like

NixOS 19.09 has gmusicapi 12.0.0.

the “master” branch you’re checking out from has bumped one of it’s dependencies past what is listed on nixpkgs. You will have to add that dependency to your overlay with the bumped version for this to work.

This is more of an issue with the python ecosystem than nix :frowning: