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

haskell-hakyll: remove outdated patch. #69095

Merged
merged 1 commit into from Sep 20, 2019

Conversation

erictapen
Copy link
Member

This is the last issue blocking the hakyll build atm.

See also #68990

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @

@cdepillabout
Copy link
Member

cdepillabout commented Sep 19, 2019

@erictapen Could you remove hakyll from the list of known broken packages?

See this explanation on how to to this:

https://discourse.nixos.org/t/video-tutorial-how-to-fix-broken-haskell-packages-in-nix/3968

I've confirmed that hakyll builds, so once you do this we can get this PR merged in.

@erictapen
Copy link
Member Author

Ah right, forgot about that one. I removed the entry!

Copy link
Member

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

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

@erictapen Thanks for putting this PR together!

Everything looks good to me.

@peti This should be ready to be merged in.

@peti peti merged commit 69120a4 into NixOS:haskell-updates Sep 20, 2019
@mjhoy
Copy link
Contributor

mjhoy commented Sep 26, 2019

i have a somewhat tangential question about this PR, feel free to ignore. if i'm on the nixpkgs-19.09-darwin channel, which doesn't appear to have this commit yet, how might i override my hakyll in my config.nix to adopt the changes here, to fix my hakyll build?

@cdepillabout
Copy link
Member

cdepillabout commented Sep 27, 2019

@mjhoy

Here's a script that you can use with nix-build to apply the fix from this PR and build hakyll. Although this didn't build on my 19.09 system, so you may need to bump the version of hakyll as well:

with (import <nixpkgs> {});

let
  haskellPackagesWithHakyll =
    haskellPackages.override {
      overrides = hself: hsuper: {
        hakyll =
          haskell.lib.markUnbroken
            ( if stdenv.isDarwin
              then
                haskell.lib.dontCheck (haskell.lib.overrideCabal hsuper.hakyll (drv: {
                  testToolDepends = [];
                }))
              else hsuper.hakyll
            );
      };
    };
in

haskellPackagesWithHakyll.hakyll

Although you'll have to adapt this slightly for use in config.nix. You can find out how to do that in the nixpkgs manual (or maybe it was the nix manual?). The haskell section in the nixpkgs manual also describes multiple ways of overriding Haskell packages. You might find that interesting.

@erictapen
Copy link
Member Author

@mjhoy The way I do it is to not use the channel but:

  • clone the git repository nixpkgs-channels
  • checkout the branch nixpkgs-19.09-darwin
  • create your own custom branch, e.g. custom-19.09
  • git cherry-pick the commits you need ontop of it

If you want to update, you can rebase the branch ontop of nixpkgs-19.09-darwin

That way you have one easy way to use arbitrary edits to Nixpkgs, that haven't made it into master or the channels yet.

@mjhoy
Copy link
Contributor

mjhoy commented Sep 27, 2019

@cdepillabout thanks! i did not know about haskell.lib.markUnbroken which gets me part of the way there. i still have trouble because it seems i actually need to remove the appended patch, as i run into this error:

hash 'sha256-F59WHt52LOKGsGoaD3LAIZFEMe9s9WHfGxQgSh9Q8uQ=' has wrong length for hash type 'sha256'

@erictapen cool, for whatever reason i couldn't find this commit, maybe commits from haskell-updates get squashed periodically or something? but applying the patch from this PR, and also marking unbroken with hakyll = haskell.lib.markUnbroken super.hakyll in my haskellOverrides worked (otherwise it still was marked as broken and refused to evaluate).

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