nixops-libvirtd icon indicating copy to clipboard operation
nixops-libvirtd copied to clipboard

How to develop on nixops-libvird ?

Open teto opened this issue 6 years ago • 6 comments

I would like to port some of the pull requests from the old repo to the new one. How can I use this plugin in let's say development mode ? with my local nixops clone.

cheers

teto avatar Sep 11 '19 06:09 teto

Copying the discussion from #nixops irc channel:

09:00 aminechikhaoui: testing should be a matter of ./dev-shell --arg p "(p: [ (p.callPackage ../path/to/nixops-libvirtd/release.nix {})])" 09:01 aminechikhaoui: without modifying data.nix 09:02 teto: cool thanks. Will try to port some of my changes to the new plugin

AmineChikhaoui avatar Sep 11 '19 13:09 AmineChikhaoui

running that command:

./dev-shell --arg p "(p: [ (p.callPackage ~/nixops-libvirtd/release.nix {})])"                             
trace: Using plugins: ["/nix/store/5fz5viaigvdkrad0qcwv5dx9ki74v48b-nixops-libvirtd"]

doesn't run libvirtd in develop mode, so I have to rerun the command after each change :/

teto avatar Sep 12 '19 12:09 teto

I've updated to nixops master (not used for the past 6 months ) and ./dev-shell --arg p "(p: [ (p.callPackage /home/teto/nixops-libvirtd/release.nix {})])" seems ineffective ? what's the new way ? can https://github.com/nix-community/nixops-libvirtd/pull/10 help ?

teto avatar Apr 05 '20 18:04 teto

I'm wanting to do this too but there isn't a dev-shell file in the repo. Closest I can see is this equivalent in another repo.

The "hacking" link for this repo unfortunately resolves to an older version of the NixOps docs. The link is correct it's just that it resolves to an older build. The latest versions differs in it's commands.

Running the new commands only results in a version of nixops, it doesn't pull libvirtd in with it, which makes sense. So there's obviously some steps that aren't listed in that link that are required.

adamlwgriffiths avatar Oct 06 '20 07:10 adamlwgriffiths

With the new plugin system it's not clear how one can install NixOps + libvirt. I don't see anything in the NixOps documentation on how to install plugins either.

The released versions of these tools are broken so I'm using a pinned version from Git. However the pinned version I'm using is using libvirt 5.9 which is now flagged in NixOS 20.09 as being disabled for security problems.

The code I have for hacking in an override doesn't work anymore:

  nixops = (super.callPackage "${sources.nixops}/release.nix" {
    p = _: [
      (super.callPackage "${sources.nixops-libvirtd}/release.nix" { })
    ];
  }).build.${super.system};

The NixOps release.nix file has been removed from the repo. The release.nix file in this repo is broken because it references setup.py which no longer exists.

How are people getting a working NixOps with libvirt support?

pjones avatar Feb 22 '21 17:02 pjones

I haven't used nixops the past year but would like to do it again and yes it lacks instructions, Can we add a flake.nix to the repo ? is it just a master of creating a python environment with both nixops and this plugin ?

teto avatar May 27 '21 13:05 teto