mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, stdenv, mkDerivation, fetchgit, qtbase, cmake, asciidoc, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
|
mkDerivation {
|
|
pname = "kernelshark";
|
|
version = "1.1.0";
|
|
|
|
src = fetchgit (import ./src.nix);
|
|
|
|
patches = [ ./fix-Makefiles.patch ];
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
preConfigure = "pushd kernel-shark";
|
|
|
|
nativeBuildInputs = [ pkg-config cmake asciidoc ];
|
|
|
|
buildInputs = [ qtbase json_c mesa_glu freeglut ];
|
|
|
|
cmakeFlags = [
|
|
"-D_INSTALL_PREFIX=${placeholder "out"}"
|
|
"-DTRACECMD_BIN_DIR=${trace-cmd}/bin"
|
|
"-DTRACECMD_INCLUDE_DIR=${trace-cmd.dev}/include"
|
|
"-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/trace-cmd/libtracecmd.a"
|
|
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/traceevent/libtraceevent.a"
|
|
];
|
|
|
|
preInstall = ''
|
|
popd
|
|
make install_doc_gui prefix=$doc \
|
|
FIND_MANPAGE_DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl
|
|
pushd kernel-shark/build
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
|
|
homepage = "https://kernelshark.org/";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
};
|
|
}
|