tgt: Install systemd tgtd.service (#65565)
* tgt: Add homepage * tgt: tgt-admin needs lsof, sg3_utils and tgtadm Otherwise it fails with return code 72057594037927935. * tgt: libxslt and docbook_xsl not needed at runtime They're only there to build the documentation. * tgt: Install systemd tgtd.service Resolves #38012 * tgt: Add JohnAZoidberg as maintainer
This commit is contained in:
parent
4107e208a1
commit
2f5beaec08
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages
|
{ stdenv, lib, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages
|
||||||
, docbook_xsl }:
|
, docbook_xsl, coreutils, lsof, rdma-core, makeWrapper, sg3_utils, utillinux
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tgt";
|
pname = "tgt";
|
||||||
@ -12,7 +13,9 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "18bp7fcpv7879q3ppdxlqj7ayqmlh5zwrkz8gch6rq9lkmmrklrf";
|
sha256 = "18bp7fcpv7879q3ppdxlqj7ayqmlh5zwrkz8gch6rq9lkmmrklrf";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libxslt systemd libaio docbook_xsl ];
|
nativeBuildInputs = [ libxslt docbook_xsl makeWrapper ];
|
||||||
|
|
||||||
|
buildInputs = [ systemd libaio ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
@ -31,14 +34,26 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
sed -i 's|#!/usr/bin/perl|#! ${perl}/bin/perl -I${perlPackages.ConfigGeneral}/${perl.libPrefix}|' $out/sbin/tgt-admin
|
substituteInPlace $out/sbin/tgt-admin \
|
||||||
|
--replace "#!/usr/bin/perl" "#! ${perl}/bin/perl -I${perlPackages.ConfigGeneral}/${perl.libPrefix}"
|
||||||
|
wrapProgram $out/sbin/tgt-admin --prefix PATH : \
|
||||||
|
${lib.makeBinPath [ lsof sg3_utils (placeholder "out") ]}
|
||||||
|
|
||||||
|
install -D scripts/tgtd.service $out/etc/systemd/system/tgtd.service
|
||||||
|
substituteInPlace $out/etc/systemd/system/tgtd.service \
|
||||||
|
--replace "/usr/sbin/tgt" "$out/bin/tgt"
|
||||||
|
|
||||||
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=848942
|
||||||
|
sed -i '/ExecStart=/a ExecStartPost=${coreutils}/bin/sleep 5' $out/etc/systemd/system/tgtd.service
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "iSCSI Target daemon with rdma support";
|
description = "iSCSI Target daemon with RDMA support";
|
||||||
license = stdenv.lib.licenses.gpl2;
|
homepage = "http://stgt.sourceforge.net/";
|
||||||
platforms = stdenv.lib.platforms.linux;
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ johnazoidberg ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user