about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-06-21T22·01-0400
committerglittershark <grfn@gws.fyi>2020-06-22T00·40+0000
commitaab362ef3754832e405093458747839fd9a06f6e (patch)
tree5fa7504774c0e71899bdd84ce54a6b64193ffdf5
parent68779da59612dc467425a63f78fb34f5e53af8e0 (diff)
chore(xan): Install ghc-prof-flamegraph r/1057
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 <grfn@gws.fyi>
-rw-r--r--users/glittershark/xanthous/haskell-overlay.nix19
-rw-r--r--users/glittershark/xanthous/shell.nix5
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