Skip to content

nixos/etc: pass data via json to the build to avoid whitespace issues#108779

Closed
xaverdh wants to merge 1 commit intoNixOS:masterfrom
xaverdh:make-etc-json
Closed

nixos/etc: pass data via json to the build to avoid whitespace issues#108779
xaverdh wants to merge 1 commit intoNixOS:masterfrom
xaverdh:make-etc-json

Conversation

@xaverdh
Copy link
Contributor

@xaverdh xaverdh commented Jan 8, 2021

Motivation for this change

alternative approach to #41276

Things done

I built my system from this branch, and only a few symlink targets in the generated etc changed (as should be expected as the hashes changed).

  • 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.

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 8, 2021

if [[ "$source" =~ '*' ]]; then

# If the source name contains '*', perform globbing.
Copy link
Contributor Author

@xaverdh xaverdh Jan 9, 2021

Choose a reason for hiding this comment

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

The special handling for glob patterns here should probably be either documented or dropped.
People might be surprised if they have files in /etc with a * in them..

@stale
Copy link

stale bot commented Jul 9, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants