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

Fix shell.nix by pinning nixpkgs #6213

Merged
merged 1 commit into from
Nov 14, 2019
Merged

Fix shell.nix by pinning nixpkgs #6213

merged 1 commit into from
Nov 14, 2019

Conversation

jbaum98
Copy link
Contributor

@jbaum98 jbaum98 commented Jun 29, 2019

Description

I tried to use shell.nix, but I ran into a build issue. To fix it, I found a commit in nixpkgs from around the time the file was made, and modified shell.nix to always use the version of nixpkgs at that commit. That way even as nixpkgs changes, this shell.nix file should always work.

I also tweaked the way we get around the fact that dfu-programmer and teensy-loader-cli are erroneously marked as unsupported on darwin, so that it only affects those two packages. I'm not sure what the status of theses packages is for the current version of nixpkgs, but maybe someone should submit a PR to nixpkgs to fix this upstream?

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna
Copy link
Member

drashna commented Sep 21, 2019

It looks like there is a merge conflict here.

If you could update the PR to fix this?

@jbaum98
Copy link
Contributor Author

jbaum98 commented Sep 24, 2019

I've basically solved the conflict by overriding the changes made in #5913, because I think this PR addresses that by pinning all of nixpkgs rather than just the one package. Let me know if that doesn't seem like the right thing to do here.

@drashna
Copy link
Member

drashna commented Sep 25, 2019

Well, if the other PR does resolve the issues, then that's what I'd personally prefer to use. The lightest touch is best, IMO.

But I will defer to others that have more experience with this (as ... well, I don't really have any with the shell.nex stuff)

@drashna drashna requested review from a team and removed request for fredizzimo September 25, 2019 18:45
@jbaum98
Copy link
Contributor Author

jbaum98 commented Sep 25, 2019

I would argue that we do want to pin all of nixpkgs so that it works regardless of users' environments. That way we can guarantee that it actually works. As it is now, we have no way of knowing what versions the user is running. Also, we can upgrade to newer versions as we want instead of relying on users to upgrade.

@jbaum98
Copy link
Contributor Author

jbaum98 commented Nov 12, 2019

Is there any update on this PR? Is there anything I can do to help it get merged?

@drashna drashna merged commit 8dc9764 into qmk:master Nov 14, 2019
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Nov 15, 2019
* 'master' of https://github.com/qmk/qmk_firmware: (475 commits)
  [Keyboard] kbdfans keyboards NKRO enable (qmk#7364)
  [Keyboard] fix DZ60RGB info.json (qmk#7362)
  Adding new pcb with default keymap and personal keymap (qmk#7314)
  [Core] Cleanup rules.mk for F303 keyboards (qmk#7306)
  [Docs] Japanese translation of docs/ja/newbs_best_practices.md (qmk#7337)
  Set device version from config.h for V-USB boards (qmk#7316)
  Add support for configurable polling interval and power usage o… (qmk#7336)
  capslock_led (qmk#7359)
  Move Ergodox EZ RGB Light code to custom driver  (qmk#7309)
  Fix shell.nix by pinning nixpkgs (qmk#6213)
  [Keyboard] add kbdmini; dztech, kbdfans keyboards cleanup (qmk#7223)
  [Docs] Encourage newbs to not download the repo as a zip (qmk#7353)
  Update debounce docs (qmk#7355)
  [Keyboard] Add TG4x (qmk#7351)
  [Keyboard] Add FLX Virgo (qmk#7352)
  format code according to conventions [skip ci]
  Adding verd layout to RSII (qmk#7296)
  Add my custom layouts for GH60, DZ60 and Minivan (qmk#7278)
  [Keyboard] Added abnt2 layout to dz60 (qmk#7340)
  [Keyboard] add Little Keyboards as a seller of helix pcbs outside of japan (qmk#7249)
  ...
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Nov 18, 2019
ripxorip pushed a commit to ripxorip/qmk_firmware that referenced this pull request Dec 3, 2019
shajra added a commit to shajra/qmk_firmware that referenced this pull request Dec 23, 2019
This refines PR qmk#6213 (commit 8dc9764), which pinned Nixpkgs.

In general, pinning Nixpkgs is a good idea.  But there's some problems with
pinning it so hard.  It makes it harder to experiment with more modern Nixpkgs
without forking the codebase.  In general it's nicer to be current if we can,
because it decreases the likelihood of cache misses and having to pull a ton of
stuff down from Hydra.

So this commit tries to get the best of both worlds.  The pinned version is
still there as a default.  But I can easily override it to test out later
versions (which we'll want to do periodically anyway to not be perpetually stuck
on an ancient version of Nixpkgs).
patrl pushed a commit to patrl/qmk_firmware that referenced this pull request Dec 29, 2019
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jan 6, 2020
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jan 8, 2020
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Feb 21, 2020
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 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

3 participants