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

ncurses: fix source download #277064

Closed
wants to merge 1 commit into from
Closed

Conversation

zeuner
Copy link
Contributor

@zeuner zeuner commented Dec 27, 2023

Description of changes

The package can't be built from source since the source URL throws a HTTP 404 error.

Since there are no other obvious sources, this PR retrieves the source through archive.org.

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@kirillrdy
Copy link
Member

kirillrdy commented Dec 27, 2023

nixos 22.05 EOL is 31 Dec 2022

@zeuner
Copy link
Contributor Author

zeuner commented Dec 27, 2023

nixos 22.05 EOL is 31 Dec 2022

I understand. However, ofborg still uses 22.05: https://github.com/NixOS/ofborg/blob/released/flake.nix#L4 . So what would be the proposed way to handle this if we can't fix 22.05 in nixpkgs?

Copy link
Contributor

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Should this be the GitHub mirror URL instead of web.archive?

@zeuner
Copy link
Contributor Author

zeuner commented Dec 27, 2023

Should this be the GitHub mirror URL instead of web.archive?

archive.org was the only alternative I found without changing the hash. See #277063 for further discussion on this.

Comment on lines +22 to +24
# https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_3_20220507.tar.gz
# has the same source code, but the archive differs. Since we're using
# fetchurl, we use archive.org here, keeping the hash and avoiding rebuilds
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_3_20220507.tar.gz
# has the same source code, but the archive differs. Since we're using
# fetchurl, we use archive.org here, keeping the hash and avoiding rebuilds
# old snapshots are removed

yeah, that can happen because those tarballs are generated by git archive.

@SuperSandro2000
Copy link
Member

I understand. However, ofborg still uses 22.05: NixOS/ofborg@released/flake.nix#L4 . So what would be the proposed way to handle this if we can't fix 22.05 in nixpkgs?

NixOS/ofborg#670

We can't push to nixos-22.11 and the advancing of channels is likely already deactivated.

right @vcunat ?

@vcunat
Copy link
Member

vcunat commented Dec 27, 2023

I think 22.11 aren't deactivated yet. Hydra certainly still evaluates both 22.*; I suspect that channel updates will only work for 22.11 at this point. But to me both seem too old to really care.

@vcunat
Copy link
Member

vcunat commented Dec 27, 2023

However, ofborg still uses 22.05: https://github.com/NixOS/ofborg/blob/released/flake.nix#L4 . So what would be the proposed way to handle this if we can't fix 22.05 in nixpkgs?

I'd primarily suggest working towards upgrading OfBorg to supported NixOS release. EDIT: though I don't know why exactly the old PHP is needed there, etc.

@Ma27
Copy link
Member

Ma27 commented Dec 28, 2023

If php is the only issue, then this sounds like a case for nix-phps.

Also, the tarball for ncurses is cached by cache.nixos.org[1] for exactly the reason that release tarballs tend to be volatile from time to time, so this is neither case of "22.11 is unusable" because we still have a binary cache nor acceptable as it's EOL for almost half a year.

[1] Checked like this:

$ g describe 
22.11-4256-g825ab3126df3
$ nix-build -A ncurses.src               
this path will be fetched (3.44 MiB download, 3.45 MiB unpacked):
  /nix/store/0xiwj5b1vsxpzvqw2y16x86ya4k2f36p-ncurses-6.3-20220507.tgz
copying path '/nix/store/0xiwj5b1vsxpzvqw2y16x86ya4k2f36p-ncurses-6.3-20220507.tgz' from 'https://cache.nixos.org'...
/nix/store/0xiwj5b1vsxpzvqw2y16x86ya4k2f36p-ncurses-6.3-20220507.tgz
$ nix-hash /nix/store/0xiwj5b1vsxpzvqw2y16x86ya4k2f36p-ncurses-6.3-20220507.tgz --type sha256 --base32 --flat 
02y4n4my5qqhw3fdhdjv1zc9xpyglzlzmzjwq2zcwbwv738255ja

@doronbehar
Copy link
Contributor

I'm closing this as this issue seems no longer relevant.

@doronbehar doronbehar closed this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants