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
ebook2cw: init at 0.8.2 #31416
ebook2cw: init at 0.8.2 #31416
Conversation
description = "Convert ebooks to Morse MP3s/OGGs"; | ||
homepage = http://fkurz.net/ham/ebook2cw.html; | ||
license = licenses.gpl2; | ||
platforms = platforms.linux; |
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 should build on other platforms as well, but I have no way to test it.
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.
Since upstream explicitly supports other platforms, I'd bump it to platforms.all
.
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 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.
Builds and seems to work! However, patchPhase
is not extendable and can be improved.
|
||
buildInputs = [ lame libvorbis ]; | ||
|
||
patchPhase = "patch -p0 < ${./configfile.patch}"; |
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.
Append a/
and b/
to the first two lines of the patch:
--- a/ebook2cw.c 2017-11-08 19:52:58.298131348 -0700
+++ b/ebook2cw.c 2017-11-08 19:53:02.588231067 -0700
@@ -136,7 +136,7 @@
char isomap[256][4]; /* by these strings */
char utf8map[256][8];
- char configfile[1025];
+ char configfile[2048];
char id3_author[80],
id3_title[80],
Then you can just use patches
list, that would make it easier for other people to apply their own patches:
patches = [ ./configfile.patch ];
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.
👍
}; | ||
|
||
# TODO: Use SVN once fetchsvn stops stripping the trailing slash, | ||
# otherwise we get a build failure due to a redirect cycle. |
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.
Is there a GitHub issue with this bug? I can't find one.
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 will add one.
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.
Created #31441
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 like it works if we change http://
to svn://
. Updated to use fetchsvn
.
char utf8map[256][8]; | ||
|
||
- char configfile[1025]; | ||
+ char configfile[2048]; |
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've asked upstream to cut a new version with this patch.
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.
Upstream says it's fixed in trunk, but that a new version won't be cut for several weeks.
Would it be better to switch from the release version (0.8.2) to a SVN revision number and drop the patch, or leave as-is and wait for a new release?
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.
Never mind -- we can't switch to an SVN revision number until #31441 is fixed.
Unfortunately, macOS build fails due to missing I'm pretty sure this can be resolved by adding this to the derivation:
At least it builds with |
Thanks, now it builds on Darwin. This should be ready to merge. |
Cool; thanks for your help! |
Motivation for this change
Allow Nix users to easily install and run ebook2cw
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)