Skip to content

Commit

Permalink
idris2: init at 0.0.0 (bf5b229)
Browse files Browse the repository at this point in the history
  • Loading branch information
lodi committed Jan 5, 2020
1 parent cef68c4 commit 4740776
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 1 deletion.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Expand Up @@ -4057,6 +4057,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
59 changes: 59 additions & 0 deletions pkgs/development/compilers/idris2/default.nix
@@ -0,0 +1,59 @@
# racket is busted: https://github.com/NixOS/nixpkgs/issues/11698

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

stdenv.mkDerivation rec {

pname = "idris2";

src = fetchFromGitHub {
owner = "edwinb";
repo = "Idris2";
rev = "bf5b2298e068ebeaddd70b695426f52ebe67c1ab";
sha256 = "1ixmdy4zbllmpwmvmmqv1rj9a2y243pggf42pdqkvrkjw50zqlyj";
};

version = builtins.readFile ( runCommand "getIdris2Version" {} ''
# grep through the make database to determine the computed value of IDRIS2_VERSION
make -np -f ${src}/Makefile 2>/dev/null | \
grep "^IDRIS2_VERSION" | \
head -n 1 | cut -d\ -f3 | tr -d '\n' >$out
'');

nativeBuildInputs = [ idris makeWrapper ];

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 @@ -8265,6 +8265,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

0 comments on commit 4740776

Please sign in to comment.