Enable testing during nix builds

This commit is contained in:
Bryan Bennett 2024-01-11 08:31:52 -05:00
parent 04337c8c5f
commit 6e28820659
No known key found for this signature in database
GPG key ID: EE149E4215408DE9
2 changed files with 13 additions and 2 deletions

View file

@ -1,6 +1,9 @@
{ buildDunePackage
{ alcotest
, bisect_ppx
, buildDunePackage
, core
, core_unix
, coreutils
, findlib
, lib
, nix-filter
@ -19,21 +22,29 @@ buildDunePackage {
include = [
"bin"
"lib"
"tests"
./dune-project
./flake.nix
./default.nix
./flake.lock
./flake_env.opam
./direnvrc
./LICENSE
];
};
duneVersion = "3";
doCheck = true;
postPatch = ''
substituteInPlace direnvrc --replace "@flake_env@" "$out/bin/flake_env"
substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env"
'';
postInstall = ''
install -m400 -D direnvrc $out/share/flake_env/direnvrc
'';
checkInputs = [
alcotest
bisect_ppx
];
nativeBuildInputs = [
reason
];

View file

@ -1,2 +1,2 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
echo "1.1.1";