Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idris2: init at 0.0.0 (bf5b229) #76971

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Expand Up @@ -4437,6 +4437,12 @@
githubId = 169170;
name = "Mathias Schreck";
};
lodi = {
email = "anthony.lodi@gmail.com";
github = "lodi";
githubId = 918448;
name = "Anthony Lodi";
};
loewenheim = {
email = "loewenheim@mailbox.org";
github = "loewenheim";
Expand Down
16 changes: 15 additions & 1 deletion pkgs/development/compilers/chicken/4/eggs.nix
Expand Up @@ -101,7 +101,21 @@ rec {
};

buildInputs = [


];
};

numbers = eggDerivation {
name = "numbers-4.6.3";

src = fetchegg {
name = "numbers";
version = "4.6.3";
sha256 = "0aczzpq6f31lk1919aiywknaci69m1apyx905m2ln2qw8zwmwibq";
};

buildInputs = [

];
};

Expand Down
56 changes: 56 additions & 0 deletions pkgs/development/compilers/idris2/default.nix
@@ -0,0 +1,56 @@
# racket is busted: https://github.com/NixOS/nixpkgs/issues/11698

{ stdenv, fetchFromGitHub, makeWrapper, runCommand
, idris, chez, racket, chickenPkgs
, clang, gmp
}:

stdenv.mkDerivation rec {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason you did not use the build-idris-package function here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how to make this work with build-idris-package. E.g. idris2 tests are in their own ipkg called from the makefile; buildInputs might be set incorrectly (idris should only be a nativeBuildInput for idris2 I think?); etc.


pname = "idris2";

src = fetchFromGitHub {
owner = "edwinb";
repo = "Idris2";

rev = "884d4adad22c9fa014236e1c8ae56da8f18b48b2";
sha256 = "0djwx1janzchpm887yw45zxcfppa23nsyhhb9nhgb7x041wcr5my";
};

version = "2020-04-16";

nativeBuildInputs = [ idris makeWrapper clang gmp ];

propagatedBuildInputs =
[ chez
racket
chickenPkgs.chicken
chickenPkgs.chickenEggs.numbers ];

makeFlags = [ "PREFIX=$(out)" ];

# The `network` library generates a test at build time, so we need to help it
# find the Chez binary.
CHEZ = "${chez}/bin/scheme";

postPatch = ''
patchShebangs tests/ideMode/ideMode002/gen_expected.sh
'';

postInstall = ''
wrapProgram $out/bin/idris2 \
--set CHEZ ${chez}/bin/scheme \
--set RACKET ${racket}/bin/racket \
--set RACKET_RACO ${racket}/bin/raco \
--set CHICKEN_CSI ${chickenPkgs.chicken}/bin/csi \
--set CHICKEN_CSC ${chickenPkgs.chicken}/bin/csc
'';

meta = {
description = "A dependently typed programming language";
homepage = https://github.com/edwinb/Idris2;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ lodi ];
};

}
5 changes: 5 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -8566,6 +8566,11 @@ in

idris = idrisPackages.with-packages [ idrisPackages.base ] ;

idris2 = callPackage ../development/compilers/idris2 {
idris = with idrisPackages; with-packages [ base contrib ]; # add contrib module
chickenPkgs = chickenPackages_4; # currently expects chicken4
};

intel-graphics-compiler = callPackage ../development/compilers/intel-graphics-compiler { };

intercal = callPackage ../development/compilers/intercal { };
Expand Down