Merge pull request #174347 from helsinki-systems/oprofile-no-gui

This commit is contained in:
Martin Weinelt 2022-05-25 21:39:09 +02:00 committed by GitHub
commit d68562ad6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,8 @@
{ lib, stdenv, buildPackages
, fetchurl, pkg-config
, libbfd, popt, zlib, linuxHeaders, libiberty_static
, withGUI ? false, qt4 ? null
}:
# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
assert withGUI -> qt4 != null;
stdenv.mkDerivation rec {
pname = "oprofile";
version = "1.4.0";
@ -23,14 +19,12 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ]
++ lib.optionals withGUI [ qt4 ];
buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ];
configureFlags = [
"--with-kernel=${linuxHeaders}"
"--disable-shared" # needed because only the static libbfd is available
]
++ lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4";
"--with-kernel=${linuxHeaders}"
"--disable-shared" # needed because only the static libbfd is available
];
meta = {
description = "System-wide profiler for Linux";