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

haskellPackages.taffybar: Fix compilation with ghc882 #81436

Merged

Conversation

colonelpanic8
Copy link
Contributor

@cdepillabout I saw your post here: https://discourse.nixos.org/t/call-to-action-for-updating-haskell-packages-after-bump-to-lts-15/6071

and was inspired to try to get taffybar building, but in this case, I actually need to regenerate hackage-packages.nix to actually test if everything is working because some dependencies have changed around, and I need new versions of certain packages.

I watched the video that you linked in there from @peti but I still don't understand what the appropriate way to actually do this is. Can you help?

@colonelpanic8
Copy link
Contributor Author

Ah I found: https://www.youtube.com/watch?v=qX0mgtSm360

It might be nice if this were somewhat easier to find.

@cdepillabout
Copy link
Member

@IvanMalison Please feel free to continue to post in this thread if you have trouble fixing up any of these dependencies.

@colonelpanic8
Copy link
Contributor Author

@cdepillabout after watching that video, I feel like the process seems pretty heavyweight especially given what I am used to with nix stuff. Is all of that really necessary? is there really no simpler way to regenerate hackage-packages.nix?

@cdepillabout
Copy link
Member

@IvanMalison In general, I don't think there is an easier way.

Is there anything in particular you want to regenerate the hackage-packages.nix for? In general, I find that I am able to fix stuff without regenerating the hackage-packages.nix file, by adding overrides, etc where appropriate.

@colonelpanic8
Copy link
Contributor Author

Well yes I mean I've already done that manually... the thing is I want to make sure that the changes in this patch actually work and generate the right stuff.

@colonelpanic8
Copy link
Contributor Author

I'm just want to make sure that the packages are actually unbroken.

@cdepillabout
Copy link
Member

@IvanMalison Ah, I see.

In general, as long as you remove the packages from the broken-packages list, next time hackage-packages.nix is regenerated, they will be regenerated with the broken attribute set to false.

You don't necessarily have to worry about this when you send a PR. (Although I agree it would be nice to be able to check it on your end.)

@colonelpanic8
Copy link
Contributor Author

So basically whether or not they are actually unbroken is really only checked when @peti runs the Regen?

I just have a feeling that because I'm unbreaking 4 different packages and that taffybar depends on them (transitively), something is likely to go wrong in that chain.

@cdepillabout
Copy link
Member

So basically whether or not they are actually unbroken is really only checked when @peti runs the Regen?

Ah, so what most people do in this situation is to try to rebuild them on your machine even though they are marked broken.

Here's how I would go about this:

# clone nixpkgs
$ git clone ...
# check out haskell-updates branch
$ git checkout haskell-updates
# try building taffybar, ignoring the broken packages setting
$ nix-build -A haskellPackages.taffybar --arg config '{allowBroken = true;}'
these derivations will be built:
  /nix/store/c42wqcwsrwdqrqlax5xrjl5yx90h07zw-status-notifier-item-0.3.0.5.tar.gz.drv
  /nix/store/5zpfbrbinjp3ddxia9camp7ynm3875z1-status-notifier-item-0.3.0.5.drv
  /nix/store/lv1dz2q6l6qsdgyycb6c5ka2y3wmv24j-taffybar-3.2.2.tar.gz.drv
  /nix/store/yv37jij5ls89qrwk64mdmnbp9y1ifg10-xdg-desktop-entry-0.1.1.1.tar.gz.drv
  /nix/store/w7hia7ibak058g12m3x9maz48d0si2yp-xdg-desktop-entry-0.1.1.1.drv
  /nix/store/ww4hwv55iaqhlr72bj815w7qa6mx9xj7-gtk-sni-tray-0.1.6.0.drv
  /nix/store/c97lri56p0rx9iyf07nj7rl9n0w0vqf8-taffybar-3.2.2.drv
these paths will be fetched (14.01 MiB download, 309.97 MiB unpacked):
  /nix/store/0ybxyf7zh7s6h71wzaj9vch3rffq59q6-gi-dbusmenugtk3-0.4.8
  /nix/store/12sk3y0j4857sss4w0kdalrh43nj8c5v-MissingH-1.4.2.0
  /nix/store/3bl0ixmi1xd6cfdbrsa5s9ajhwvrnd0w-multimap-1.2.1
  /nix/store/3rkglfk5aa3114f42fdg7rn73xbjamx2-xmonad-0.15
...

You can see from this output that Nix is going to try to build status-notifier-item, taffybar, xdg-desktop-entry, and gtk-sni-tray. Nix can get all the other packages from the cache. This normally happens when all other packages are able to be built successfully, but those few packages are marked broken.

First I would try building each of these (or at least the lowest dependencies) and seeing if it succeeds.

First, I'll randomly pick status-notifier-item:

$ nix-build -A haskellPackages.status-notifier-item --arg config '{allowBroken = true;}'
...
/nix/store/v8adbn3dnmv78pwvvch59mkmlh4yqc5h-status-notifier-item-0.3.0.5

This builds successfully, so you can mark it as unbroken (as I think you've currently done in this PR) and move on.

Next lets try xdg-desktop-entry:

$ nix-build -A haskellPackages.xdg-desktop-entry --arg config '{allowBroken = true;}'
...
/nix/store/sz96745dg79d2r6x7qzjzyjv2yb8kia1-xdg-desktop-entry-0.1.1.1

This currently builds, so you can mark it as unbroken and move on.

Next lets try gtk-sni-tray:

$ nix-build -A haskellPackages.gtk-sni-tray --arg config '{allowBroken = true;}'
...
/nix/store/8vly1zawn8ld5h5flhmm0r97dcy5drlk-gtk-sni-tray-0.1.6.0

Looks likes it builds! Mark it as unbroken and move on!

Let's try taffybar:

$ nix-build -A haskellPackages.taffybar --arg config '{allowBroken = true;}'
...
/nix/store/cff4y9rqpmm37raibqvh34wckkpdgqa6-taffybar-3.2.2

Okay, looks like everything built. We didn't even need any overrides!

@cdepillabout
Copy link
Member

Since you've already marked these four packages as unbroken, this PR is complete. I'll merge it in!

hackage-packages.nix gets regenerated about once a day, so if you watch the haskell-updates branch, you should see it be regenerated soon, and then you can use taffybar like normal.

@cdepillabout cdepillabout merged commit c767024 into NixOS:haskell-updates Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants