Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions nix/packages/ghciwatch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,19 @@

GHC_VERSIONS = builtins.map (drv: drv.version) ghcPackages;

src = lib.cleanSourceWith {
src = craneLib.path (inputs.self.outPath);
filter = let
# Keep test project data, needed for the build.
testDataFilter = path: _type: lib.hasInfix "tests/data" path;
# Keep cli-about.txt, included at compile time for --help text.
cliAboutFilter = path: _type: lib.hasSuffix "cli-about.txt" path;
in
path: type:
(testDataFilter path type) || (cliAboutFilter path type) || (craneLib.filterCargoSources path type);
};
src = let
unfilteredRoot = ../..;
in
lib.fileset.toSource {
root = unfilteredRoot;
fileset = lib.fileset.unions [
(craneLib.fileset.commonCargoSources unfilteredRoot)
# Needed for the build (integration test fixtures).
(unfilteredRoot + "/tests/data")
# Included at compile time for --help text.
(unfilteredRoot + "/src/cli-about.txt")
];
};

commonArgs' =
(craneLib.crateNameFromCargoToml {
Expand Down