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

nixopsUnstable: 1.7pre2764_932bf4 -> 2.0.0-pre #83548

Merged
merged 2 commits into from Feb 3, 2021

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Mar 27, 2020

Motivation for this change

This is a an early draft of what NixOps 2.0 plugin management could look like based on NixOS/nixops#1256.

This adds a new top-level attribute nixops2Unstable that has a function called withPlugins.

To build NixOps with the AWS plugin enabled (the only one packaged so far) you'd use this expression:

nixops2Unstable.withPlugins (
  ps: [
    ps.nixopsaws
  ]
)

Where ps is the pythonPackages set created for nixops2Unstable.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @grahamc @AmineChikhaoui

adisbladis added a commit to adisbladis/nixops that referenced this pull request 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:
``` nix
{ pkgs ? import <nixpkgs> {} }:

let
  nixops = import ./default.nix { inherit pkgs; };
in nixops.withPlugins(ps: [
  (ps.callPackage ./path/to/plugin {})
])
```
@domenkozar domenkozar mentioned this pull request Apr 22, 2020
10 tasks
@adisbladis adisbladis changed the title nixops2Unstable: init at 1.8.0 nixops2Unstable: init at 2.0.0 Jul 14, 2020
@adisbladis adisbladis marked this pull request as ready for review July 14, 2020 15:29
@tewfik-ghariani
Copy link

Can this PR be reviewed please?

@tewfik-ghariani
Copy link

@adisbladis I was wondering what would be required to build nixops 2.0 in Hydra? Would we need to bring back the 'release.nix'?

@roberth
Copy link
Member

roberth commented Jan 25, 2021

I'd expect these files to go in pkgs/applications/networking/cluster/, alongside terraform and docker-machine.
A clustered networking application isn't super accurate, but at least consistent with similar apps. NixOps certainly isn't a package management tool.

Perhaps it needs a lockfile update because it's been six months

Other than these two things it looks good to me.

@adisbladis
Copy link
Member Author

adisbladis commented Feb 3, 2021

I'd expect these files to go in pkgs/applications/networking/cluster/, alongside terraform and docker-machine.

Indeed that makes more sense. I'll keep the old (nixops1) around where it is, but I'll move this new attribute elsewhere.
Eventually the old one will be removed anyway.

@adisbladis adisbladis changed the title nixops2Unstable: init at 2.0.0 nixopsUnstable: 1.7pre2764_932bf4 -> 2.0.0-pre Feb 3, 2021
@adisbladis adisbladis merged commit 49be013 into NixOS:master Feb 3, 2021
@aanderse
Copy link
Member

aanderse commented Feb 4, 2021

Thank you @adisbladis ❤️

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/tweag-nix-dev-update-7/11552/1

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