SHARE
TWEET

Binary Packaged ThreadScope

a guest Jun 12th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with import <nixpkgs> {};
  2.  
  3. let
  4.   kuznero = {
  5.     email = "roman@kuznero.com";
  6.     github = "kuznero";
  7.     name = "Roman Kuznetsov";
  8.   };
  9. in
  10. stdenv.mkDerivation rec {
  11.   version = "0.2.11.1";
  12.   name = "threadscope-${version}";
  13.   src = fetchurl {
  14.     url = "https://github.com/haskell/ThreadScope/releases/download/v${version}/threadscope.linux.gz";
  15.     sha256 = "0xppbwgywncdmar1sf9km51hzkl0lwks5lb5s7lgjm5wq4mvdax0";
  16.   };
  17.   unpackPhase = ''
  18.     mkdir src
  19.     cd src
  20.     gzip -d < $src > threadscope
  21.     chmod +x ./threadscope
  22.   '';
  23.   dontBuild = true;
  24.   dontStrip = true;
  25.   buildInputs = [ zlib gmp gnome2.gtk gnome2.pango gnome2.cairo gnome2.glib fontconfig freetype atk gdk_pixbuf ];
  26.   patchPhase = ''
  27.     rp=$(patchelf --print-rpath ./threadscope)
  28.     patchelf \
  29.       --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
  30.       --set-rpath "$rp:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}:${stdenv.lib.makeLibraryPath buildInputs}" \
  31.       ./threadscope
  32.   '';
  33.   installPhase = ''
  34.     mkdir -p $out/bin
  35.     cp -v ./threadscope $out/bin/threadscope
  36.   '';
  37.   meta = with stdenv.lib; {
  38.     homepage = https://github.com/haskell/ThreadScope;
  39.     description = "ThreadScope";
  40.     platforms = [ "x86_64-linux" ];
  41.     maintainers = with maintainers; [ kuznero ];
  42.     license = licenses.mit; # TODO: change to custom GHC license
  43.   };
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top