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

rPackages.immunotation: cache external URLs #303724

Closed
wants to merge 1 commit into from

Conversation

Kupac
Copy link
Contributor

@Kupac Kupac commented Apr 12, 2024

Description of changes

Immunotation uses 3 external URL-s, and stores them variables in the package's namespace. Package installation is not possible without internet connection, and skipping load test doesn't help, because this happens before the load test.

I use fetchurl to get those external deps, and replace them in the code with a patch + substituteInPlace.

This should work in the long term for the two MHC allele lists, but I'm not sure about the geographical region list. We'll have to see how frequently the website changes. I only found the copyright2024 notice problematic, because it could change every year, which means we'd have to update the hash. I think that would still be acceptable. If it's more frequent, we'll have to mark this as broken, I think.

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.

Copy link
Contributor

@b-rodrigues b-rodrigues left a comment

Choose a reason for hiding this comment

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

builds and loads on aarch64-linux

@lkupcsik
Copy link

lkupcsik commented Apr 18, 2024

@ofborg build rPackages.immunotation

@Kupac
Copy link
Contributor Author

Kupac commented Apr 18, 2024

Ok, this won't work, the hash of hla6006a already changed

@Kupac Kupac closed this Apr 18, 2024
@b-rodrigues
Copy link
Contributor

Stupid question: could we use an archived page for hla6006a? does the actual data of interest change or is it just the website ?

@Kupac
Copy link
Contributor Author

Kupac commented Apr 18, 2024

That could be an option, actually. Normally it is retrieved once, at install time, so it's not that different here. Other possibility could be to retrieve it in .onLoad() but that would require some more excessive patching.

@Kupac
Copy link
Contributor Author

Kupac commented Apr 20, 2024

We could use an archive.org snapshot as a source. There are small changes from time to time, but these probably don't affect the list of valid geographical regions, only some count values, which are not needed by the script at this stage. However, it should be updated once in a while to a new snapshot. I'd prefer to move this whole connection stuff to .onLoad, like in many other packages. I don't see why not. It's just not very straightforward to do in nix.

https://web.archive.org/web/diff/20231207065757/20240205120933/www.allelefrequencies.net/hla6006a.asp

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.

4 participants