libguestfs: 1.50.1 -> 1.54.0

authored by lukts30 and committed by Bjørn Forsman 36b4d9db ba1bfda1

+67 -64
+17
pkgs/by-name/li/libguestfs/Revert-perl-Pass-CFLAGS-through-extra_linker_flags.patch
··· 1 + Subject: [PATCH] Revert "perl: Pass @CFLAGS@ through extra_linker_flags" 2 + 3 + This reverts commit be06cb048b595200bf7d1cec9684ab7958188b97. 4 + --- 5 + --- a/perl/Build.PL.in 6 + +++ b/perl/Build.PL.in 7 + @@ -65,8 +65,6 @@ my $build = Module::Build->new ( 8 + '@top_srcdir@/include', 9 + ], 10 + extra_linker_flags => [ 11 + - '-DGUESTFS_PRIVATE=1', 12 + - split (' ', '@CFLAGS@'), 13 + '-L@top_builddir@/lib/.libs', 14 + '-lguestfs', 15 + ], 16 + -- 17 + 2.44.1
+50 -64
pkgs/by-name/li/libguestfs/package.nix
··· 35 35 jansson, 36 36 getopt, 37 37 perlPackages, 38 - ocaml-ng, 38 + ocamlPackages, 39 39 libtirpc, 40 40 appliance ? null, 41 41 javaSupport ? false, ··· 45 45 46 46 assert appliance == null || lib.isDerivation appliance; 47 47 48 - let 49 - # GetoptLong not avaible with newer ocaml 50 - ocamlPackages' = ocaml-ng.ocamlPackages_4_14; 51 - in 52 - stdenv.mkDerivation rec { 48 + stdenv.mkDerivation (finalAttrs: { 53 49 pname = "libguestfs"; 54 - version = "1.50.1"; 50 + 51 + version = "1.54.0"; 55 52 56 53 src = fetchurl { 57 - url = "https://libguestfs.org/download/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz"; 58 - sha256 = "sha256-Xmhx6I+C5SHjHUQt5qELZJcCN8t5VumdEXsSO1hWWm8="; 54 + url = "https://libguestfs.org/download/${lib.versions.majorMinor finalAttrs.version}-stable/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; 55 + sha256 = "sha256-tK+g+P1YAgXqVUjUaLxuQ8O+y5leL2DmMmVSemMFQkY="; 59 56 }; 60 57 61 58 strictDeps = true; ··· 80 77 GetoptLong 81 78 ModuleBuild 82 79 ]) 83 - ++ (with ocamlPackages'; [ 80 + ++ (with ocamlPackages; [ 84 81 ocaml 85 82 findlib 86 83 ]); 87 - buildInputs = 88 - [ 89 - libxcrypt 90 - ncurses 91 - jansson 92 - pcre2 93 - augeas 94 - libxml2 95 - acl 96 - libcap 97 - libcap_ng 98 - libconfig 99 - systemdLibs 100 - fuse 101 - yajl 102 - libvirt 103 - gmp 104 - readline 105 - file 106 - hivex 107 - db 108 - numactl 109 - libapparmor 110 - perlPackages.ModuleBuild 111 - libtirpc 112 - ] 113 - ++ (with ocamlPackages'; [ 114 - ocamlbuild 115 - ocaml_libvirt 116 - gettext-stub 117 - ounit 118 - ]) 119 - ++ [ 120 - ocamlPackages'.augeas 121 - (hivex.override { ocamlPackages = ocamlPackages'; }) 122 - ] 123 - ++ lib.optional javaSupport jdk; 84 + buildInputs = [ 85 + libxcrypt 86 + ncurses 87 + jansson 88 + pcre2 89 + augeas 90 + libxml2 91 + acl 92 + libcap 93 + libcap_ng 94 + libconfig 95 + systemdLibs 96 + fuse 97 + yajl 98 + libvirt 99 + gmp 100 + readline 101 + file 102 + hivex 103 + db 104 + numactl 105 + libapparmor 106 + perlPackages.ModuleBuild 107 + libtirpc 108 + zstd 109 + ocamlPackages.ocamlbuild 110 + ocamlPackages.ocaml_libvirt 111 + ocamlPackages.ounit 112 + ocamlPackages.augeas 113 + ocamlPackages.ocamlbuild 114 + ] ++ lib.optional javaSupport jdk; 124 115 125 116 prePatch = '' 126 - # build-time scripts 127 - substituteInPlace run.in --replace '#!/bin/bash' '#!${stdenv.shell}' 128 - substituteInPlace ocaml-link.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}' 129 - 130 - # $(OCAMLLIB) is read-only "${ocamlPackages'.ocaml}/lib/ocaml" 131 - substituteInPlace ocaml/Makefile.am --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml' 132 - substituteInPlace ocaml/Makefile.in --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml' 133 - 134 - # some scripts hardcore /usr/bin/env which is not available in the build env 135 117 patchShebangs . 136 118 ''; 137 119 configureFlags = [ ··· 139 121 "--enable-install-daemon" 140 122 "--disable-appliance" 141 123 "--with-distro=NixOS" 142 - "--disable-perl" # build broken since 1.53.x 143 124 "--with-readline" 144 125 "CPPFLAGS=-I${lib.getDev libxml2}/include/libxml2" 145 126 "INSTALL_OCAMLLIB=${placeholder "out"}/lib/ocaml" 146 127 "--with-guestfs-path=${placeholder "out"}/lib/guestfs" 147 128 ] ++ lib.optionals (!javaSupport) [ "--without-java" ]; 148 - patches = [ ./libguestfs-syms.patch ]; 129 + 130 + patches = [ 131 + ./libguestfs-syms.patch 132 + # Fixes PERL Sys-Guestfs build failure 133 + ./Revert-perl-Pass-CFLAGS-through-extra_linker_flags.patch 134 + ]; 149 135 150 136 createFindlibDestdir = true; 151 137 ··· 197 183 runHook postInstallCheck 198 184 ''; 199 185 200 - meta = with lib; { 186 + meta = { 201 187 description = "Tools for accessing and modifying virtual machine disk images"; 202 - license = with licenses; [ 188 + license = with lib.licenses; [ 203 189 gpl2Plus 204 190 lgpl21Plus 205 191 ]; 206 192 homepage = "https://libguestfs.org/"; 207 - maintainers = with maintainers; [ 193 + maintainers = with lib.maintainers; [ 208 194 offline 209 195 lukts30 210 196 ]; 211 - platforms = platforms.linux; 197 + platforms = lib.platforms.linux; 212 198 # this is to avoid "output size exceeded" 213 - hydraPlatforms = if appliance != null then appliance.meta.hydraPlatforms else platforms.linux; 199 + hydraPlatforms = if appliance != null then appliance.meta.hydraPlatforms else lib.platforms.linux; 214 200 }; 215 - } 201 + })