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

wkhtmltopdf: unbreak package #327641

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Jul 16, 2024

Description of changes

Some strategic changes to allow the package to be built again.

Motivation: Odoo depends on this package.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@zimbatm zimbatm changed the title wkhtmktopdf: unbreak package wkhtmltopdf: unbreak package Jul 16, 2024
@zimbatm zimbatm requested a review from kalbasit July 16, 2024 12:58
@zimbatm
Copy link
Member Author

zimbatm commented Jul 16, 2024

Result of nixpkgs-review pr 327641 run on x86_64-linux 1

5 packages built:
  • odoo
  • odoo.dist
  • odoo16
  • odoo16.dist
  • wkhtmltopdf

runHook preUnpack

mkdir pkg
dpkg-deb -x $src pkg
Copy link
Member

Choose a reason for hiding this comment

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

Does fetchzip decompress it? idk

Copy link
Member Author

Choose a reason for hiding this comment

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

Technally yes, there is one package doing it, pkgs/by-name/te/tetrio-desktop/package.nix. All of the others are using fetchurl.

I prefer using fetchurl as the hash is on the content and can be easily calculated separately.

@zimbatm zimbatm force-pushed the default-wkhtmktopdf-bin branch from 1178c6c to b8d5249 Compare July 16, 2024 14:01
zimbatm added 3 commits July 16, 2024 16:02
wkhtmltopdf is a bit cursed.

1. It needs a specially patched version of QT to work.
2. It doesn't build currently.
3. Upstream repos are archived.
4. It depends on insecure dependencies.

In the mid term this dependency should be removed, but it's still a hard
dependency for:

* bookstack
* monica
* odoo (ref odoo/odoo#86501)
* snipe-it

Instead of spending time to fix the build issues, use the -bin version
in the meantime.
Use the latest release before the project was archived.

Removes dependency on openssl_1_1 which is marked as insecure, so this
package should be built by Hydra once again.
@zimbatm zimbatm force-pushed the default-wkhtmktopdf-bin branch from b8d5249 to a4673b4 Compare July 16, 2024 14:02
@@ -14433,6 +14433,7 @@ with pkgs;
wireguard-go = callPackage ../tools/networking/wireguard-go { };

wkhtmltopdf-bin = callPackage ../tools/graphics/wkhtmltopdf-bin { };
wkhtmltopdf = wkhtmltopdf-bin;
Copy link
Member Author

Choose a reason for hiding this comment

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

hydra doesn't allow aliases to be passed to packages.

we could rename all the inputs, or keep this manual alias here.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

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

Odoo using Nix? Interesting :)

@zimbatm
Copy link
Member Author

zimbatm commented Jul 16, 2024

yes, I have some follow-up PRs and a blog post coming up. Definitely not production ready.

@zimbatm zimbatm merged commit 1ae6196 into NixOS:master Jul 16, 2024
27 of 29 checks passed
@zimbatm zimbatm deleted the default-wkhtmktopdf-bin branch July 16, 2024 19:53
@drupol
Copy link
Contributor

drupol commented Jul 16, 2024

@zimbatm there's this that might help? https://github.com/novacode-nl/nix-odoo

@zimbatm zimbatm mentioned this pull request Jul 16, 2024
13 tasks
@zimbatm
Copy link
Member Author

zimbatm commented Jul 16, 2024

I've seen it; it's more for a dev setup than to deploy Odoo.

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.

5 participants