3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/tgt/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages
, docbook_xsl }:
2015-09-24 20:42:06 +01:00
let
version = "1.0.75";
2015-09-24 20:42:06 +01:00
in stdenv.mkDerivation rec {
name = "tgt-${version}";
2016-04-13 03:58:54 +01:00
2015-09-24 20:42:06 +01:00
src = fetchFromGitHub {
owner = "fujita";
repo = "tgt";
2016-04-13 03:58:54 +01:00
rev = "v${version}";
sha256 = "008x7xz49fnqi91hw4nim4f25gp5qyjgzxfikmj7gz81mh4hhamj";
2015-09-24 20:42:06 +01:00
};
buildInputs = [ libxslt systemd libaio docbook_xsl ];
2015-09-24 20:42:06 +01:00
2018-12-22 21:29:54 +00:00
makeFlags = [
"PREFIX=${placeholder "out"}"
"SD_NOTIFY=1"
];
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
];
2015-09-24 20:42:06 +01:00
preConfigure = ''
sed -i 's|/usr/bin/||' doc/Makefile
sed -i 's|/usr/include/libaio.h|${libaio}/include/libaio.h|' usr/Makefile
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 20:42:06 +01: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 03:58:54 +01:00
2015-09-24 20:42:06 +01:00
meta = {
description = "iSCSI Target daemon with rdma support";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}