Using broken haskell packages as devShell dependencies #165
-
I'm trying to use ThreadScope but pulling it directly from haskell packages doesn't work. I tried adding it to my flake's {
devShell = {
tools = hp:
{
inherit (hp) implicit-hie;
treefmt = config.treefmt.build.wrapper;
threadscope = pkgs.haskell.lib.doJailbreak hp.threadscope;
} // config.treefmt.build.programs;
hlsCheck.enable = true;
};
autoWire = [ "packages" "apps" "checks" ];
} but I still get the error about broken packages
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
You want to add it {
overrides = self: super: {
threadscope = pkgs.haskell.lib.doJailbreak super.threadscope;
};
} (The In regards to the error |
Beta Was this translation helpful? Give feedback.
-
Using --- a/flake.nix
+++ b/flake.nix
@@ -9,6 +9,10 @@
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
flake-root.url = "github:srid/flake-root";
+ threadscope = {
+ url = "github:haskell/ThreadScope";
+ flake = false;
+ };
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
@@ -22,17 +26,23 @@
perSystem = { self', system, lib, config, inputs', pkgs, ... }: {
- haskellProjects.default = {
- devShell = {
- tools = hp: {
- inherit (hp) implicit-hie;
- treefmt = config.treefmt.build.wrapper;
- } // config.treefmt.build.programs;
- hlsCheck.enable = true;
- mkShellArgs = { };
+ haskellProjects.default =
+ {
+ devShell = {
+ tools = hp: {
+ inherit (hp) implicit-hie;
+ treefmt = config.treefmt.build.wrapper;
+ } // config.treefmt.build.programs;
+ hlsCheck.enable = true;
+ mkShellArgs = { };
+ };
+
+ overrides = self: super: {
+ threadscope = pkgs.haskell.lib.unmarkBroken (self.callCabal2nix "threadscope" inputs.threadscope { });
+ };
+
+ autoWire = [ "packages" "apps" "checks" ];
};
- autoWire = [ "packages" "apps" "checks" ];
- };
treefmt.config = {
inherit (config.flake-root) projectRootFile; |
Beta Was this translation helpful? Give feedback.
@newton-migosi You have to keep overriding things until they build. Come to https://app.element.io/#/room/#haskell:nixos.org and they'll help. As a next step, try: