From b438d394ceb1273de5838b1d6dc81fa46cb30381 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 22 Aug 2017 19:49:25 -0500 Subject: [PATCH] idrisPackages.idris: 1.0 -> 1.1.1 --- .../haskell-modules/configuration-common.nix | 5 +++++ .../idris-modules/build-builtin-package.nix | 7 +++++-- .../idris-modules/build-idris-package.nix | 13 +++++++------ pkgs/top-level/all-packages.nix | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 8ab751166c5..9f05dd4720d 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -697,6 +697,11 @@ self: super: { # test suite cannot find its own "idris" binary 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 math-functions = dontCheck super.math-functions; diff --git a/pkgs/development/idris-modules/build-builtin-package.nix b/pkgs/development/idris-modules/build-builtin-package.nix index defe8765403..6de3f8b1666 100644 --- a/pkgs/development/idris-modules/build-builtin-package.nix +++ b/pkgs/development/idris-modules/build-builtin-package.nix @@ -13,8 +13,11 @@ build-idris-package { inherit (idris) src; postUnpack = '' - mv $sourceRoot/libs/${name} $IDRIS_LIBRARY_PATH - sourceRoot=$IDRIS_LIBRARY_PATH/${name} + sourceRoot=$sourceRoot/libs/${name} + ''; + + postPatch = '' + sed -i ${name}.ipkg -e "/^opts/ s|-i \\.\\./|-i $IDRIS_LIBRARY_PATH/|g" ''; meta = idris.meta // { diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix index a00f5e74b84..9dfa3430ed8 100644 --- a/pkgs/development/idris-modules/build-idris-package.nix +++ b/pkgs/development/idris-modules/build-idris-package.nix @@ -4,8 +4,13 @@ # name and src. { stdenv, idris, gmp }: args: stdenv.mkDerivation ({ preHook = '' - mkdir idris-libs + # Library import path 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 () { if [ -d $1/lib/${idris.name} ]; then @@ -16,10 +21,6 @@ envHooks+=(addIdrisLibs) ''; - configurePhase = '' - export TARGET=$out/lib/${idris.name} - ''; - buildPhase = '' ${idris}/bin/idris --build *.ipkg ''; @@ -33,7 +34,7 @@ ''; installPhase = '' - ${idris}/bin/idris --install *.ipkg + ${idris}/bin/idris --install *.ipkg --ibcsubdir $IBCSUBDIR ''; buildInputs = [ gmp ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 372d346aeec..8fd3176a660 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5646,7 +5646,21 @@ with pkgs; icedtea_web = icedtea8_web; 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 { };