Skip to content

Add a cleaner way to make package wrappers #13156

Closed

Description

@ericsagnes

The current way to make packages wrappers is to use a *-with-plugins package.

The original *-with-plugin package, pidgin-with-plugins is mentioning that part of the code could be avoided if buildEnv created the directories.

It feels like the wrapper code could be factored out in a cleaner stdenv.mkWrapper function.

List of packages currently using this technique:

  • ./pkgs/applications/audio/deadbeef/wrapper.nix
  • ./pkgs/applications/audio/puredata/wrapper.nix
  • ./pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
  • ./pkgs/tools/inputmethods/fcitx/wrapper.nix
  • ./pkgs/tools/inputmethods/ibus/wrapper.nix
  • ./pkgs/applications/misc/rxvt_unicode/wrapper.nix

Wrappers also raise lint issues (cf #11254 ) that could be fixed by inheriting some of the base package meta attributes:

22:06:18.262 > ibus-with-plugins: Lacks a maintainer
22:06:18.263 > ibus-with-plugins: Lacks a platform
22:06:18.263 > ibus-with-plugins: Lacks a license
22:06:18.263 > ibus-with-plugins: Lacks a description

cc pidgin-with-plugins creator @abbradar

Activity

  1. added
    0.kind: enhancement
    9.needs: reporter feedback
    8.has: clean-up
    on Feb 20, 2016
  2. abbradar commented on Feb 21, 2016

    @abbradar
    Member

    Truth be told, I've thought so too -- but to make it properly, we first need to get #4621 addressed -- I think we have even more such wrappers now (for more examples see e.g. games/dwarf-fortress/dwarf-therapist/wrapper.nix).

  3. zimbatm commented on Feb 21, 2016

    @zimbatm
    Member

    There is also vim_configurable and similar wrappers that try to bundle a config to an executable.

  4. ericsagnes commented on Apr 26, 2016

    @ericsagnes
    ContributorAuthor

    Fixed by #15002

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancement8.has: clean-up9.needs: reporter feedback

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions