Skip to content

buildRustCrate: Fix #60125 - Always set additional env variables during build#60127

Merged
dywedir merged 1 commit intoNixOS:masterfrom
kolloch:fix60125
Apr 24, 2019
Merged

buildRustCrate: Fix #60125 - Always set additional env variables during build#60127
dywedir merged 1 commit intoNixOS:masterfrom
kolloch:fix60125

Conversation

@kolloch
Copy link
Contributor

@kolloch kolloch commented Apr 23, 2019

Namely CARGO_PKG_VERSION_PRE and CARGO_PKG_HOMEPAGE
(as cargo does)

@P-E-Meunier

Motivation for this change

The built crate assumes that these environment variables are always set at build time. Cargo does that. Since we are emulating cargo, we should, too.

Things done

I build the crate that failed before using the update nixpkgs.

  • 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.

@P-E-Meunier
Copy link
Contributor

Looks good to me. I just updated the master branch of Carnix, this should be included in the next version.

@ofborg ofborg bot added 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 23, 2019
@dywedir
Copy link
Member

dywedir commented Apr 24, 2019

Thanks!

@dywedir dywedir merged commit 0e6ae0b into NixOS:master Apr 24, 2019
kolloch added a commit to nix-community/crate2nix that referenced this pull request Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants