mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-17 23:11:23 +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
|
||||||
, core_unix
|
, core_unix
|
||||||
|
, coreutils
|
||||||
, findlib
|
, findlib
|
||||||
, lib
|
, lib
|
||||||
, nix-filter
|
, nix-filter
|
||||||
|
|
@ -19,21 +22,29 @@ buildDunePackage {
|
||||||
include = [
|
include = [
|
||||||
"bin"
|
"bin"
|
||||||
"lib"
|
"lib"
|
||||||
|
"tests"
|
||||||
./dune-project
|
./dune-project
|
||||||
./flake.nix
|
./flake.nix
|
||||||
./default.nix
|
./default.nix
|
||||||
./flake.lock
|
./flake.lock
|
||||||
./flake_env.opam
|
./flake_env.opam
|
||||||
./direnvrc
|
./direnvrc
|
||||||
|
./LICENSE
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
duneVersion = "3";
|
duneVersion = "3";
|
||||||
|
doCheck = true;
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace direnvrc --replace "@flake_env@" "$out/bin/flake_env"
|
substituteInPlace direnvrc --replace "@flake_env@" "$out/bin/flake_env"
|
||||||
|
substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||||
'';
|
'';
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -m400 -D direnvrc $out/share/flake_env/direnvrc
|
install -m400 -D direnvrc $out/share/flake_env/direnvrc
|
||||||
'';
|
'';
|
||||||
|
checkInputs = [
|
||||||
|
alcotest
|
||||||
|
bisect_ppx
|
||||||
|
];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
reason
|
reason
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
echo "1.1.1";
|
echo "1.1.1";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue