nixpkgs-suyu/pkgs/os-specific/linux/open-iscsi/default.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf
2018-11-19 13:34:30 +01:00
}:
stdenv.mkDerivation rec {
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 ];
buildInputs = [ kmod open-isns.lib openssl systemd util-linux ];
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=";
};
2018-11-19 13:34:30 +01:00
DESTDIR = "$(out)";
2018-11-19 13:34:30 +01:00
NIX_LDFLAGS = "-lkmod -lsystemd";
NIX_CFLAGS_COMPILE = "-DUSE_KMOD";
preConfigure = ''
sed -i 's|/usr|/|' Makefile
'';
2018-11-19 13:34:30 +01:00
installFlags = [
"install"
"install_systemd"
];
postInstall = ''
cp usr/iscsistart $out/sbin/
for f in $out/lib/systemd/system/*; do
substituteInPlace $f --replace /sbin $out/bin
done
$out/sbin/iscsistart -v
'';
2019-11-29 01:26:52 +01:00
postFixup = ''
sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login
'';
meta = with lib; {
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";
platforms = platforms.linux;
2018-11-19 13:34:30 +01:00
maintainers = with maintainers; [ cleverca22 zaninime ];
};
}