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

node updater improvements #70974

Merged
merged 1 commit into from Feb 26, 2020
Merged

node updater improvements #70974

merged 1 commit into from Feb 26, 2020

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 @

@Profpatsch
Copy link
Member

(triage) ping

@teto
Copy link
Member Author

teto commented Jan 26, 2020

rebased

node2nix --nodejs-10 -i node-packages-v10.json -o node-packages-v10.nix -c composition-v10.nix
node2nix --nodejs-12 -i node-packages-v12.json -o node-packages-v12.nix -c composition-v12.nix
node2nix --nodejs-13 -i node-packages-v13.json -o node-packages-v13.nix -c composition-v13.nix
cd "$NODE_NIXPKGS_PATH/pkgs/development/node-packages"
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants