2018-09-19 20:18:34 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, ncurses
|
|
|
|
, withGui ? false, qtbase }:
|
2012-02-06 19:09:04 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "i7z";
|
2018-09-19 19:16:17 +01:00
|
|
|
version = "0.27.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DimitryAndric";
|
|
|
|
repo = "i7z";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0l8wz0ffb27nkwchc606js652spk8masy3kjmzh7ygipwsary5ds";
|
2012-02-06 19:09:04 +00:00
|
|
|
};
|
|
|
|
|
2018-09-19 20:18:34 +01:00
|
|
|
buildInputs = [ ncurses ] ++ lib.optional withGui qtbase;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/i7z/raw/ad1359764ee7a860a02e0c972f40339058fa9369/debian/patches/fix-insecure-tempfile.patch";
|
|
|
|
sha256 = "0ifg06xjw14y4fnzzgkhqm4sv9mcdzgi8m2wffq9z8b1r0znya3s";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/i7z/raw/ad1359764ee7a860a02e0c972f40339058fa9369/debian/patches/nehalem.patch";
|
|
|
|
sha256 = "1ys6sgm01jkqb6d4y7qc3h89dzph8jjjcfya5c5jcm7dkxlzjq8a";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/i7z/raw/ad1359764ee7a860a02e0c972f40339058fa9369/debian/patches/hyphen-used-as-minus-sign.patch";
|
|
|
|
sha256 = "1ji2qvdyq0594cpqz0dlsfggvw3rm63sygh0jxvwjgxpnhykhg1p";
|
|
|
|
})
|
|
|
|
./qt5.patch
|
|
|
|
];
|
2018-05-15 05:39:51 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2012-02-06 19:09:04 +00:00
|
|
|
|
2018-09-19 20:04:48 +01:00
|
|
|
postBuild = lib.optionalString withGui ''
|
2018-05-15 05:39:51 +01:00
|
|
|
cd GUI
|
|
|
|
qmake
|
|
|
|
make clean
|
|
|
|
make
|
|
|
|
cd ..
|
2012-02-06 19:09:04 +00:00
|
|
|
'';
|
|
|
|
|
2018-09-19 20:04:48 +01:00
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
2018-05-15 05:39:51 +01:00
|
|
|
|
2018-09-19 20:04:48 +01:00
|
|
|
postInstall = lib.optionalString withGui ''
|
|
|
|
install -Dm755 GUI/i7z_GUI $out/bin/i7z-gui
|
2012-02-06 19:09:04 +00:00
|
|
|
'';
|
|
|
|
|
2018-05-15 05:39:51 +01:00
|
|
|
meta = with lib; {
|
2012-02-06 19:09:04 +00:00
|
|
|
description = "A better i7 (and now i3, i5) reporting tool for Linux";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/DimitryAndric/i7z";
|
|
|
|
repositories.git = "https://github.com/DimitryAndric/i7z.git";
|
2018-05-15 05:39:51 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ bluescreen303 ];
|
|
|
|
# broken on ARM
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2012-02-06 19:09:04 +00:00
|
|
|
};
|
|
|
|
}
|