mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-03 21:28:01 +03:00
Run Cabal test-suites as Nix checks
This commit is contained in:
parent
8d17d35439
commit
635f0c9438
@ -139,6 +139,8 @@
|
||||
// renameAttrs (name: "cabal-${name}") haskell-nix-flake.devShells
|
||||
// {default = self.devShells."${system}".only-tools-nixpkgs;};
|
||||
|
||||
checks = renameAttrs (name: "component-${name}") haskell-nix-flake.checks;
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
});
|
||||
}
|
||||
|
@ -73,10 +73,25 @@
|
||||
};
|
||||
}
|
||||
// localPackageDevShells;
|
||||
|
||||
checks =
|
||||
haskell-nix-flake.checks
|
||||
// {
|
||||
## This check has a test that tries to write to $HOME, so we give it a fake one.
|
||||
"unison-cli:test:cli-tests" = haskell-nix-flake.checks."unison-cli:test:cli-tests".overrideAttrs (old: {
|
||||
## The builder here doesn’t `runHook preBuild`, so we just prepend onto `buildPhase`.
|
||||
buildPhase =
|
||||
''
|
||||
export HOME="$TMP/fake-home"
|
||||
mkdir -p "$HOME"
|
||||
''
|
||||
+ old.buildPhase or "";
|
||||
});
|
||||
};
|
||||
in
|
||||
haskell-nix-flake
|
||||
// {
|
||||
defaultPackage = haskell-nix-flake.packages."unison-cli-main:exe:unison";
|
||||
inherit (pkgs) unison-project;
|
||||
inherit devShells localPackageNames;
|
||||
inherit checks devShells localPackageNames;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user