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: Add documentationTarball to lib #103066
haskell: Add documentationTarball to lib #103066
Conversation
Nice! Would you be willing to add a test for this? I'm imaging something similar to the |
*/ | ||
documentationTarball = pkg: | ||
pkgs.lib.overrideDerivation pkg (drv: { | ||
name = "${drv.pname}-${drv.version}-docs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty small nitpick, but couldn't this be
name = "${drv.pname}-${drv.version}-docs"; | |
name = "${drv.name}-docs"; |
And below as well.
f364819
to
54f07f2
Compare
I've added a test which checks for the presence of the haddocks themselves and the hyperlinked source. |
|
||
in pkgs.runCommand "test haskell.lib.documentationTarball" { } '' | ||
tar xvzf "${docs}/${drv.name}-docs.tar.gz" | ||
files=$(find . -type f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this isn't being used anywhere?
files=$(find . -type f) |
Other than this, this PR looks good!
54f07f2
to
02a5994
Compare
oops, fixed
…On Sat, Nov 7, 2020 at 8:55 PM Dennis Gosnell ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkgs/test/haskell-documentationTarball/default.nix
<#103066 (comment)>:
> @@ -0,0 +1,18 @@
+{ pkgs, haskellPackages }:
+
+let
+ drv = haskellPackages.vector;
+ docs = pkgs.haskell.lib.documentationTarball drv;
+
+in pkgs.runCommand "test haskell.lib.documentationTarball" { } ''
+ tar xvzf "${docs}/${drv.name}-docs.tar.gz"
+ files=$(find . -type f)
It looks like this isn't being used anywhere?
⬇️ Suggested change
- files=$(find . -type f)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#103066 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXHWR6A35QOGTGWGFX3SOU7SPANCNFSM4TNRUGIA>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for working on this!
Motivation for this change
It's nice to be able to build this kind of thing with nix.
I've been using something similar for a few weeks without issue.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)