3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #10503 from cleverca22/master

open-iscsi: save the staticly linked binary in its own output for use in the initrd
This commit is contained in:
Arseniy Seroka 2015-10-27 00:57:29 +03:00
commit 12277d2a38

View file

@ -1,8 +1,11 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, nukeReferences }:
let let
pname = "open-iscsi-2.0-873"; pname = "open-iscsi-2.0-873";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "${pname}"; name = "${pname}";
outputs = [ "out" "iscsistart" ];
buildInputs = [ nukeReferences ];
src = fetchurl { src = fetchurl {
url = "http://www.open-iscsi.org/bits/${pname}.tar.gz"; url = "http://www.open-iscsi.org/bits/${pname}.tar.gz";
@ -15,6 +18,12 @@ in stdenv.mkDerivation {
sed -i 's|/usr/|/|' Makefile sed -i 's|/usr/|/|' Makefile
''; '';
postInstall = ''
mkdir -pv $iscsistart/bin/
cp -v usr/iscsistart $iscsistart/bin/
nuke-refs $iscsistart/bin/iscsistart
'';
meta = { meta = {
description = "A high performance, transport independent, multi-platform implementation of RFC3720"; description = "A high performance, transport independent, multi-platform implementation of RFC3720";
license = stdenv.lib.licenses.gpl2Plus; license = stdenv.lib.licenses.gpl2Plus;