Compare commits

...

3 commits

Author SHA1 Message Date
5ee637cf4d update makefile 2022-05-04 18:49:00 +02:00
d61101f786 nix cleanup 2022-05-04 18:35:43 +02:00
f5f2c4399e move lib to subdir 2022-05-04 17:44:38 +02:00
29 changed files with 13 additions and 17 deletions

View file

@ -1,20 +1,20 @@
all: quox
quox:
(cd exe; sirdi build)
ln -sf exe/build/exec/main $@
nix build '.#quox-exe'
ln -sfL $$(realpath result/bin/quox) quox
quox-tests:
(cd tests; sirdi build)
ln -sf tests/build/exec/main $@
nix build '.#quox-tests'
ln -sfL $$(realpath result/bin/quox-tests) quox-tests
.PHONY: lib
lib:
sirdi build
nix build '.#quox'
.PHONY: test
test: quox-tests
./quox-tests -V 14
test:
nix run -- '.#quox-tests' -V 14
.PHONY: prove
prove: quox-tests
@ -22,7 +22,4 @@ prove: quox-tests
.PHONY: clean
clean:
$(RM) quox quox-tests
sirdi clean
(cd exe; sirdi clean)
(cd tests; sirdi clean)
rm -f quox quox-tests result

View file

@ -14,17 +14,16 @@
inherit system;
overlays = [ idris2-pkgs.overlay ];
};
inherit (pkgs.idris2-pkgs._builders) idrisPackage devEnv;
quox = idrisPackage ./. { };
inherit (pkgs.idris2-pkgs._builders) idrisPackage;
quox = idrisPackage ./lib { };
quox-exe = idrisPackage ./exe { extraPkgs.quox = quox; };
quox-tests = idrisPackage ./tests { extraPkgs.quox = quox; };
in
{
defaultPackage = quox-exe;
packages = { inherit quox quox-exe quox-tests; };
devShell = pkgs.mkShell { buildInputs = [ (devEnv quox) ]; };
defaultPackage = quox;
}
);
}