diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-01-03 07:15:37 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-01-08 11:42:32 +1000 |
commit | 5e53a3dd200a9ab07699bffecb0d044a6389ab14 (patch) | |
tree | a645127f050a49c7824501af8f22507d0cfd18f1 /pkgs/applications/networking/cluster/terraform-providers | |
parent | 831457debdd3d9d02f2f2ea93e0fc5f5bbd1039a (diff) | |
download | nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar.gz nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar.bz2 nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar.lz nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar.xz nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.tar.zst nixpkgs-5e53a3dd200a9ab07699bffecb0d044a6389ab14.zip |
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
Diffstat (limited to 'pkgs/applications/networking/cluster/terraform-providers')
3 files changed, 14 insertions, 57 deletions
diff --git a/pkgs/applications/networking/cluster/terraform-providers/default.nix b/pkgs/applications/networking/cluster/terraform-providers/default.nix index 0b54b707161..67b7cc9cd7d 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/default.nix @@ -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) { diff --git a/pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix b/pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix deleted file mode 100644 index a2ea7e8008e..00000000000 --- a/pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 484625ff2d1..5ad5ae7d3cc 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -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", |