terraform-providers.libvirt: remove separate derivation, add override for cdrtools
since 0.6.10 it doesn't link against libvirt and is distibuted on the terraform registry https://github.com/dmacvicar/terraform-provider-libvirt/releases/tag/v0.6.10
This commit is contained in:
parent
831457debd
commit
5e53a3dd20
3 changed files with 14 additions and 57 deletions
|
@ -3,6 +3,8 @@
|
|||
, fetchFromGitHub
|
||||
, callPackage
|
||||
, config
|
||||
|
||||
, cdrtools # libvirt
|
||||
}:
|
||||
let
|
||||
list = lib.importJSON ./providers.json;
|
||||
|
@ -41,7 +43,9 @@ let
|
|||
special-providers = let archived = throw "the provider has been archived by upstream"; in {
|
||||
# Packages that don't fit the default model
|
||||
gandi = callPackage ./gandi { };
|
||||
libvirt = callPackage ./libvirt { };
|
||||
# mkisofs needed to create ISOs holding cloud-init data,
|
||||
# and wrapped to terraform via deecb4c1aab780047d79978c636eeb879dd68630
|
||||
libvirt = automated-providers.libvirt.overrideAttrs (_: { propagatedBuildInputs = [ cdrtools ]; });
|
||||
teleport = callPackage ./teleport { };
|
||||
vpsadmin = callPackage ./vpsadmin { };
|
||||
} // (lib.optionalAttrs (config.allowAliases or false) {
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
{ buildGoModule, cdrtools, fetchFromGitHub, lib, libvirt, makeWrapper, pkg-config }:
|
||||
|
||||
# USAGE:
|
||||
# install the following package globally or in nix-shell:
|
||||
#
|
||||
# (terraform.withPlugins (p: [p.libvirt]))
|
||||
#
|
||||
# configuration.nix:
|
||||
#
|
||||
# virtualisation.libvirtd.enable = true;
|
||||
#
|
||||
# pick an example from (i.e ubuntu):
|
||||
# https://github.com/dmacvicar/terraform-provider-libvirt/tree/main/examples
|
||||
|
||||
let
|
||||
sha256 = "sha256-1l+ARrXHxtSdnQfYV/6gw3BYHVH8NN4pi+Ttk1nwF88=";
|
||||
vendorSha256 = "sha256-OJa8pQgf5PlECZZkFV9fyCOdh6CrregY1BWycx7JPFE=";
|
||||
version = "0.6.12";
|
||||
in buildGoModule {
|
||||
inherit version;
|
||||
inherit vendorSha256;
|
||||
|
||||
pname = "terraform-provider-libvirt";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit sha256;
|
||||
|
||||
owner = "dmacvicar";
|
||||
repo = "terraform-provider-libvirt";
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
|
||||
buildInputs = [ libvirt ];
|
||||
|
||||
# mkisofs needed to create ISOs holding cloud-init data,
|
||||
# and wrapped to terraform via deecb4c1aab780047d79978c636eeb879dd68630
|
||||
propagatedBuildInputs = [ cdrtools ];
|
||||
|
||||
# Terraform allow checking the provider versions, but this breaks
|
||||
# if the versions are not provided via file paths.
|
||||
postBuild = "mv $GOPATH/bin/terraform-provider-libvirt{,_v${version}}";
|
||||
|
||||
ldflags = [ "-X main.version=${version}" ];
|
||||
passthru.provider-source-address = "registry.terraform.io/dmacvicar/libvirt";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/dmacvicar/terraform-provider-libvirt";
|
||||
description = "Terraform provider for libvirt";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
};
|
||||
}
|
|
@ -579,6 +579,15 @@
|
|||
"vendorSha256": "05gx87dwh49zc5mlqnzcqn46pjf9q4wsv9l15pjr3spczzi11cnz",
|
||||
"version": "2.2.0"
|
||||
},
|
||||
"libvirt": {
|
||||
"owner": "dmacvicar",
|
||||
"provider-source-address": "registry.terraform.io/dmacvicar/libvirt",
|
||||
"repo": "terraform-provider-libvirt",
|
||||
"rev": "v0.6.12",
|
||||
"sha256": "1kqpy1cr7vg4iclxwd7wa4fmhw63l3z5gn07knfx9in7nm380pyn",
|
||||
"vendorSha256": "0l9wr4g77chmshcfibdbl23rs8y8bxgiar4n152gkr0z12jvr5iq",
|
||||
"version": "0.6.12"
|
||||
},
|
||||
"linode": {
|
||||
"owner": "linode",
|
||||
"provider-source-address": "registry.terraform.io/linode/linode",
|
||||
|
|
Loading…
Reference in a new issue