mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
33b2ad57c8
autotools -> meson > support for make/autoconf is still in place but is deprecated - https://github.com/open-iscsi/open-iscsi/releases/tag/2.1.8
68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, meson
|
|
, pkg-config
|
|
, ninja
|
|
, perl
|
|
, util-linux
|
|
, open-isns
|
|
, openssl
|
|
, kmod
|
|
, systemd
|
|
, runtimeShell
|
|
, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "open-iscsi";
|
|
version = "2.1.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-iscsi";
|
|
repo = "open-iscsi";
|
|
rev = version;
|
|
hash = "sha256-JzSyX9zvUkhCEpNwTMneTZpCRgaYxHZ1wP215YnMI78=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
pkg-config
|
|
ninja
|
|
perl
|
|
];
|
|
buildInputs = [
|
|
kmod
|
|
(lib.getLib open-isns)
|
|
openssl
|
|
systemd
|
|
util-linux
|
|
];
|
|
|
|
preConfigure = ''
|
|
patchShebangs .
|
|
'';
|
|
|
|
prePatch = ''
|
|
substituteInPlace etc/systemd/iscsi-init.service.template \
|
|
--replace /usr/bin/sh ${runtimeShell}
|
|
sed -i '/install_dir: db_root/d' meson.build
|
|
'';
|
|
|
|
mesonFlags = [
|
|
"-Discsi_sbindir=${placeholder "out"}/sbin"
|
|
"-Drulesdir=${placeholder "out"}/etc/udev/rules.d"
|
|
"-Dsystemddir=${placeholder "out"}/lib/systemd"
|
|
"-Ddbroot=/etc/iscsi"
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; };
|
|
|
|
meta = with lib; {
|
|
description = "A high performance, transport independent, multi-platform implementation of RFC3720";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://www.open-iscsi.com";
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ cleverca22 zaninime ];
|
|
};
|
|
}
|