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

gourou: init at 0.7.2 #179678

Closed
wants to merge 2 commits into from
Closed

gourou: init at 0.7.2 #179678

wants to merge 2 commits into from

Conversation

McSinyx
Copy link
Member

@McSinyx McSinyx commented Jun 30, 2022

Description of changes

libgourou is a library for deDRM'ing Adobe ebooks. It's working pretty well for me to download and read comics bought from Kobo offline without using any proprietary software.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

new file mode 100644
index 000000000000..cdfdc04d0bb1
--- /dev/null
+++ b/include/base64.h
Copy link
Member

Choose a reason for hiding this comment

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

This is not a patch, it is a file inclusion disguised as patch.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it's a gist fetched at build time otherwise. I also sent the same patch upstream.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since it is a gist, you can just fetch it using fetchgit or even with fetchzip (by using https://gist.github.com/<username>/<gist>/archive/<commit>.zip) instead of doing this. Them just copy it after the unpackPhase inside the build directory.

This will avoid committing a big "patch" inside nixpkgs repository, and also will allow tracking of its origins better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done!

src = fetchgit {
url = "git://soutade.fr/updfparser";
rev = "9d56c1d0b1ce81aae4c8db9d99a8b5d1f7967bcf";
sha256 = "sha256-9dvibKiUbbI4CrmuAaJzlpntT0XdLvdGeC2/WzjlA5U=";
Copy link
Member

Choose a reason for hiding this comment

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

Fix the indentation and also the download hashes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I fixed the indentation, but regarding the hashes, it's a bit more complicated than that:

$ nix hash to-sri --type sha256 \
  `nix-prefetch-git git://soutade.fr/updfparser \
    9d56c1d0b1ce81aae4c8db9d99a8b5d1f7967bcf \
    2> /dev/null | jq -r .sha256`
sha256-9dvibKiUbbI4CrmuAaJzlpntT0XdLvdGeC2/WzjlA5U=

I am clueless why the CI got different values.

@AndersonTorres
Copy link
Member

Failing on Darwin. Add meta.broken = stdenv.isDarwin;

@McSinyx
Copy link
Member Author

McSinyx commented Jul 2, 2022 via email

*/
#include <string.h>

-#include <base64/Base64.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't you just copy the base64 file in $sourceRoot/include/base64/Base64.h instead?

If this works, this would allow us to drop a patch.

sha256 = "sha256-jvvfrCuRggSPk7p/WtEaKRV7kILuZjUB1KEgaE4LStc=";
};

postUnpack = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

I know I said post unpack, but I meant post unpack phase for any phase post unpack, not necessary the postUnpack phase.

Actually this looks more like to be a postPatch or preBuild phases, instead of postUnpack (since this isn't unpacking anything).

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 7, 2023
@sevenautumns sevenautumns mentioned this pull request Mar 22, 2023
12 tasks
@thiagokokada
Copy link
Contributor

Fixed by #222537.

@McSinyx McSinyx deleted the gourou branch March 23, 2023 05:29
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

3 participants