Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbdkit: init at 1.40.4 #345918

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions pkgs/by-name/nb/nbdkit/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
stdenv,
testers,
fetchurl,
autoreconfHook,
makeWrapper,
pkg-config,
bash-completion,
gnutls,
libtool,
curl,
xz,
zlib-ng,
libssh,
libnbd,
lib,
cdrkit,
e2fsprogs,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "nbdkit";
version = "1.40.4";

src = fetchurl {
url = "https://download.libguestfs.org/nbdkit/${lib.versions.majorMinor finalAttrs.version}-stable/nbdkit-${finalAttrs.version}.tar.gz";
hash = "sha256-hGoc34F7eAvHjdQHxcquNJhpwpL5CLfv2DBZKVmpcpw=";
};

prePatch = ''
patchShebangs .
'';

strictDeps = true;

nativeBuildInputs = [
bash-completion
autoreconfHook
makeWrapper
pkg-config
e2fsprogs # for Autoconf: xorriso, mkisofs
cdrkit # for Autoconf: mke2fs
];

buildInputs = [
bash-completion
gnutls
libtool
curl
xz
zlib-ng
libssh
libnbd
e2fsprogs
];

configureFlags = [
"--enable-linuxdisk"
"--enable-floppy"
"--with-ext2"
"--with-curl"
"--with-iso"
"--with-ssh"
"--with-zlib"
"--with-libnbd"
"--disable-rust"
"--disable-golang"
"--disable-perl"
"--disable-ocaml"
"--disable-tcl"
"--disable-lua"
"--without-libguestfs"
"--disable-example4"
];

installFlags = [ "bashcompdir=$(out)/share/bash-completion/completions" ];

postInstall = ''
for bin in $out/bin/*; do
wrapProgram "$bin" \
--prefix PATH : "$out/bin:${
lib.makeBinPath [
e2fsprogs
cdrkit
]
}"
done
'';

passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };

meta = {
homepage = "https://gitlab.com/nbdkit/nbdkit";
description = "NBD server with stable plugin ABI and permissive license";
license = with lib.licenses; bsd3;
maintainers = with lib.maintainers; [ lukts30 ];
platforms = lib.platforms.unix;
mainProgram = "nbdkit";
};
})