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

45 lines
1.1 KiB
Nix
Raw Normal View History

2018-11-19 12:34:30 +00:00
{ stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
, utillinux, openisns, openssl, kmod, perl, systemd, pkgconf
}:
stdenv.mkDerivation rec {
pname = "open-iscsi";
2020-07-29 07:28:31 +00:00
version = "2.1.2";
2018-11-19 12:34:30 +00:00
nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ];
buildInputs = [ kmod openisns.lib openssl systemd utillinux ];
src = fetchFromGitHub {
owner = "open-iscsi";
repo = "open-iscsi";
2018-11-19 12:34:30 +00:00
rev = version;
2020-07-29 07:28:31 +00:00
sha256 = "0fazf2ighj0akrvcj3jm3kd6wl9lgznvr38g6icwfkqk7bykjkam";
};
2018-11-19 12:34:30 +00:00
DESTDIR = "$(out)";
2018-11-19 12:34:30 +00:00
NIX_LDFLAGS = "-lkmod -lsystemd";
NIX_CFLAGS_COMPILE = "-DUSE_KMOD";
preConfigure = ''
sed -i 's|/usr|/|' Makefile
'';
2018-11-19 12:34:30 +00:00
postInstall = ''
cp usr/iscsistart $out/sbin/
$out/sbin/iscsistart -v
'';
2019-11-29 00:26:52 +00:00
postFixup = ''
sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login
'';
meta = with stdenv.lib; {
description = "A high performance, transport independent, multi-platform implementation of RFC3720";
2018-11-19 12:34:30 +00:00
license = licenses.gpl2;
2020-03-05 13:40:28 +00:00
homepage = "https://www.open-iscsi.com";
platforms = platforms.linux;
2018-11-19 12:34:30 +00:00
maintainers = with maintainers; [ cleverca22 zaninime ];
};
}