summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iscsitarget/default.nix
blob: 214fae01cfcc8ab6967053b9af6a1af93bb5ecc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ stdenv, fetchurl, kernel, module_init_tools}:

stdenv.mkDerivation rec {
  name = "iscsitarget-1.4.20.2-${kernel.version}";
  
  src = fetchurl {
    url = "mirror://sourceforge/iscsitarget/iscsitarget/1.4.20.2/${name}.tar.gz";
    sha256 = "126kp0yc7vmvdbaw2xfav89340b0h91dvvyib5qbvyrq40n8wg0g";
  };
  
  KSRC = "${kernel}/lib/modules/*/build";
  
  DESTDIR = "$(out)";
  
  preConfigure = ''
    export PATH=$PATH:${module_init_tools}/sbin
    sed -i 's|/usr/|/|' Makefile
  '';
  
  buildInputs = [ module_init_tools ];
  
  meta = {
    description = "iSCSI Enterprise Target (IET), software for building an iSCSI storage system on Linux";
    license = "GPLv2+";
    homepage = http://iscsitarget.sourceforge.net;
  };
}