From aab362ef3754832e405093458747839fd9a06f6e Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 21 Jun 2020 18:01:29 -0400 Subject: chore(xan): Install ghc-prof-flamegraph Some things are slow, and it's time to profile them Change-Id: I6a915db8bcc85adc7c3902a407cebb5a6f52d514 Reviewed-on: https://cl.tvl.fyi/c/depot/+/553 Reviewed-by: glittershark --- users/glittershark/xanthous/haskell-overlay.nix | 19 +++++++++++++++++-- users/glittershark/xanthous/shell.nix | 5 ++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/users/glittershark/xanthous/haskell-overlay.nix b/users/glittershark/xanthous/haskell-overlay.nix index fff1c21741..ad1200ef77 100644 --- a/users/glittershark/xanthous/haskell-overlay.nix +++ b/users/glittershark/xanthous/haskell-overlay.nix @@ -20,8 +20,7 @@ in self: super: with pkgs.haskell.lib; rec { sha256 = "12k41wd9fd1y3jd5djwcpwg2s1cva87wh14i0m1yn49zax9wl740"; } {}; - vinyl = pkgs.haskell.lib.overrideSrc - (pkgs.haskell.lib.markUnbroken super.vinyl) + vinyl = overrideSrc (markUnbroken super.vinyl) rec { src = nixpkgs.fetchzip { url = "mirror://hackage/vinyl-${version}/vinyl-${version}.tar.gz"; @@ -32,4 +31,20 @@ in self: super: with pkgs.haskell.lib; rec { comonad-extras = appendPatch (markUnbroken super.comonad-extras) [ ./build/update-comonad-extras.patch ]; + + ghc-prof-flamegraph = overrideCabal super.ghc-prof-flamegraph (oldAttrs: rec { + version = "0.2.0.0"; + + src = nixpkgs.fetchFromGitHub { + owner = "fpco"; + repo = "ghc-prof-flamegraph"; + rev = "8edd3b4806adeb25a4d55bed51c3afcc8e7a8e14"; + sha256 = "1i05pw495y5n24s1313iip8njn1lkf22a89izvi19iw7qkx062hr"; + fetchSubmodules = true; + }; + + libraryHaskellDepends = oldAttrs.libraryHaskellDepends ++ [ + self.optparse-applicative + ]; + }); } diff --git a/users/glittershark/xanthous/shell.nix b/users/glittershark/xanthous/shell.nix index edd2fe4c08..4814966427 100644 --- a/users/glittershark/xanthous/shell.nix +++ b/users/glittershark/xanthous/shell.nix @@ -27,4 +27,7 @@ let inherit (pkgs.haskell.lib) addBuildTools; in -(addBuildTools drv (with haskellPackages; [ cabal-install ])).env +(addBuildTools drv (with haskellPackages; [ + cabal-install + ghc-prof-flamegraph +])).env -- cgit 1.4.1