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

Add a withPlugins function to the NixOps derivation #1313

Closed
wants to merge 2 commits into from

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Apr 21, 2020

It's a variation of the expression from NixOS/nixpkgs#83548.

With this change you can use the following snippet to build NixOps
with a local plugin:

{ pkgs ? import <nixpkgs> {} }:

let
  nixops = import ./default.nix { inherit pkgs; };
in nixops.withPlugins(ps: [
  (ps.callPackage ./path/to/plugin {})
])

Plugins can have their own dependencies/requirements which may or may not be fulfilled by the package set ps.

It's a variation of the expression from NixOS/nixpkgs#83548.

With this change you can use the following snippet to build NixOps
with a local plugin:
``` nix
{ pkgs ? import <nixpkgs> {} }:

let
  nixops = import ./default.nix { inherit pkgs; };
in nixops.withPlugins(ps: [
  (ps.callPackage ./path/to/plugin {})
])
```
@adisbladis adisbladis marked this pull request as draft April 21, 2020 14:10
@grahamc grahamc added this to To do in kanban Apr 23, 2020
@grahamc grahamc moved this from To do to Done in kanban Apr 23, 2020
@grahamc grahamc moved this from Done to To do in kanban Apr 23, 2020
@adisbladis
Copy link
Member Author

I'm considering whether this can be abstracted in a way that's generic enough to go into poetry2nix so that any Python package ecosystem can be "pluginised".

@adisbladis
Copy link
Member Author

While this is a blocker for 2.0 I don't like this implementation at all.

@adisbladis adisbladis closed this Jun 12, 2020
kanban automation moved this from To do to Done Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
kanban
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant