@ -1,40 +1,33 @@
{ stdenv , lib , fetchurl , fetchpatch
, withGUI ? false , gtk2 , pkg-config , sqlite # compile GUI
{ stdenv
, lib
, fetchFromGitHub
, hwdata
, gtk2
, pkg-config
, sqlite # compile GUI
, withGUI ? false
} :
stdenv . mkDerivation rec {
pname = " l s h w " ;
version = " B . 0 2 . 1 8 " ;
version = " B . 0 2 . 1 9 " ;
src = fetchurl {
url = " h t t p s : / / e z i x . o r g / s o f t w a r e / f i l e s / l s h w - ${ version } . t a r . g z " ;
sha256 = " 0 b r w r a 4 j l d 0 d 5 3 d 7 j s g c a 4 1 5 l j g l m m x 1 l 2 i a z p j 4 n d i l r 4 8 y y 8 m f " ;
src = fetchFromGitHub {
owner = " l y o n e l " ;
repo = pname ;
rev = version ;
sha256 = " s h a 2 5 6 - P z b N G c 1 p P i P L W W g T e W o N f A o + S s X g i 1 H c j n X f Y X A 9 S 0 I = " ;
} ;
patches = [
( fetchpatch {
# fix crash in scan_dmi_sysfs() when run as non-root
url = " h t t p s : / / g i t h u b . c o m / l y o n e l / l s h w / c o m m i t / f b d c 6 a b 1 5 f 7 e e a 0 d d c d 6 3 d a 3 5 5 3 5 6 e f 1 5 6 d d 0 d 9 6 . p a t c h " ;
sha256 = " 1 4 7 w y r 5 m 1 8 5 f 8 s w s m b 4 q 1 a h s 9 r 1 r y c a p b p a 2 5 4 8 a q b v 2 9 8 b b i s h 3 " ;
} )
( fetchpatch {
# support cross-compilation
url = " h t t p s : / / g i t h u b . c o m / l y o n e l / l s h w / c o m m i t / 8 4 8 6 d 2 5 c e a 9 b 6 8 7 9 4 5 0 4 f b d 9 e 5 c 6 e 2 9 4 b a c 6 c b 0 7 . p a t c h " ;
sha256 = " 0 8 f 0 w n x s q 0 a g v s c 6 6 b h c 7 l x v k 5 6 4 i r 0 p p 8 p g 3 c y m 6 a 6 2 1 p r b 9 l m 0 " ;
} )
] ;
nativeBuildInputs = [ pkg-config ] ;
buildInputs = lib . optionals withGUI [ gtk2 sqlite ] ;
buildInputs = [ hwdata ]
++ lib . optionals withGUI [ gtk2 sqlite ] ;
# Fix version info.
preConfigure = ''
sed - e " s / r e t u r n \" u n k n o w n \" / r e t u r n \" ${ version } \" / " \
- i src/core/version.cc
'' ;
makeFlags = [ " P R E F I X = $ ( o u t ) " ] ;
makeFlags = [
" P R E F I X = $ ( o u t ) "
" V E R S I O N = ${ version } "
] ;
buildFlags = [ " a l l " ] ++ lib . optional withGUI " g u i " ;
@ -46,7 +39,7 @@ stdenv.mkDerivation rec {
homepage = " h t t p s : / / e z i x . o r g / p r o j e c t / w i k i / H a r d w a r e L i S t e r " ;
description = " P r o v i d e d e t a i l e d i n f o r m a t i o n o n t h e h a r d w a r e c o n f i g u r a t i o n o f t h e m a c h i n e " ;
license = licenses . gpl2 ;
maintainers = with maintainers ; [ ] ;
maintainers = with maintainers ; [ thiagokokada ] ;
platforms = platforms . linux ;
} ;
}