nixpkgs/pkgs/tools/networking/tgt/default.nix
R. RyanTM 814c68a503 tgt: 1.0.73 -> 1.0.74
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/tgt/versions
2018-11-08 11:00:39 -08:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages
, docbook_xsl }:
let
version = "1.0.74";
in stdenv.mkDerivation rec {
name = "tgt-${version}";
src = fetchFromGitHub {
owner = "fujita";
repo = "tgt";
rev = "v${version}";
sha256 = "1k146w49dda77fd8frmc0nyr07ca1wh5vcw59fjid6knaj9vgck5";
};
buildInputs = [ libxslt systemd libaio docbook_xsl ];
DESTDIR = "$(out)";
PREFIX = "/";
SD_NOTIFY="1";
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
'';
postInstall = ''
sed -i 's|#!/usr/bin/perl|#! ${perl}/bin/perl -I${perlPackages.ConfigGeneral}/${perl.libPrefix}|' $out/sbin/tgt-admin
'';
enableParallelBuilding = true;
meta = {
description = "iSCSI Target daemon with rdma support";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}