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

zellij: 0.40.1 -> 0.41.1 #353630

Merged
merged 5 commits into from
Nov 7, 2024
Merged

zellij: 0.40.1 -> 0.41.1 #353630

merged 5 commits into from
Nov 7, 2024

Conversation

r-vdp
Copy link
Contributor

@r-vdp r-vdp commented Nov 4, 2024

https://github.com/zellij-org/zellij/releases/tag/v0.41.0

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.

@jorikvanveen
Copy link

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 353630


x86_64-linux

✅ 1 package built:
  • zellij

@a-kenji
Copy link
Contributor

a-kenji commented Nov 4, 2024

Maintainers should be aware of the following:

Zellij 0.41.0 forces vendored libcurl dependency by default

Source:
zellij-org/zellij#3720

@thegrubster
Copy link

There has been a new patch release due to some issues with the generic binaries in 0.41, although I am unsure if this is relevant for nix

https://github.com/zellij-org/zellij/releases/tag/v0.41.1

@a-kenji
Copy link
Contributor

a-kenji commented Nov 4, 2024

Thank you @thegrubster,

There has been a new patch release due to some issues with the generic binaries in 0.41, although I am unsure if this is relevant for nix

Yes, this seems relevant.

@tjni
Copy link
Contributor

tjni commented Nov 5, 2024

Maybe we can patch zellij-utils/Cargo.toml to depend on isahc without the static-curl feature.

@nadir-ishiguro
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 353630


x86_64-linux

✅ 1 package built:
  • zellij

Copy link
Contributor

@wahjava wahjava left a comment

Choose a reason for hiding this comment

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

Looks good on aarch64-linux.

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Nov 6, 2024
@r-vdp
Copy link
Contributor Author

r-vdp commented Nov 6, 2024

Maybe we can patch zellij-utils/Cargo.toml to depend on isahc without the static-curl feature.

I actually tried this, but it doesn't seem to work. I added

  postPatch = ''
    substituteInPlace zellij-utils/Cargo.toml \
      --replace-fail 'isahc = "1.7.2"' 'isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }'
  '';

But I'm still not seeing curl as a dependency:

➜ nix-store --query --references result/
/nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36
/nix/store/m8gwqmn8k3jm0gbcia358mz4y00lgmbc-openssl-3.3.2
/nix/store/s94fwp43xhzkvw8l8nqslskib99yifzi-gcc-13.3.0-lib

➜ ldd ./result/bin/zellij
        linux-vdso.so.1 (0x00007f81611ab000)
        libssl.so.3 => /nix/store/m8gwqmn8k3jm0gbcia358mz4y00lgmbc-openssl-3.3.2/lib/libssl.so.3 (0x00007f815f2f4000)
        libcrypto.so.3 => /nix/store/m8gwqmn8k3jm0gbcia358mz4y00lgmbc-openssl-3.3.2/lib/libcrypto.so.3 (0x00007f815ec00000)
        libc.so.6 => /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib/libc.so.6 (0x00007f815ea07000)
        libgcc_s.so.1 => /nix/store/s94fwp43xhzkvw8l8nqslskib99yifzi-gcc-13.3.0-lib/lib/libgcc_s.so.1 (0x00007f8161180000)
        libm.so.6 => /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib/libm.so.6 (0x00007f815f20d000)
        libdl.so.2 => /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib/libdl.so.2 (0x00007f815f206000)
        libpthread.so.0 => /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib/libpthread.so.0 (0x00007f815f201000)
        /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib/ld-linux-x86-64.so.2 => /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36/lib64/ld-linux-x86-64.so.2 (0x00007f81611ad000)

Am I holding this wrong?

@r-vdp r-vdp changed the title zellij: 0.40.1 -> 0.41.0 zellij: 0.40.1 -> 0.41.1 Nov 6, 2024
@ofborg ofborg bot requested a review from wahjava November 7, 2024 02:49
@tjni
Copy link
Contributor

tjni commented Nov 7, 2024

Does it need curl in buildInputs?

@tjni
Copy link
Contributor

tjni commented Nov 7, 2024

I verified that this is needed on darwin at least (due to zellij-org/zellij#3668), but I'm having some trouble building this on aarch64-linux through the darwin linux builder (I don't have access to a Linux machine at the moment).

@r-vdp
Copy link
Contributor Author

r-vdp commented Nov 7, 2024

Does it need curl in buildInputs?

Yeah, I didn't mention it but I also added curl to the build inputs of course :)

@tjni
Copy link
Contributor

tjni commented Nov 7, 2024

It looks like curl-sys looks for curl on Linux using pkg-config, so one thing we could try is depending on curl.dev in buildInputs.

@r-vdp
Copy link
Contributor Author

r-vdp commented Nov 7, 2024

@tjni I also just found that by looking at what other packages in nixpkgs are doing, it's working now!

@r-vdp
Copy link
Contributor Author

r-vdp commented Nov 7, 2024

It would be helpful if anyone could test this on darwin also.

@@ -30,11 +31,19 @@ rustPlatform.buildRustPackage rec {
mandown
installShellFiles
pkg-config
(lib.getDev curl)
Copy link
Member

Choose a reason for hiding this comment

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

For curl-config, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So that cargo finds curl, using pkg-config. Without this, it doesn't.

pkgs/by-name/ze/zellij/package.nix Outdated Show resolved Hide resolved
mandown
installShellFiles
pkg-config
(lib.getDev curl)
Copy link
Contributor

@tjni tjni Nov 7, 2024

Choose a reason for hiding this comment

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

I think we can go with this for now, but I think cross-compilation might be broken.

  1. curl-sys uses https://docs.rs/pkg-config/latest/pkg_config/#cross-compilation, which seems to require setting certain environment variables for cross-compilation use case.
  2. we need it to use at build-time the .pc files from curl used at runtime, so how do we do that?

I don't have enough experience in cross-compilation to know how to do this. Maybe @Artturin or someone else can help out here (perhaps as a follow up to this PR)?

Note: This is technically not needed on Darwin since pkg-config is not used on Darwin to find curl. It does seem to be used on Darwin and all platforms to find OpenSSL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you make its inclusion conditional here, or do we consider that it doesn't matter to include this path in the sandbox also on darwin and it will simply not be used then?

For the cross-compilation, I also don't have much experience with this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've been thinking about it a little more, and I think we should just keep it like this for now. There's probably a nice solution for this somewhere, but I'll mull it over some more separately.

@tjni
Copy link
Contributor

tjni commented Nov 7, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 353630


aarch64-darwin

✅ 1 package built:
  • zellij

Copy link
Contributor

@tjni tjni left a comment

Choose a reason for hiding this comment

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

LGTM for Darwin

@khaneliman
Copy link
Contributor

khaneliman commented Nov 7, 2024

Does 0.41.1 work without 21de802 and did we not need it before the version bump? Otherwise that should probably be squashed into the first commit if it's unique to the version bump to avoid a commit that technically is breaking a package (Doesn't truly matter, just a nit to think about for atomic commits.). Otherwise, LGTM.

@khaneliman
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 353630


x86_64-linux

✅ 1 package built:
  • zellij

aarch64-linux

✅ 1 package built:
  • zellij

x86_64-darwin

✅ 1 package built:
  • zellij

aarch64-darwin

✅ 1 package built:
  • zellij

@r-vdp
Copy link
Contributor Author

r-vdp commented Nov 7, 2024

Does 0.41.1 work without 21de802 and did we not need it before the version bump? Otherwise that should probably be squashed into the first commit if it's unique to the version bump to avoid a commit that technically is breaking a package (Doesn't truly matter, just a nit to think about for atomic commits.). Otherwise, LGTM.

It does work, it just has a vendored curl binary, which is not ideal in terms of security updates.
I'd like to keep the commits separate, since they are kind of orthogonal concerns. But I also don't feel very strongly either way.

@khaneliman
Copy link
Contributor

Does 0.41.1 work without 21de802 and did we not need it before the version bump? Otherwise that should probably be squashed into the first commit if it's unique to the version bump to avoid a commit that technically is breaking a package (Doesn't truly matter, just a nit to think about for atomic commits.). Otherwise, LGTM.

It does work, it just has a vendored curl binary, which is not ideal in terms of security updates. I'd like to keep the commits separate, since they are kind of orthogonal concerns. But I also don't feel very strongly either way.

If it works without it, that's fine to me.

@wegank wegank added 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people and removed 12.approvals: 2 This PR was reviewed and approved by two reputable people labels Nov 7, 2024
@r-vdp r-vdp merged commit c8ce709 into NixOS:master Nov 7, 2024
28 of 29 checks passed
@r-vdp r-vdp deleted the zellij branch November 8, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants