git.iko.soy/typeable/nixpkgs
on master help sign in
terraform-provider-libvirt: 0.6.3 -> 0.6.11 (#141779)

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>

commit1cb23458456d395e41de07c084509624ec4886fd authordsx <dsx@droidnest.org> dateTue 2 Nov 2021, 15:27 (5 years ago) parentbd15ad9
1 file changed+18−21
pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix+18−21
pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix+18−21
@@ -1,4 +1,4 @@
1−{ lib, buildGoPackage, fetchFromGitHub, fetchpatch, libvirt, pkg-config, makeWrapper, cdrtools }:
1+{ buildGoModule, cdrtools, fetchFromGitHub, lib, libvirt, makeWrapper, pkg-config }:
22
33# USAGE:
44# install the following package globally or in nix-shell:
@@ -9,33 +9,25 @@
99#
1010# virtualisation.libvirtd.enable = true;
1111#
12−# terraform-provider-libvirt does not manage pools at the moment:
13−#
14−# $ virsh --connect "qemu:///system" pool-define-as default dir - - - - /var/lib/libvirt/images
15−# $ virsh --connect "qemu:///system" pool-start default
16−#
1712# pick an example from (i.e ubuntu):
18−# https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples
19−
20−buildGoPackage rec {
21− pname = "terraform-provider-libvirt";
22− version = "0.6.3";
13+# https://github.com/dmacvicar/terraform-provider-libvirt/tree/main/examples
2314
24− goPackagePath = "github.com/dmacvicar/terraform-provider-libvirt";
15+let
16+ sha256 = "sha256-8GGPd0+qdw7s4cr0RgLoS0Cu4C+RAuuboZzTyYN/kq8=";
17+ vendorSha256 = "sha256-fpO2sGM+VUKLmdfJ9CQfTFnCfxVTK2m9Sirj9oerD/I=";
18+ version = "0.6.11";
19+in buildGoModule {
20+ inherit version;
21+ inherit vendorSha256;
2522
26− patches = [
27− (fetchpatch {
28− name = "base_volume_copy.patch";
29− url = "https://github.com/cyril-s/terraform-provider-libvirt/commit/52df264e8a28c40ce26e2b614ee3daea882931c3.patch";
30− sha256 = "1fg7ii2fi4c93hl41nhcncy9bpw3avbh6yiq99p1vkf87hhrw72n";
31− })
32− ];
23+ pname = "terraform-provider-libvirt";
3324
3425 src = fetchFromGitHub {
26+ inherit sha256;
27+
3528 owner = "dmacvicar";
3629 repo = "terraform-provider-libvirt";
3730 rev = "v${version}";
38− sha256 = "0ak2lpnv6h0i7lzfcggd90jpfhvsasdr6nflkflk2drlcpalggj9";
3931 };
4032
4133 nativeBuildInputs = [ pkg-config makeWrapper ];
@@ -48,7 +40,12 @@ buildGoPackage rec {
4840
4941 # Terraform allow checking the provider versions, but this breaks
5042 # if the versions are not provided via file paths.
51− postBuild = "mv go/bin/terraform-provider-libvirt{,_v${version}}";
43+ postBuild = "mv $GOPATH/bin/terraform-provider-libvirt{,_v${version}}";
44+
45+ ldflags = [ "-X main.version=${version}" ];
46+ passthru.provider-source-address = "registry.terraform.io/dmacvicar/libvirt";
47+
48+ doCheck = false;
5249
5350 meta = with lib; {
5451 homepage = "https://github.com/dmacvicar/terraform-provider-libvirt";