Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters