-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
python312Packages.google-cloud-documentai: init at 3.1.0 #376392
base: master
Are you sure you want to change the base?
Conversation
d915c7c
to
6fdad28
Compare
6fdad28
to
a6a48e9
Compare
pkgs/development/python-modules/google-cloud-documentai/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/google-cloud-documentai/default.nix
Outdated
Show resolved
Hide resolved
pname = "google_cloud_documentai"; | ||
inherit version; | ||
# https://pypi.org/project/google-cloud-documentai/3.1.0/#google_cloud_documentai-3.1.0.tar.gz | ||
hash = "sha256-7b156175efe99cc4faafc81beefe4a7867fd54b827ba5ca40c7e8f7d9cd4b525"; |
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.
hash = "sha256-7b156175efe99cc4faafc81beefe4a7867fd54b827ba5ca40c7e8f7d9cd4b525"; | |
hash = ""; |
It's better to use the sri hash, you can find it from the error message of the build
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.
Thanks for the review @aucub, I tried to fix most of them.
Still unsure about this one though, here's what I tried:
nixpkgs on google-cloud-documentai [!+⇣] ➜ nix-prefetch-url --unpack https://files.pythonhosted.org/packages/f5/88/cad7f02dfb00eea0b9e58c94a7778db466511dea06d7f4ca6ce3ef68da1c/google_cloud_documentai-3.1.0.tar.gz --type sha256
path is '/nix/store/01zh3r1h7ng355f44q8qy9db2qw021sa-google_cloud_documentai-3.1.0.tar.gz'
0q4zallgs8l0yc0ipw5zfha1czw682yxw1azlkirdnj3afw59f3r
nixpkgs on google-cloud-documentai ➜ nix-build -A python312Packages.google-cloud-documentai
error:
… while evaluating the attribute 'drvPath'
at /home/dori/Projects/3rdPart/nix/nixpkgs/lib/customisation.nix:418:7:
417| // {
418| drvPath =
| ^
419| assert condition;
… while evaluating the attribute 'drvPath'
at /home/dori/Projects/3rdPart/nix/nixpkgs/lib/customisation.nix:418:7:
417| // {
418| drvPath =
| ^
419| assert condition;
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: invalid SRI hash '0q4zallgs8l0yc0ipw5zfha1czw682yxw1azlkirdnj3afw59f3r'
Not sure if I got the wrong hash or the wrong way to build the package.
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.
hash = "sha256-exVhde/pnMT6r8gb7v5KeGf9VLgnulykDH6PfZzUtSU=";
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.
Indeed. Thank you.
What command did you run ?
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 using nix build
, you can typically leave hash = "";
empty. The actual hash will be provided in the error message. You can then convert the SHA256 hash to an SRI hash using the command: nix hash convert --hash-algo sha256 --to sri
.
pkgs/development/python-modules/google-cloud-documentai/default.nix
Outdated
Show resolved
Hide resolved
pr title and commit message shoudle be |
a6a48e9
to
7365519
Compare
7365519
to
fcf82f7
Compare
Newbie learning NixOS and how to submit a new package.
I'm not sure how to test it in local given there's a generator to build this package for different python versions.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.