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
koreader: init at 2020.09 #86894
koreader: init at 2020.09 #86894
Conversation
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 looks good to me!
Result of 1 package built:- koreader |
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.
Ugh, sorry, looks like my review did not went through.
|
||
sourceRoot = "."; | ||
nativeBuildInputs = [ makeWrapper dpkg ]; | ||
buildInputs = [ luajit gtk3-x11 SDL2 glib ]; |
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.
gtk3-x11
is just an alias of gtk3
.
dontBuild = true; | ||
|
||
installPhase = '' | ||
mkdir -p $out |
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.
When overriding installPhase
, you should also provide runHook preInstall
and runHook postInstall
.
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 have pushed some updates. For now, please review it here. If that is desirable, I will make a new pr.
wrapProgram $out/bin/koreader --prefix LD_LIBRARY_PATH : ${ | ||
stdenv.lib.makeLibraryPath [ gtk3-x11 SDL2 glib ] | ||
} |
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.
LD_LIBRARY_PATH
can have side effects. Is autoPatchelfHook
not sufficient?
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.
The reason to use LD_LIBRARY_PATH
is because libSDL2-2.0.so.0
is loaded from the lua ffi api (i.e. the file https://github.com/koreader/koreader/blob/master/setupkoenv.lua), which is not a elf executable. I think I need to patch the file itself or inject LD_LIBRARY_PATH
.
description = | ||
"An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices"; | ||
platforms = intersectLists platforms.x86_64 platforms.linux; | ||
license = licenses.agpl3; |
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.
agpl3
is unclear, use agpl3Plus
or agpl3Only
. See https://discourse.nixos.org/t/lib-licenses-gpl3-co-are-now-deprecated/8206 for more details.
Motivation for this change
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)I am currently unable to build the binary from source code. Instead, I used the debian package upstream provided. I don't know what is the equivalent platforms for the upstream provide arm package. I only packaged the x86_64 version.