mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-08-17 09:30:35 +03:00
Problem: Almost all the time we can't validate localhost links, so we just skip them. But to run ftp links tests (#47) we need to refer to localhost. Solution: Add config option whether to ignore localhost links and provide bats tests for this new feature. Co-authored-by: Alexander Bantyev <alexander.bantyev@serokell.io>
33 lines
1.1 KiB
Nix
33 lines
1.1 KiB
Nix
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io>
|
|
#
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
rec {
|
|
sources = import ./nix/sources.nix;
|
|
haskell-nix = import sources."haskell.nix" {
|
|
sourcesOverride = { hackage = sources."hackage.nix"; stackage = sources."stackage.nix"; };
|
|
};
|
|
serokell-nix = import sources."serokell.nix";
|
|
pkgs = import sources.nixpkgs (
|
|
haskell-nix.nixpkgsArgs // {
|
|
overlays =
|
|
haskell-nix.nixpkgsArgs.overlays
|
|
++ [ serokell-nix.overlay ]; # contains trailing whitespace check
|
|
}
|
|
);
|
|
|
|
project-src = pkgs.haskell-nix.haskellLib.cleanGit {
|
|
name = "xrefcheck";
|
|
src = pkgs.haskell-nix.haskellLib.cleanSourceWith {
|
|
filter = path: type: !(pkgs.lib.hasInfix "tests/golden/helpers" path);
|
|
src = ./.;
|
|
};
|
|
};
|
|
|
|
xrefcheck-lib-and-tests = (import ./xrefcheck.nix { linux = true; });
|
|
xrefcheck-static = (import ./xrefcheck.nix { linux-static = true; }).components.exes.xrefcheck;
|
|
xrefcheck-windows = (import ./xrefcheck.nix { windows = true; }).components.exes.xrefcheck;
|
|
|
|
trailing-whitespace-check = pkgs.build.checkTrailingWhitespace project-src;
|
|
}
|