mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-16 06:31:24 +01:00
Enable testing during nix builds
This commit is contained in:
parent
04337c8c5f
commit
6e28820659
2 changed files with 13 additions and 2 deletions
13
default.nix
13
default.nix
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
echo "1.1.1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue