2015-10-12 12:27:54 +02:00
|
|
|
{ stdenv, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages
|
|
|
|
, docbook_xsl }:
|
2015-09-24 21:42:06 +02:00
|
|
|
|
|
|
|
let
|
2019-05-13 09:10:57 +02:00
|
|
|
version = "1.0.77";
|
2015-09-24 21:42:06 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "tgt-${version}";
|
2016-04-13 04:58:54 +02:00
|
|
|
|
2015-09-24 21:42:06 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fujita";
|
|
|
|
repo = "tgt";
|
2016-04-13 04:58:54 +02:00
|
|
|
rev = "v${version}";
|
2019-05-13 09:10:57 +02:00
|
|
|
sha256 = "1qhck8v5057wn9nb1nsq6dzhvqzz51x8i3n0p1x36zbsmdjy2ajw";
|
2015-09-24 21:42:06 +02:00
|
|
|
};
|
|
|
|
|
2015-10-12 12:27:54 +02:00
|
|
|
buildInputs = [ libxslt systemd libaio docbook_xsl ];
|
2015-09-24 21:42:06 +02:00
|
|
|
|
2018-12-22 22:29:54 +01:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SD_NOTIFY=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
|
|
|
];
|
2015-09-24 21:42:06 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|/usr/bin/||' doc/Makefile
|
|
|
|
sed -i 's|/usr/include/libaio.h|${libaio}/include/libaio.h|' usr/Makefile
|
2016-08-30 02:11:09 +02:00
|
|
|
sed -i 's|/usr/include/sys/|${stdenv.glibc.dev}/include/sys/|' usr/Makefile
|
|
|
|
sed -i 's|/usr/include/linux/|${stdenv.glibc.dev}/include/linux/|' usr/Makefile
|
2015-09-24 21:42:06 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -i 's|#!/usr/bin/perl|#! ${perl}/bin/perl -I${perlPackages.ConfigGeneral}/${perl.libPrefix}|' $out/sbin/tgt-admin
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2016-04-13 04:58:54 +02:00
|
|
|
|
2015-09-24 21:42:06 +02:00
|
|
|
meta = {
|
|
|
|
description = "iSCSI Target daemon with rdma support";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
2015-10-12 12:27:54 +02:00
|
|
|
}
|