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

WIP: Declarative wrappers #53046

Closed
wants to merge 1 commit into from
Closed

WIP: Declarative wrappers #53046

wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Dec 29, 2018

This commit adds library functions and a setup hook for creating wrappers declaratively.

Motivation for this change

To do:

  • Solve multiple outputs. Where does libexec go? Do we want to support executables at arbitrary locations and outputs? Hardcode lib.getOutput "bin" or introduce an extra level of nesting so we can specify the output? "wrappers."bin"."bin/foo".PATH.value = [ git ];
  • Find right location for "lib" code.
  • Consider the default values.
  • Documentation
  • Changelog
  • Use it in several separate commits
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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This commit adds library functions and a setup hook for creating wrappers declaratively.
@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/declarative-wrappers/1775/6

@ElvishJerricco
Copy link
Contributor

The code written here to manage merging and other such logic seems entirely redundant when evalModules already exists. I worry that this is vastly overengineered.

That said, I do like the idea of doing more in Nix and less in bash :)

@mmahut
Copy link
Member

mmahut commented Aug 13, 2019

Are there any updates on this pull request, please?

@FRidh
Copy link
Member Author

FRidh commented Aug 13, 2019

This was an interesting experiment but I think too complex and also not flexible enough so closing.

@FRidh FRidh closed this Aug 13, 2019
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/declarative-wrappers-another-idea/6661/5

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

5 participants