Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with import <nixpkgs> {};
- let
- kuznero = {
- email = "roman@kuznero.com";
- github = "kuznero";
- name = "Roman Kuznetsov";
- };
- in
- stdenv.mkDerivation rec {
- version = "0.2.11.1";
- name = "threadscope-${version}";
- src = fetchurl {
- url = "https://github.com/haskell/ThreadScope/releases/download/v${version}/threadscope.linux.gz";
- sha256 = "0xppbwgywncdmar1sf9km51hzkl0lwks5lb5s7lgjm5wq4mvdax0";
- };
- unpackPhase = ''
- mkdir src
- cd src
- gzip -d < $src > threadscope
- chmod +x ./threadscope
- '';
- dontBuild = true;
- dontStrip = true;
- buildInputs = [ zlib gmp gnome2.gtk gnome2.pango gnome2.cairo gnome2.glib fontconfig freetype atk gdk_pixbuf ];
- patchPhase = ''
- rp=$(patchelf --print-rpath ./threadscope)
- patchelf \
- --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
- --set-rpath "$rp:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}:${stdenv.lib.makeLibraryPath buildInputs}" \
- ./threadscope
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp -v ./threadscope $out/bin/threadscope
- '';
- meta = with stdenv.lib; {
- homepage = https://github.com/haskell/ThreadScope;
- description = "ThreadScope";
- platforms = [ "x86_64-linux" ];
- maintainers = with maintainers; [ kuznero ];
- license = licenses.mit; # TODO: change to custom GHC license
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement