2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
|
2021-01-28 12:53:10 +01:00
|
|
|
, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf
|
2018-11-19 13:34:30 +01:00
|
|
|
}:
|
|
|
|
|
2016-04-24 14:37:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "open-iscsi";
|
2021-03-14 16:09:13 +01:00
|
|
|
version = "2.1.4";
|
2018-11-19 13:34:30 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ];
|
2021-01-28 12:53:10 +01:00
|
|
|
buildInputs = [ kmod open-isns.lib openssl systemd util-linux ];
|
2015-10-21 05:58:33 +02:00
|
|
|
|
2016-04-24 14:37:38 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "open-iscsi";
|
|
|
|
repo = "open-iscsi";
|
2018-11-19 13:34:30 +01:00
|
|
|
rev = version;
|
2021-03-14 16:09:13 +01:00
|
|
|
sha256 = "sha256-HnvLLwxOnu7Oiige6A6zk9NmAI2ImcILp9eCfbdGiyI=";
|
2010-08-30 11:40:44 +02:00
|
|
|
};
|
2018-11-19 13:34:30 +01:00
|
|
|
|
2012-02-17 15:32:28 +01:00
|
|
|
DESTDIR = "$(out)";
|
2018-11-19 13:34:30 +01:00
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lkmod -lsystemd";
|
2016-04-24 14:52:13 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-DUSE_KMOD";
|
|
|
|
|
2010-08-30 11:40:44 +02:00
|
|
|
preConfigure = ''
|
2016-04-30 20:28:11 +02:00
|
|
|
sed -i 's|/usr|/|' Makefile
|
2010-08-30 11:40:44 +02:00
|
|
|
'';
|
2018-11-19 13:34:30 +01:00
|
|
|
|
2020-11-04 09:30:03 +01:00
|
|
|
installFlags = [
|
|
|
|
"install"
|
|
|
|
"install_systemd"
|
|
|
|
];
|
|
|
|
|
2015-10-21 05:58:33 +02:00
|
|
|
postInstall = ''
|
2016-04-30 20:28:11 +02:00
|
|
|
cp usr/iscsistart $out/sbin/
|
2020-11-04 09:30:03 +01:00
|
|
|
for f in $out/lib/systemd/system/*; do
|
|
|
|
substituteInPlace $f --replace /sbin $out/bin
|
|
|
|
done
|
2016-04-30 20:28:11 +02:00
|
|
|
$out/sbin/iscsistart -v
|
2015-10-21 05:58:33 +02:00
|
|
|
'';
|
|
|
|
|
2019-11-29 01:26:52 +01:00
|
|
|
postFixup = ''
|
|
|
|
sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2012-02-17 15:32:28 +01:00
|
|
|
description = "A high performance, transport independent, multi-platform implementation of RFC3720";
|
2021-01-09 11:05:03 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-03-05 14:40:28 +01:00
|
|
|
homepage = "https://www.open-iscsi.com";
|
2016-02-29 17:37:20 +01:00
|
|
|
platforms = platforms.linux;
|
2018-11-19 13:34:30 +01:00
|
|
|
maintainers = with maintainers; [ cleverca22 zaninime ];
|
2010-08-30 11:40:44 +02:00
|
|
|
};
|
|
|
|
}
|