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

ats-format: Unbreak by disabling manpage generation #82226

Merged
merged 1 commit into from Mar 10, 2020

Conversation

poscat0x04
Copy link
Contributor

Motivation for this change
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.

@@ -0,0 +1,21 @@
diff --git a/Setup.hs b/Setup.hs
Copy link
Member

Choose a reason for hiding this comment

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

In general, we try to not carry around patches in nixpkgs unless absolutely necessary.

Would it be possible to instead get this fixed upstream? (Possibly by adding a flag to disable manpage creation?)

Or, maybe you could just delete the Setup.hs file at the apropriate location, so the default one is used.

Also, what error are you getting when Setup configure is running? Maybe you just need to create a man directory for it to use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It tries to write manpages and shell profiles to $HOME, which doesn't exist. I could set $HOME to /tmp but I think it's too hacky.
I think I'll add a cabal flag and submit a PR to the upstream then.

Copy link
Member

Choose a reason for hiding this comment

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

@poscat0x04 Does it make sense to just set $HOME to $out? I could imagine that some users would actually want the man pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, it seems that the cabal file is read after Setup.hs is being compiled so the CPP options are being ignored. Is it possible to let nix pass additional arguments (-optP) to runghc?

@poscat0x04
Copy link
Contributor Author

Should build now. No patches needed

@cdepillabout
Copy link
Member

Looks good to me. I've confirmed that it builds.

Thanks!

@cdepillabout cdepillabout merged commit 4815e00 into NixOS:haskell-updates Mar 10, 2020
@poscat0x04 poscat0x04 deleted the fix-ats-format branch June 2, 2020 07:11
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