Skip to content

unixtools: refactor for less redundancy - #40134

Merged
matthewbauer merged 2 commits into
NixOS:masterfrom
Synthetica9:unixtools-refactor
May 7, 2018
Merged

matthewbauer merged 2 commits into
NixOS:masterfrom
Synthetica9:unixtools-refactor

Conversation

@Synthetica9

Copy link
Copy Markdown
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.

@Synthetica9
Synthetica9 force-pushed the unixtools-refactor branch from b1bad48 to 898e4b0 Compare May 7, 2018 18:08
Comment thread pkgs/top-level/unix-tools.nix Outdated

Copy link
Copy Markdown
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
Copy Markdown
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

@Synthetica9
Synthetica9 force-pushed the unixtools-refactor branch from 898e4b0 to 4b93f21 Compare May 7, 2018 18:14

@matthewbauer matthewbauer left a comment

Copy link
Copy Markdown
Member

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.

Comment thread pkgs/top-level/unix-tools.nix Outdated
darwin = pkgs.darwin.basic_cmds;

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

The eval error was hopefully unrelated.

@GrahamcOfBorg eval

@Ericson2314 Ericson2314 mentioned this pull request May 7, 2018
8 tasks
@GrahamcOfBorg GrahamcOfBorg added 8.has: clean-up This PR removes packages or removes other cruft 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 May 7, 2018
@Synthetica9

Copy link
Copy Markdown
Member Author

Looks like its fine now

@matthewbauer

Copy link
Copy Markdown
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

dtzWill commented May 8, 2018

Copy link
Copy Markdown
Member

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

Can someone take a look? Thanks!

@matthewbauer

Copy link
Copy Markdown
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

dtzWill commented May 8, 2018

Copy link
Copy Markdown
Member

@matthewbauer haha thanks! 😸

@Synthetica9

Copy link
Copy Markdown
Member Author

Wew, that was quick 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 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.

4 participants