Skip to content

clash-rs: 0.7.4 -> 0.7.5 - #382251

Merged
khaneliman merged 1 commit into
NixOS:masterfrom
aaronjheng:clash-rs-0.7.5
Mar 16, 2025
Merged

khaneliman merged 1 commit into
NixOS:masterfrom
aaronjheng:clash-rs-0.7.5

Conversation

@aaronjheng

@aaronjheng aaronjheng commented Feb 15, 2025 •

Copy link
Copy Markdown
Contributor

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@github-actions github-actions Bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 15, 2025
@aaronjheng
aaronjheng marked this pull request as ready for review February 15, 2025 08:30
@momeemt

momeemt commented Feb 15, 2025

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 382251


aarch64-darwin

❌ 1 package failed to build:
  • clash-rs

@momeemt momeemt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It failed to build on my aarch64-darwin environment.

❯ nix-store -l /nix/store/0ji927vdxz9y89pc76wr4sf0z30rs558-clash-rs-0.7.5-vendor-staging.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/7c4y7d5gqvh9x93w0dsw56dzicy7xq8q-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Traceback (most recent call last):
  File "/nix/store/1kjmldad7i8dq70hbv46fdb12qdm4ipp-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 15, in <module>
    import requests
  File "/nix/store/p690r5cdk99ic6fn39g1fmqw4sg5ikfc-python3-3.12.8-env/lib/python3.12/site-packages/requests/__init__.py", line 164, in <module>
    from .api import delete, get, head, options, patch, post, put, request
  File "/nix/store/p690r5cdk99ic6fn39g1fmqw4sg5ikfc-python3-3.12.8-env/lib/python3.12/site-packages/requests/api.py", line 11, in <module>
    from . import sessions
  File "/nix/store/p690r5cdk99ic6fn39g1fmqw4sg5ikfc-python3-3.12.8-env/lib/python3.12/site-packages/requests/sessions.py", line 15, in <module>
    from .adapters import HTTPAdapter
  File "/nix/store/p690r5cdk99ic6fn39g1fmqw4sg5ikfc-python3-3.12.8-env/lib/python3.12/site-packages/requests/adapters.py", line 81, in <module>
    _preloaded_ssl_context.load_verify_locations(
PermissionError: [Errno 1] Operation not permitted

@aaronjheng

Copy link
Copy Markdown
Contributor Author

Can you try again? It seems like a request failure from fetchCargoVendor.

@github-actions github-actions Bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Mar 2, 2025
@nix-owners
nix-owners Bot requested a review from TomaSajt March 2, 2025 00:15
@TomaSajt

TomaSajt commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

AFAICT the error is because the NIX_SSL_CERT_FILE environment variable is being inherited by the builder process, but cannot access the specified file from inside the builder, even though it's supposed to be able to...

Related issue: #385366

A possible global fix would be to not use the cacert hook inside the implementation of fetchCargoVendor, but instead hardcode the value to always be inside the nix store.

I'll send a temporary solution in a bit.

@TomaSajt

TomaSajt commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

Here's a temporary fix you could add to your local checkout of nixpkgs:

diff --git a/pkgs/build-support/rust/fetch-cargo-vendor.nix b/pkgs/build-support/rust/fetch-cargo-vendor.nix
index ce015b099382..5cb2de7c7619 100644
--- a/pkgs/build-support/rust/fetch-cargo-vendor.nix
+++ b/pkgs/build-support/rust/fetch-cargo-vendor.nix
@@ -61,7 +61,6 @@ let
       nativeBuildInputs =
         [
           fetchCargoVendorUtil
-          cacert
         ]
         ++ lib.optionals allowGitDependencies [
           nix-prefetch-git
@@ -75,6 +74,8 @@ let
           cd "$cargoRoot"
         fi

+        export NIX_SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt";
+
         fetch-cargo-vendor-util create-vendor-staging ./Cargo.lock "$out"

         runHook postBuild

@TomaSajt

TomaSajt commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

@aaronjheng could you rebase your PR on a later commit? (e.g. the current master)
The change you've made to fetch-cargo-vendor.nix has already been added, so there's no need to include it, once you've rebased.

@aaronjheng

Copy link
Copy Markdown
Contributor Author

The change you've made to fetch-cargo-vendor.nix has already been added, so there's no need to include it, once you've rebased.

@TomaSajt I did not see anything. Could you please point it out for me?

@TomaSajt

TomaSajt commented Mar 6, 2025

Copy link
Copy Markdown
Contributor

The change you've made to fetch-cargo-vendor.nix has already been added, so there's no need to include it, once you've rebased.

@TomaSajt I did not see anything. Could you please point it out for me?

I'm not sure I understand what you mean by not seeing anything.

To clarify, you have added a like to fetch-cargo-vendor.nix in this PR, but that change has also been done in a different PR: 90ca050, which is already merged.

GitHub is not complaining about merge conflicts, since the change is EXACTLY the same.

In any case, please rebase your PR on master.

@github-actions github-actions Bot removed the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Mar 7, 2025
@aaronjheng

Copy link
Copy Markdown
Contributor Author

Thanks. Done.

@TomaSajt TomaSajt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, built on x86_64-linux

@TomaSajt
TomaSajt dismissed momeemt’s stale review March 13, 2025 10:10

Sandboxing issue, unrelated to PR changes

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Mar 13, 2025
@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Mar 15, 2025
@khaneliman

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 382251


x86_64-linux

✅ 1 package built:
  • clash-rs

aarch64-linux

✅ 1 package built:
  • clash-rs

x86_64-darwin

✅ 1 package built:
  • clash-rs

aarch64-darwin

✅ 1 package built:
  • clash-rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants