mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-08-17 01:20:44 +03:00
Problem: At the moment, we're using the ignored option for mainly 2 purposes: 1) to ignore all files in the `.git` folder (`.git/**/*`) to ignore all build-related temporary files (the default config ignores `.stack-work/**/*`). A more robust alternative might be to ignore all files implicitly ignored by git. Solution: Use `git ls-files` to ignore all files implicitly ignored by git.
48 lines
1.5 KiB
Nix
48 lines
1.5 KiB
Nix
# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io>
|
|
#
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
{ linux ? false, linux-static ? false, windows ? false }:
|
|
let
|
|
nixpkgs = (import ./ci.nix).pkgs;
|
|
src = (import ./ci.nix).project-src;
|
|
pkgs = if linux-static then nixpkgs.pkgsCross.musl64 else if windows then nixpkgs.pkgsCross.mingwW64 else nixpkgs;
|
|
project = pkgs.haskell-nix.stackProject {
|
|
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; keepGitDir = true; };
|
|
modules = [{
|
|
packages.xrefcheck = {
|
|
ghcOptions =
|
|
[ "-Werror" ];
|
|
|
|
components.tests = {
|
|
ftp-tests = {
|
|
build-tools = [ pkgs.vsftpd ];
|
|
preCheck = ''
|
|
echo "Starting vsftpd..."
|
|
touch /tmp/vsftpd.log
|
|
vsftpd \
|
|
-orun_as_launching_user=yes \
|
|
-olisten_port=2221 \
|
|
-olisten=yes \
|
|
-oftp_username=$(whoami) \
|
|
-oanon_root=${./ftp-tests/ftp_root} \
|
|
-opasv_min_port=2222 \
|
|
-ohide_file='{.*}' \
|
|
-odeny_file='{.*}' \
|
|
-oseccomp_sandbox=no \
|
|
-olog_ftp_protocol=yes \
|
|
-oxferlog_enable=yes \
|
|
-ovsftpd_log_file=/tmp/vsftpd.log &
|
|
sleep 1
|
|
tail -f /tmp/vsftpd.log &
|
|
'';
|
|
testFlags = [ "--ftp-host" "ftp://localhost:2221" ];
|
|
};
|
|
xrefcheck-tests.build-tools = [ pkgs.git ];
|
|
};
|
|
};
|
|
}];
|
|
};
|
|
in
|
|
project.xrefcheck
|