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

default-crate-overrides.nix: prevent git fetch #224893

Merged
merged 2 commits into from Apr 9, 2023
Merged

default-crate-overrides.nix: prevent git fetch #224893

merged 2 commits into from Apr 9, 2023

Conversation

ghost
Copy link

@ghost ghost commented Apr 5, 2023

The build.rs script shipped with evdev-sys attempts to detect cross compilation and uses a completely different codepath which does a git fetch inside the build script. This doesn't work in nixpkgs.

This PR adds a touch libevdev/.git to trick the build.rs into thinking that it is not necessary to do a git fetch.

Thanks to @figsoda for finding this more-elegant solution to the problem (my original solution needed to patch build.rs):

#224893 (review)

Tested on:

  • aarch64-linux (cross from x86_64-linux)

@ofborg ofborg bot added 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 0 10.rebuild-linux: 0 labels Apr 5, 2023
@ghost ghost marked this pull request as draft April 6, 2023 20:00
@ghost ghost changed the title default-crate-overrides.nix: skip crate-specific cross detection default-crate-overrides.nix: prevent git fetch Apr 6, 2023
The build.rs script shipped with evdev-sys attempts to detect cross
compilation and uses a completely different codepath which does a
`git fetch` inside the build script.  This doesn't work in nixpkgs.

This PR adds a `touch libevdev/.git` to trick the `build.rs` into
thinking that it is not necessary to do a `git fetch`.

Thanks to @figsoda for finding this more-elegant solution to the
problem (my original solution needed to patch `build.rs`):

  #224893 (review)

Tested on:
- [x] `aarch64-linux` (cross from `x86_64-linux`)
@ghost ghost requested a review from figsoda April 6, 2023 20:13
@ghost ghost marked this pull request as ready for review April 6, 2023 20:13
@ghost ghost requested a review from figsoda April 6, 2023 20:50
@figsoda figsoda merged commit ce0ee58 into NixOS:master Apr 9, 2023
@ghost ghost deleted the pr/crate-overrides/evdev-sys branch April 11, 2023 20:30
jackyliu16 pushed a commit to jackyliu16/nixpkgs that referenced this pull request Apr 22, 2023
The build.rs script shipped with evdev-sys attempts to detect cross
compilation and uses a completely different codepath which does a
`git fetch` inside the build script.  This doesn't work in nixpkgs.

This PR adds a `touch libevdev/.git` to trick the `build.rs` into
thinking that it is not necessary to do a `git fetch`.

Thanks to @figsoda for finding this more-elegant solution to the
problem (my original solution needed to patch `build.rs`):

  NixOS#224893 (review)

Tested on:
- [x] `aarch64-linux` (cross from `x86_64-linux`)
jackyliu16 pushed a commit to jackyliu16/nixpkgs that referenced this pull request Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 6.topic: rust 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant