21.05 and overriding a Haskell package dependency

Hi there :wave:

I’m trying to upgrade to 21.05, but apparently greenclip package is marked broken. There is a closed PR request for it (which I don’t understand how/when it’ll be solved from the comments). So I’ve opened an issue to at least document the problem.

Since there is no ETA and I don’t want to lose my clipboard, I’d like to fix this on my local system. Solution seems to be adding the missing dependency around here. But I’d like to properly override this on my configuration, instead of using a local nixpkgs clone. Yet I couldn’t find any override example for addExtraLibrary function (plus I am a potato about haskell ecosystem).

Any recommendations? Thanks :eyes:

1 Like

Hey @gurkan!

The Problem here is that the fix happened on nixpkgs master after the branch off of 21.05.

The fix is in this commit: hackage-packages.nix: Regenerate based on current config · NixOS/nixpkgs@99e97c8 · GitHub
and it needs to be backported to the release-21.05.

To manually fix this locally on your system take the point where you are writing pkgs.haskellPackages.greenclip and replace it with

(with pkgs.haskell.lib; markUnbroken (addExtraLibrary pkgs.haskellPackages.greenclip pkgs.xlibs.libXScrnSaver))

I hope this helps!

1 Like

Yep, thank you @maralorn :tada:

That fixed it. See, as a pythonic devops person, I wouldn’t find out that markUnbroken function would return the package in this context. This is why nix feels like an “impossible to master” language for me. Sadly this also blocks me to modify my system.

Anyway, enough ranting. There are more broken packages to dive into, thanks again!

I’ve created a backport PR which hopefully will fix your issues on 21.05. Feel free to review and test as well!

1 Like