2021-02-05 17:12:51 +00:00
{ lib , stdenv , fetchFromGitHub , autoreconfHook }:
stdenv . mkDerivation rec {
pname = " l i b i s c s i " ;
2024-04-21 15:54:59 +00:00
version = " 1 . 2 0 . 0 " ;
2021-02-05 17:12:51 +00:00
src = fetchFromGitHub {
owner = " s a h l b e r g " ;
repo = " l i b i s c s i " ;
rev = version ;
2024-04-21 15:54:59 +00:00
sha256 = " s h a 2 5 6 - i d i K 9 J o w K h G A k 5 F 5 q J 5 7 X 1 4 Q 2 Y 0 T b I K R I 0 2 o n z L P k a s = " ;
2021-02-05 17:12:51 +00:00
} ;
2023-11-16 04:20:00 +00:00
postPatch = ''
substituteInPlace lib/socket.c \
2024-04-21 15:54:59 +00:00
- - replace-fail " v o i d i s c s i _ d e c r e m e n t _ i f a c e _ r r ( ) { " " v o i d i s c s i _ d e c r e m e n t _ i f a c e _ r r ( v o i d ) { "
2023-11-16 04:20:00 +00:00
'' ;
2021-02-05 17:12:51 +00:00
nativeBuildInputs = [ autoreconfHook ] ;
2024-04-21 15:54:59 +00:00
env = lib . optionalAttrs ( stdenv . is32bit || stdenv . isDarwin ) {
# iscsi-discard.c:223:57: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
NIX_CFLAGS_COMPILE = " - W n o - e r r o r = f o r m a t " ;
} ;
2021-02-05 17:12:51 +00:00
meta = with lib ; {
description = " i s c s i c l i e n t l i b r a r y a n d u t i l i t i e s " ;
homepage = " h t t p s : / / g i t h u b . c o m / s a h l b e r g / l i b i s c s i " ;
license = licenses . lgpl2 ;
platforms = platforms . unix ;
maintainers = with maintainers ; [ misuzu ] ;
} ;
}