@@ -1,22 +1,35 @@
1−{ lib, stdenv, fetchFromGitHub, makeWrapper
2−, clang, chez
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, makeWrapper
5+, clang
6+, chez
7+, gmp
8+, zsh
39}:
410
11+# NOTICE: An `idris2WithPackages` is available at: https://github.com/claymager/idris2-pkgs
12+
513# Uses scheme to bootstrap the build of idris2
614stdenv.mkDerivation rec {
715 pname = "idris2";
8− version = "0.3.0";
16+ version = "0.4.0";
917
1018 src = fetchFromGitHub {
1119 owner = "idris-lang";
1220 repo = "Idris2";
1321 rev = "v${version}";
14− sha256 = "0sa2lpb7n6xqfknwld9rzm4bnb6qcd0ja1n63cnc5v8wdzr8q7kh";
22+ sha256 = "105jybjf5s0k6003qzfxchzsfcpsxip180bh3mdmi74d464d0h8g";
1523 };
1624
25+ # We do not add any propagatedNativeBuildInputs because we do not want the
26+ # executables idris2 produces to depend on the nix-store. As such, it is left
27+ # to the user to guarantee chez (or any other codgen dependency) is available
28+ # in the path during compilation of programs with idris2.
1729 strictDeps = true;
18− nativeBuildInputs = [ makeWrapper clang chez ];
19− buildInputs = [ chez ];
30+ nativeBuildInputs = [ makeWrapper clang chez ]
31+ ++ lib.optional stdenv.isDarwin [ zsh ];
32+ buildInputs = [ gmp ];
2033
2134 prePatch = ''
2235 patchShebangs --build tests
@@ -26,9 +39,9 @@ stdenv.mkDerivation rec {
2639 ++ lib.optional stdenv.isDarwin "OS=";
2740
2841 # The name of the main executable of pkgs.chez is `scheme`
29− buildFlags = [ "bootstrap-build" "SCHEME=scheme" ];
42+ buildFlags = [ "bootstrap" "SCHEME=scheme" ];
3043
31− checkTarget = "bootstrap-test";
44+ checkTarget = "test";
3245
3346 # TODO: Move this into its own derivation, such that this can be changed
3447 # without having to recompile idris2 every time.
@@ -72,7 +85,7 @@ stdenv.mkDerivation rec {
7285 description = "A purely functional programming language with first class types";
7386 homepage = "https://github.com/idris-lang/Idris2";
7487 license = lib.licenses.bsd3;
75− maintainers = with lib.maintainers; [ wchresta ];
88+ maintainers = with lib.maintainers; [ fabianhjr wchresta ];
7689 inherit (chez.meta) platforms;
7790 };
7891}