Skip to content

node updater improvements#70974

Merged
teto merged 1 commit intoNixOS:masterfrom
teto:nodegenerate
Feb 26, 2020
Merged

node updater improvements#70974
teto merged 1 commit intoNixOS:masterfrom
teto:nodegenerate

Conversation

@teto
Copy link
Member

@teto teto commented Oct 11, 2019

  • Make it run from anywhere
  • overwrite old packages only on success to prevent getting into a bad
    state
Motivation for this change
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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@teto teto force-pushed the nodegenerate branch 2 times, most recently from 6128b56 to 711e245 Compare October 11, 2019 12:59
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 11, 2019
@Profpatsch
Copy link
Member

(triage) ping

@teto
Copy link
Member Author

teto commented Jan 26, 2020

rebased

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you know you can have the current path in nix?

let here = toString ./.;

You don’t have to do any tmpdir/cd magic, just use here as an absolute path.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try it out with nix-instantiate --eval -E 'toString ./.'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tmpdir magic is in order to not break nixpkgs if something goes wrong during evaluation (which happens if your network is unstable for instance)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d argue that’s what git is for, but I’m fine with the code as it stands.

- Make it run from anywhere
- overwrite old packages only on success to prevent getting into a bad
state
@teto teto merged commit 33323e4 into NixOS:master Feb 26, 2020
@teto teto deleted the nodegenerate branch February 26, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants