mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-10-04 01:17:44 +03:00
74f30358c8
Problem: 1. Running `nix develop` in the project root does not provide a development environment of any sort, as evidenced by: ghc-pkg list printing only boot libraries. 2. Tests can fail with this error: xrefcheck-tests: Network.Socket.bind: resource busy (Address already in use) due to a potential conflict with an already running application. Solution: 1. flake.nix: inherit devShells 2. tests: configurable mock server port With these changes I've been able to build the project and run its tests as follows: nix shell nixpkgs#haskellPackages.hpack nixpkgs#cabal-install nix develop -c $SHELL hpack 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=./ftp.log & cabal test ftp-tests --test-options="--ftp-host ftp://127.0.0.1:2221" cabal test xrefcheck-tests --test-options="--mock-server-port 3001" |
||
---|---|---|
.. | ||
ftp_root | ||
Test/Xrefcheck | ||
Main.hs | ||
Tree.hs |