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

unixtools: refactor for less redundancy #40134

Merged
merged 2 commits into from May 7, 2018

Conversation

Synthetica9
Copy link
Member

Motivation for this change

unix-tools didn't quite follow the DRY principle, refactored it to follow this principle better.

This shouldn't actually change the output of any derivation, just the way we get there, so @GrahamcOfBorg shouldn't give any rebuilds.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

};
logger = {
linux = pkgs.utillinux;
darwin = more_compat;
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be included.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, right you are, it was an accidental paste and I mistook it for an accidental deletion

Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

Looks good! Not huge line saving but will make it easier to add more.

darwin = pkgs.darwin.basic_cmds;

makeCompat = name': value: buildEnv {
name = name' + "-compat";
Copy link
Member

Choose a reason for hiding this comment

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

Make sure these have 2 space indentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

✔️

@Synthetica9
Copy link
Member Author

(Looks like master machine broke, probably shouldn't merge this until that is fixed, just to make sure it won't trigger a mass rebuild)

@matthewbauer
Copy link
Member

The eval error was hopefully unrelated.

@GrahamcOfBorg eval

@Synthetica9
Copy link
Member Author

Looks like its fine now

@matthewbauer
Copy link
Member

Thanks!

@matthewbauer matthewbauer merged commit 6bce881 into NixOS:master May 7, 2018
@Synthetica9 Synthetica9 deleted the unixtools-refactor branch May 7, 2018 19:15
@dtzWill
Copy link
Member

dtzWill commented May 8, 2018

Unfortunately this complicates merging with staging, which made changes to unix-tools before the reformatting.

Can someone take a look? Thanks!

@matthewbauer
Copy link
Member

Just merged master into staging.

@Synthetica9 Synthetica9 restored the unixtools-refactor branch May 8, 2018 14:36
@Synthetica9 Synthetica9 deleted the unixtools-refactor branch May 8, 2018 14:36
@Synthetica9 Synthetica9 restored the unixtools-refactor branch May 8, 2018 14:37
@dtzWill
Copy link
Member

dtzWill commented May 8, 2018

@matthewbauer haha thanks! 😸

@Synthetica9
Copy link
Member Author

Wew, that was quick 😅

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

4 participants