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

gitit: init at 0.13.0.0 #89795

Merged

Conversation

Profpatsch
Copy link
Member

Motivation for this change

The new gitit upstream release has unbroken the tool.

The second commit makes it into a top-level semi-static binary with a reasonable default runtime closure. 140 MB oO

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

It’s finally got a new release.
@Profpatsch Profpatsch requested a review from peti June 8, 2020 11:15
@Profpatsch Profpatsch mentioned this pull request Jun 8, 2020
This was broken in `haskellPackages` for a long time, but it’s back!

Time to give it a place in the toplevel and a prope) treatment:

* Semi-static binary
* Remove all references to `Paths_` modules of dependencies
* gitit tries very hard to have a runtime dependency on GHC, disable
  that by default.

Also added myself as a maintainer, let’s try to keep this working from
now on.

Fixes NixOS#32377
@Profpatsch Profpatsch force-pushed the haskellPackages-mark-gitit-unbroken branch from e5db68c to 943c220 Compare June 8, 2020 11:16
@Profpatsch
Copy link
Member Author

cc @P-E-Meunier

Comment on lines +1408 to +1409
# gitit is unbroken in the latest release
gitit = markUnbroken super.gitit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you submit this PR to the haskell-updates branch, then you shouldn't need this.

As soon as the daily update CI thing runs, gitit will be unmarked broken.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the workings of that written down somewhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Profpatsch Unfortunately, not as far as I know.

I wrote about it a little in this post:

https://discourse.nixos.org/t/haskellpackages-stm-containers-fails-to-build/5416/4

Also, @maralorn recently created a blog post that included a short section explaining how this works:

https://mpickering.github.io/ide/posts/2020-06-05-ghcide-and-nixpkgs.html


Oh, and I should add that if all you do is use markUnbroken, because of how the Haskell stuff works, Hydra won't build the derivation for you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear I didn't mention the fact that hackage2nix generates the broken flags explicitly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still none the wiser. Is there a step-by-step description of what I have to change where and commit to which branch in what order?

I will merge this one here for now, but am open to doing it the “correct” way if somebody points me to clear documentation that is not spread over multiple Youtube videos and blogposts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Profpatsch I completely understand your frustration. But for this narrow use case it's actually really simple:

  1. Confirm that package build succeeds, when broken flag is overriden.
  2. Make a PR against the haskell-updates branch, where you remove the package from the array of broken packages in configuration-hackage2nix.yaml.
  3. After merge wait for the daily hackage-packages.nix update, which removes the broken flag from the package and removes the flag which disables builds on hydra.
  4. Every friday haskell-updates get's merged into master.

Bonus: You can do step 3. on your own in your merge request, but yeah, I think the documentation for that is a youtube video right now.

We really need to make sure all of this is easily discoverable documented.

@Profpatsch
Copy link
Member Author

@GrahamcOfBorg build gitit

@Profpatsch Profpatsch merged commit 91340ae into NixOS:master Jun 12, 2020
@maralorn
Copy link
Member

It remains to note that after this merge gitit will not be build by hydra.

@Profpatsch
Copy link
Member Author

Why wouldn’t it?

@maralorn
Copy link
Member

Because haskellPackages.gitit has the flag hydraPlatforms = stdenv.lib.platforms.none; set in it's definition in hackage-packages.nix.

@peti
Copy link
Member

peti commented Jun 12, 2020

I just tried compiling gitit and it does not build:

onfiguring gitit-0.13.0.0...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1022:20 in Cabal-3.0.1.0:Distribution.Simple.Configure                   
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:475:12 in Cabal-3.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.0.1.0:Distribution.Simple                                   
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.0.1.0:Distribution.Simple.UserHooks                  
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.0.1.0:Distribution.Simple                             
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.0.1.0:Distribution.Simple                           
  defaultMain, called at Setup.lhs:3:10 in main:Main
Setup: Encountered missing or private dependencies:
hoauth2 >=1.3.0 && <1.12

builder for '/nix/store/v1ncl30rcavlhcb1qwdczj5f469mbzw1-gitit-0.13.0.0.drv' failed with exit code 1                               
~~~

peti added a commit that referenced this pull request Jun 12, 2020
@peti
Copy link
Member

peti commented Jun 13, 2020

I should mention that this error occurred on haskell-updates, not on master. We'll merge haskell-updates to master soon, though.

peti added a commit that referenced this pull request Jun 19, 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

4 participants