I’m trying to migrate an old project of mine from stack to nix and need to override one of the libraries, llvm-hs-pretty
and stop it from running tests, as they’re broken. I have the following default.nix, but it still tries to run the test upon entering nix-shell.
let
config = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
llvm-hs-pretty =
pkgs.haskell.lib.dontCheck haskellPackagesOld.llvm-hs-pretty;
};
};
};
allowBroken = true;
};
pkgs = import <nixpkgs> { inherit config; };
compilerVersion = "ghc883";
compiler = pkgs.haskell.packages."${compilerVersion}";
pkg = compiler.developPackage {
root = ./.;
source-overrides = { };
modifier = drv:
pkgs.haskell.lib.addBuildTools drv
(with pkgs.haskellPackages; [ cabal-install alex happy ]);
};
buildInputs = [ pkgs.llvm_9 pkgs.clang_9 ];
in pkg.overrideAttrs
(attrs: { buildInputs = attrs.buildInputs ++ buildInputs; })