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
yabar: minor derivation improvements #29184
Conversation
9d56f44
to
ac253f7
Compare
|
||
stdenv.mkDerivation rec { | ||
name = "yabar-${version}"; | ||
version = "0.4.0"; | ||
version = "2017-09-09"; |
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.
I'd suggest introducing a package yabar-unstable
that tracks the git version and leave the existing yabar
package at the released version.
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.
(at least if upstream plan to make future stable releases)
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.
There is an open discussion about it (geommer/yabar#136)
As there's no activity, I think it's indeed the better approach to add an unstable.nix
.
${lib.optionalString (configFile != null) | ||
'' | ||
wrapProgram "$out/bin/yabar" \ | ||
--add-flags "-c ${configFile}" |
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's a bit unusual to make command flags configurable in the package derivation, looking at the yabar man page it seems to read ~/.config/yabar/yabar.conf
by default so the -c
flag is not mandatory.
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.
why though? You might want to configure the configuration file as a derivation (I do this ATM) and then it's placed in ~/.nix-profile
for instance.
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.
Fair enough, I don't have any strong feelings about it. The main downside I can think of is that it makes it tricky to use the binary cache when having a non-null configFile
value.
da3981e
to
f3e1429
Compare
Looking good now :-) The final thing would be to amend the "yabar: update to 2017-09-09" commit to something like "yabar: cleanup package" and remove the |
you're right, I have to clean up the history a bit :p |
f3e1429
to
605a445
Compare
The latest changes from `yabar` require several changes in the derivation to build the package successfully.
605a445
to
6bc1323
Compare
platforms = platforms.linux; | ||
}; | ||
} | ||
rev = "d3934344ba27f5bdf122bf74daacee6d49284dab"; |
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.
Are you sure you want the same rev
for 0.4.0 and unstable?
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.
I think you want rev = version;
.
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.
Sorry, just noticed you had changed it. I still think it is a good idea to use rev = version;
to avoid future mistakes :-)
Tried building and get some error:
|
@Ma27 I tried adding
|
postPatch = '' | ||
substituteInPlace ./Makefile \ | ||
--replace "\$(shell git describe)" "${version}" \ | ||
--replace "a2x" "${asciidoc}/bin/a2x --no-xmllint" |
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.
Just as an aside, since asciidoc
is in buildInputs
its bin directory will be in PATH. So it would be sufficient to have
--replace "a2x" "a2x --no-xmllint"
here. No need to change unless you feel like it. Just thought I'd highlight it.
6bc1323
to
3c2ad38
Compare
@rycee does it build now? |
3c2ad38
to
aabef69
Compare
Yes, now it builds successfully! 👍 |
aabef69
to
03b27dd
Compare
03b27dd
to
1782510
Compare
All ready for merge? |
👍 from my side :-) |
Thanks for all your work on fixing this up 😃 |
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)