From 981e163aa345f8435cf11a534c73c41ad008d736 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 5 Nov 2020 04:20:00 +0000 Subject: [PATCH 1/2] nixops: fix build on darwin --- pkgs/development/libraries/libvirt/5.9.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libvirt/5.9.0.nix b/pkgs/development/libraries/libvirt/5.9.0.nix index 722c4a53b8fa..7a023d9489ed 100644 --- a/pkgs/development/libraries/libvirt/5.9.0.nix +++ b/pkgs/development/libraries/libvirt/5.9.0.nix @@ -36,12 +36,12 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper pkgconfig rpcsvc-proto ]; buildInputs = [ libxml2 gnutls perl python2 readline gettext libtasn1 libgcrypt yajl - libxslt xhtml1 perlPackages.XMLXPath curl libpcap glib libtirpc + libxslt xhtml1 perlPackages.XMLXPath curl libpcap glib ] ++ optionals (!buildFromTarball) [ libtool autoconf automake ] ++ optionals stdenv.isLinux [ libpciaccess lvm2 utillinux systemd libnl numad zfs - libapparmor libcap_ng numactl attr parted + libapparmor libcap_ng numactl attr parted libtirpc ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [ xen ] ++ optionals enableIscsi [ From 94a810c56d54882577711ecbdd3c4b0838ec8c65 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 5 Nov 2020 04:20:00 +0000 Subject: [PATCH 2/2] nixops: add patch to follow redirects in nixos-infect --- pkgs/tools/package-management/nixops/default.nix | 9 ++++++++- pkgs/tools/package-management/nixops/generic.nix | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nixops/default.nix b/pkgs/tools/package-management/nixops/default.nix index c761a3a47793..96e6ec3f55a0 100644 --- a/pkgs/tools/package-management/nixops/default.nix +++ b/pkgs/tools/package-management/nixops/default.nix @@ -1,4 +1,4 @@ -{ callPackage, fetchurl }: +{ callPackage, fetchurl, fetchpatch }: callPackage ./generic.nix (rec { version = "1.7"; @@ -6,4 +6,11 @@ callPackage ./generic.nix (rec { url = "https://nixos.org/releases/nixops/nixops-${version}/nixops-${version}.tar.bz2"; sha256 = "091c0b5bca57d4aa20be20e826ec161efe3aec9c788fbbcf3806a734a517f0f3"; }; + patches = [ + # follow redirect in nixos-infect. Remove with the next release. + (fetchpatch { + url = "https://github.com/NixOS/nixops/commit/fb6d4665e8efd858a215bbaaf079ec3f5ebc49b8.patch"; + sha256 = "1hbhykl811zsqlaj3y5m9d8lfsal6ps6n5p16ah6lqy2s18ap9d0"; + }) + ]; }) diff --git a/pkgs/tools/package-management/nixops/generic.nix b/pkgs/tools/package-management/nixops/generic.nix index 59d139d28847..564256de35d1 100644 --- a/pkgs/tools/package-management/nixops/generic.nix +++ b/pkgs/tools/package-management/nixops/generic.nix @@ -2,11 +2,12 @@ # version args , src, version , meta ? {} +, patches ? null }: python2Packages.buildPythonApplication { name = "nixops-${version}"; - inherit version src; + inherit version src patches; buildInputs = [ libxslt ];