Skip to content

Commit 36b4d9d

Browse files
lukts30bjornfor
authored andcommitted
libguestfs: 1.50.1 -> 1.54.0
1 parent ba1bfda commit 36b4d9d

File tree

2 files changed

+67
-64
lines changed

2 files changed

+67
-64
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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

pkgs/by-name/li/libguestfs/package.nix

Lines changed: 50 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
jansson,
3636
getopt,
3737
perlPackages,
38-
ocaml-ng,
38+
ocamlPackages,
3939
libtirpc,
4040
appliance ? null,
4141
javaSupport ? false,
@@ -45,17 +45,14 @@
4545

4646
assert appliance == null || lib.isDerivation appliance;
4747

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: {
5349
pname = "libguestfs";
54-
version = "1.50.1";
50+
51+
version = "1.54.0";
5552

5653
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=";
5956
};
6057

6158
strictDeps = true;
@@ -80,72 +77,61 @@ stdenv.mkDerivation rec {
8077
GetoptLong
8178
ModuleBuild
8279
])
83-
++ (with ocamlPackages'; [
80+
++ (with ocamlPackages; [
8481
ocaml
8582
findlib
8683
]);
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;
124115

125116
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
135117
patchShebangs .
136118
'';
137119
configureFlags = [
138120
"--enable-daemon"
139121
"--enable-install-daemon"
140122
"--disable-appliance"
141123
"--with-distro=NixOS"
142-
"--disable-perl" # build broken since 1.53.x
143124
"--with-readline"
144125
"CPPFLAGS=-I${lib.getDev libxml2}/include/libxml2"
145126
"INSTALL_OCAMLLIB=${placeholder "out"}/lib/ocaml"
146127
"--with-guestfs-path=${placeholder "out"}/lib/guestfs"
147128
] ++ 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+
];
149135

150136
createFindlibDestdir = true;
151137

@@ -197,19 +183,19 @@ stdenv.mkDerivation rec {
197183
runHook postInstallCheck
198184
'';
199185

200-
meta = with lib; {
186+
meta = {
201187
description = "Tools for accessing and modifying virtual machine disk images";
202-
license = with licenses; [
188+
license = with lib.licenses; [
203189
gpl2Plus
204190
lgpl21Plus
205191
];
206192
homepage = "https://libguestfs.org/";
207-
maintainers = with maintainers; [
193+
maintainers = with lib.maintainers; [
208194
offline
209195
lukts30
210196
];
211-
platforms = platforms.linux;
197+
platforms = lib.platforms.linux;
212198
# 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;
214200
};
215-
}
201+
})

0 commit comments

Comments
 (0)