python3Packages.libnbd: init at 1.18.2 (#313358)
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
This commit is contained in:
parent
d0babee7c4
commit
a8e75ef7d4
@ -4,6 +4,7 @@
|
||||
, bash-completion
|
||||
, pkg-config
|
||||
, perl
|
||||
, buildPythonBindings ? false, python3
|
||||
, libxml2
|
||||
, fuse
|
||||
, fuse3
|
||||
@ -23,7 +24,8 @@ stdenv.mkDerivation rec {
|
||||
bash-completion
|
||||
pkg-config
|
||||
perl
|
||||
];
|
||||
]
|
||||
++ lib.optionals buildPythonBindings [ python3 ];
|
||||
|
||||
buildInputs = [
|
||||
fuse
|
||||
@ -32,8 +34,16 @@ stdenv.mkDerivation rec {
|
||||
libxml2
|
||||
];
|
||||
|
||||
configureFlags = lib.optionals buildPythonBindings [ "--with-python-installdir=${placeholder "out"}/${python3.sitePackages}" ];
|
||||
|
||||
installFlags = [ "bashcompdir=$(out)/share/bash-completion/completions" ];
|
||||
|
||||
postInstall = lib.optionalString buildPythonBindings ''
|
||||
LIBNBD_PYTHON_METADATA='${placeholder "out"}/${python3.sitePackages}/nbd-${version}.dist-info/METADATA'
|
||||
install -Dm644 -T ${./libnbd-metadata} $LIBNBD_PYTHON_METADATA
|
||||
substituteAllInPlace $LIBNBD_PYTHON_METADATA
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.com/nbdkit/libnbd";
|
||||
description = "Network Block Device client library in userspace";
|
||||
@ -59,5 +69,4 @@ stdenv.mkDerivation rec {
|
||||
}
|
||||
# TODO: package the 1.6-stable version too
|
||||
# TODO: git version needs ocaml
|
||||
# TODO: bindings for go, ocaml and python
|
||||
|
||||
# TODO: bindings for go and ocaml
|
||||
|
3
pkgs/development/libraries/libnbd/libnbd-metadata
Normal file
3
pkgs/development/libraries/libnbd/libnbd-metadata
Normal file
@ -0,0 +1,3 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: nbd
|
||||
Version: @version@
|
@ -6694,6 +6694,11 @@ self: super: with self; {
|
||||
inherit (pkgs) libsodium;
|
||||
};
|
||||
|
||||
libnbd = toPythonModule (pkgs.libnbd.override {
|
||||
buildPythonBindings = true;
|
||||
python3 = python;
|
||||
});
|
||||
|
||||
libpcap = callPackage ../development/python-modules/libpcap {
|
||||
pkgsLibpcap = pkgs.libpcap; # Needs the C library
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user