2022-10-27 23:17:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, pkg-config
|
|
|
|
, ninja
|
|
|
|
, perl
|
|
|
|
, util-linux
|
|
|
|
, open-isns
|
|
|
|
, openssl
|
|
|
|
, kmod
|
|
|
|
, systemd
|
|
|
|
, runtimeShell
|
|
|
|
, nixosTests }:
|
2018-11-19 12:34:30 +00:00
|
|
|
|
2016-04-24 12:37:38 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "open-iscsi";
|
2022-10-27 23:17:52 +00:00
|
|
|
version = "2.1.8";
|
2015-10-21 03:58:33 +00:00
|
|
|
|
2016-04-24 12:37:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "open-iscsi";
|
|
|
|
repo = "open-iscsi";
|
2018-11-19 12:34:30 +00:00
|
|
|
rev = version;
|
2022-10-27 23:17:52 +00:00
|
|
|
hash = "sha256-JzSyX9zvUkhCEpNwTMneTZpCRgaYxHZ1wP215YnMI78=";
|
2010-08-30 09:40:44 +00:00
|
|
|
};
|
2018-11-19 12:34:30 +00:00
|
|
|
|
2022-10-27 23:17:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
ninja
|
|
|
|
perl
|
2022-06-15 22:01:51 +00:00
|
|
|
];
|
2022-10-27 23:17:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
kmod
|
|
|
|
(lib.getLib open-isns)
|
|
|
|
openssl
|
|
|
|
systemd
|
|
|
|
util-linux
|
2020-11-04 08:30:03 +00:00
|
|
|
];
|
|
|
|
|
2022-10-27 23:17:52 +00:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs .
|
2015-10-21 03:58:33 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-27 23:17:52 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace etc/systemd/iscsi-init.service.template \
|
|
|
|
--replace /usr/bin/sh ${runtimeShell}
|
|
|
|
sed -i '/install_dir: db_root/d' meson.build
|
2019-11-29 00:26:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-27 23:17:52 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Discsi_sbindir=${placeholder "out"}/sbin"
|
|
|
|
"-Drulesdir=${placeholder "out"}/etc/udev/rules.d"
|
|
|
|
"-Dsystemddir=${placeholder "out"}/lib/systemd"
|
|
|
|
"-Ddbroot=/etc/iscsi"
|
|
|
|
];
|
|
|
|
|
2022-01-23 20:08:10 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2012-02-17 14:32:28 +00:00
|
|
|
description = "A high performance, transport independent, multi-platform implementation of RFC3720";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-03-05 13:40:28 +00:00
|
|
|
homepage = "https://www.open-iscsi.com";
|
2016-02-29 16:37:20 +00:00
|
|
|
platforms = platforms.linux;
|
2018-11-19 12:34:30 +00:00
|
|
|
maintainers = with maintainers; [ cleverca22 zaninime ];
|
2010-08-30 09:40:44 +00:00
|
|
|
};
|
|
|
|
}
|