about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix b/nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix
new file mode 100644
index 000000000000..fb0f7414841c
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/analysis/qcachegrind/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, qmake, qtbase, perl, python, php, kcachegrind }:
+
+let
+  name = stdenv.lib.replaceStrings ["kcachegrind"] ["qcachegrind"] kcachegrind.name;
+
+in stdenv.mkDerivation rec {
+  inherit name;
+
+  src = kcachegrind.src;
+
+  buildInputs = [ qtbase perl python php ];
+
+  nativeBuildInputs = [ qmake ];
+
+  postInstall = ''
+     mkdir -p $out/bin
+     cp -p converters/dprof2calltree $out/bin/dprof2calltree
+     cp -p converters/hotshot2calltree.cmake $out/bin/hotshot2calltree
+     cp -p converters/memprof2calltree $out/bin/memprof2calltree
+     cp -p converters/op2calltree $out/bin/op2calltree
+     cp -p converters/pprof2calltree $out/bin/pprof2calltree
+     chmod -R +x $out/bin/
+  '' + (if stdenv.isDarwin then ''
+    mkdir -p $out/Applications
+    cp cgview/cgview.app/Contents/MacOS/cgview $out/bin
+    cp -a qcachegrind/qcachegrind.app $out/Applications
+  '' else ''
+    install qcachegrind/qcachegrind cgview/cgview -t "$out/bin"
+    install -Dm644 qcachegrind/qcachegrind.desktop -t "$out/share/applications"
+    install -Dm644 kcachegrind/32-apps-kcachegrind.png "$out/share/icons/hicolor/32x32/apps/kcachegrind.png"
+    install -Dm644 kcachegrind/48-apps-kcachegrind.png "$out/share/icons/hicolor/48x48/apps/kcachegrind.png"
+  '');
+
+  meta = with stdenv.lib; {
+    description = "A Qt GUI to visualize profiling data";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ periklis ];
+  };
+}