Merge pull request #28492 from ttuegel/idris-packages

Update Idris
This commit is contained in:
Peter Simons 2017-08-23 14:03:39 +02:00 committed by GitHub
commit 1fb8734fdd
4 changed files with 38 additions and 11 deletions

View File

@ -697,6 +697,11 @@ self: super: {
# test suite cannot find its own "idris" binary # test suite cannot find its own "idris" binary
idris = doJailbreak (dontCheck super.idris); idris = doJailbreak (dontCheck super.idris);
idris_1_1_1 = overrideCabal (doJailbreak (dontCheck super.idris_1_1_1)) (drv: {
# The standard libraries are compiled separately
configureFlags = (drv.configureFlags or []) ++ [ "-fexeconly" ];
});
# https://github.com/bos/math-functions/issues/25 # https://github.com/bos/math-functions/issues/25
math-functions = dontCheck super.math-functions; math-functions = dontCheck super.math-functions;

View File

@ -1,16 +1,23 @@
# Build one of the packages that come with idris # Build one of the packages that come with idris
# name: The name of the package # name: The name of the package
# deps: The dependencies of the package # deps: The dependencies of the package
{ idris, build-idris-package, lib }: name: deps: build-idris-package { { idris, build-idris-package, lib }: name: deps:
inherit name; let
inherit (builtins.parseDrvName idris.name) version;
in
build-idris-package {
name = "${name}-${version}";
propagatedBuildInputs = deps; propagatedBuildInputs = deps;
inherit (idris) src; inherit (idris) src;
postUnpack = '' postUnpack = ''
mv $sourceRoot/libs/${name} $IDRIS_LIBRARY_PATH sourceRoot=$sourceRoot/libs/${name}
sourceRoot=$IDRIS_LIBRARY_PATH/${name} '';
postPatch = ''
sed -i ${name}.ipkg -e "/^opts/ s|-i \\.\\./|-i $IDRIS_LIBRARY_PATH/|g"
''; '';
meta = idris.meta // { meta = idris.meta // {

View File

@ -4,8 +4,13 @@
# name and src. # name and src.
{ stdenv, idris, gmp }: args: stdenv.mkDerivation ({ { stdenv, idris, gmp }: args: stdenv.mkDerivation ({
preHook = '' preHook = ''
mkdir idris-libs # Library import path
export IDRIS_LIBRARY_PATH=$PWD/idris-libs export IDRIS_LIBRARY_PATH=$PWD/idris-libs
mkdir -p $IDRIS_LIBRARY_PATH
# Library install path
export IBCSUBDIR=$out/lib/${idris.name}
mkdir -p $IBCSUBDIR
addIdrisLibs () { addIdrisLibs () {
if [ -d $1/lib/${idris.name} ]; then if [ -d $1/lib/${idris.name} ]; then
@ -16,10 +21,6 @@
envHooks+=(addIdrisLibs) envHooks+=(addIdrisLibs)
''; '';
configurePhase = ''
export TARGET=$out/lib/${idris.name}
'';
buildPhase = '' buildPhase = ''
${idris}/bin/idris --build *.ipkg ${idris}/bin/idris --build *.ipkg
''; '';
@ -33,7 +34,7 @@
''; '';
installPhase = '' installPhase = ''
${idris}/bin/idris --install *.ipkg ${idris}/bin/idris --install *.ipkg --ibcsubdir $IBCSUBDIR
''; '';
buildInputs = [ gmp ]; buildInputs = [ gmp ];

View File

@ -5652,7 +5652,21 @@ with pkgs;
icedtea_web = icedtea8_web; icedtea_web = icedtea8_web;
idrisPackages = callPackage ../development/idris-modules { idrisPackages = callPackage ../development/idris-modules {
inherit (haskellPackages) idris; idris =
let
inherit (self.haskell) lib;
haskellPackages = self.haskellPackages.override {
overrides = self: super: {
binary = lib.dontCheck self.binary_0_8_5_1;
cheapskate = self.cheapskate_0_1_1;
idris = self.idris_1_1_1;
parsers = lib.dontCheck super.parsers;
semigroupoids = lib.dontCheck super.semigroupoids;
trifecta = lib.dontCheck super.trifecta;
};
};
in
haskellPackages.idris;
}; };
intercal = callPackage ../development/compilers/intercal { }; intercal = callPackage ../development/compilers/intercal { };