Merge pull request #127948 from LibreCybernetics/update-idris2

This commit is contained in:
Sandro 2021-06-25 14:35:44 +02:00 committed by GitHub
commit fef1fef93d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,35 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper
, clang, chez
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, clang
, chez
, gmp
, zsh
}:
# NOTICE: An `idris2WithPackages` is available at: https://github.com/claymager/idris2-pkgs
# Uses scheme to bootstrap the build of idris2
stdenv.mkDerivation rec {
pname = "idris2";
version = "0.3.0";
version = "0.4.0";
src = fetchFromGitHub {
owner = "idris-lang";
repo = "Idris2";
rev = "v${version}";
sha256 = "0sa2lpb7n6xqfknwld9rzm4bnb6qcd0ja1n63cnc5v8wdzr8q7kh";
sha256 = "105jybjf5s0k6003qzfxchzsfcpsxip180bh3mdmi74d464d0h8g";
};
# We do not add any propagatedNativeBuildInputs because we do not want the
# executables idris2 produces to depend on the nix-store. As such, it is left
# to the user to guarantee chez (or any other codgen dependency) is available
# in the path during compilation of programs with idris2.
strictDeps = true;
nativeBuildInputs = [ makeWrapper clang chez ];
buildInputs = [ chez ];
nativeBuildInputs = [ makeWrapper clang chez ]
++ lib.optional stdenv.isDarwin [ zsh ];
buildInputs = [ gmp ];
prePatch = ''
patchShebangs --build tests
@ -26,9 +39,9 @@ stdenv.mkDerivation rec {
++ lib.optional stdenv.isDarwin "OS=";
# The name of the main executable of pkgs.chez is `scheme`
buildFlags = [ "bootstrap-build" "SCHEME=scheme" ];
buildFlags = [ "bootstrap" "SCHEME=scheme" ];
checkTarget = "bootstrap-test";
checkTarget = "test";
# TODO: Move this into its own derivation, such that this can be changed
# without having to recompile idris2 every time.
@ -72,7 +85,7 @@ stdenv.mkDerivation rec {
description = "A purely functional programming language with first class types";
homepage = "https://github.com/idris-lang/Idris2";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ wchresta ];
maintainers = with lib.maintainers; [ fabianhjr wchresta ];
inherit (chez.meta) platforms;
};
}