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

gnvim: fix install phase with Rust with custom target #115267

Merged
merged 1 commit into from Mar 6, 2021

Conversation

minijackson
Copy link
Member

Motivation for this change

When building with cargo build --release --target <arch> ..., Rust installs the gnvim binary in ./taget/<arch>/release instead of ./target/release, which isn't taken into account by upstream's Makefile.

Normally, the project would have been compiled by using make build, but if I understood it correctly, the buildPhase is now overridden by the new hook system (#112804)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@minijackson minijackson requested a review from teto as a code owner March 6, 2021 16:24
@r-rmcgibbo
Copy link

Result of nixpkgs-review pr 115267 at ec5fb3c run on x86_64-linux 1

2 packages failed to build:

@minijackson
Copy link
Member Author

@ofborg build gnvim

@teto
Copy link
Member

teto commented Mar 6, 2021

$ git worktree add /home/teto/.cache/nixpkgs-review/pr-115267/nixpkgs 7d15e227cf3b30cddd083370814b8d1a2f05ed49
Preparing worktree (detached HEAD 7d15e227cf3)
Updating files: 100% (24774/24774), done.
HEAD is now at 7d15e227cf3 Merge pull request #115232 from xantoz/nyxt-more-platforms
$ git merge --no-commit ec5fb3cce8c8827575a1f2315e3a43b5be55d23c
Automatic merge went well; stopped before committing as requested
$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/teto/.cache/nixpkgs-review/pr-115267/build.nix

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/115267

2 packages built:
gnvim gnvim-unwrapped

it took a while but build passes locally. Binary works.

@teto teto merged commit de6283b into NixOS:master Mar 6, 2021
@minijackson minijackson deleted the fix-gnvim-with-target branch March 7, 2021 15:48
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

4 participants