Merge pull request #102983 from marsam/fix-nixops-darwin

nixops: fix build on darwin
This commit is contained in:
Domen Kožar 2020-11-06 06:59:11 +01:00 committed by GitHub
commit 1d78dc8a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

@ -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 [

@ -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";
})
];
})

@ -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 ];