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

buildRustCrate: overridable stdenv, and propagatedBuildInputs #58212

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

buildRustCrate: overridable stdenv, and propagatedBuildInputs #58212

wants to merge 3 commits into from

Conversation

P-E-Meunier
Copy link
Contributor

Motivation for this change

These changes are both necessary to build crate nettle-sys.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@grahamc
Copy link
Member

grahamc commented Mar 24, 2019

@GrahamcOfBorg eval

@andir
Copy link
Member

andir commented Mar 25, 2019

@GrahamcOfBorg build buildRustCrateTests
@GrahamcOfBorg build cargo-vendor

@andir
Copy link
Member

andir commented May 1, 2019

I started rebasing this onto master and also fixing a few nitpicks that I have.

@P-E-Meunier do you have the exact list of packages that you added? Which of these (besides nettle) required the overrides? I am also working on adding a few tests for the override feature so we can verify that things work (now and in the future).

@P-E-Meunier
Copy link
Contributor Author

Hi! I don't think there's anything really requiring work besides nettle, but I noticed a few problems when I started packaging the latest Pijul, due to the fact that Rust doesn't generate the same Cargo.lock for all featuresets (due to optional dependencies). I've published Carnix 0.10.1 onto crates.io last week, but haven't yet had the time to package it to nixpkgs yet. Also, I believe we need a giant common Cargo.lock in nixpkgs itself, which could be parsed more easily, and from which we could regenerate the nix expression.

@andir
Copy link
Member

andir commented May 1, 2019

the HEAD of my modified branch is at a89441c. I'm leaving PR untouched for now.

EDIT: just saw that you replied while I was typing. Parts of the below message are no longer relevant.

We really need a mechanism to keep the crates.io package list smaller and thus should document / automate the process on how to generate the current list. If packages drop out of nixpkgs and those dependencies are no longer used we shouldn't carry it on forever.

@andir
Copy link
Member

andir commented May 1, 2019

Regarding requiring a giant Cargo.lock:

Not sure if you saw my idea in one of the previous carnix bumps that we could just iterate through all the packages that we know are using buildRustCrate (on a high-level, not all the crates-io.nix packages) and then re-generate the index with those.

I hacked a very simple & error proune PoC https://gist.github.com/andir/c637c78450e6ae7815d98e7fa08d45dd

We could probably eliminate the getSource hack there if we would provide the Cargo.toml and Cargo.lock files as additional outputs of each of the crates. We would then just need the part where we iterate (and probably harder list) all the relevant packages.

@cyplo
Copy link
Contributor

cyplo commented Nov 25, 2019

Heya !
It seems this got out of sync with master - is anyone looking into this ?:)

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@stale
Copy link

stale bot commented Jun 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 7, 2021
@wegank wegank marked this pull request as draft March 20, 2024 14:59
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
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.

None yet

7 participants