git.iko.soy/typeable/nixpkgs
on master help sign in
Add wrapper for idris exe for gcc/gmp runtime deps

Fixes #10450 When compiling packages with -o the executable invokes gcc. There is no compile time flag to control this invocation so for now we create a wrapper which provides the dependency at runtime.

commit40124cd0cf474dd17959b5ae36c8a98112c173c0 authorMatthew Pickering <matthewtpickering@gmail.com> dateThu 2 Nov 2017, 21:51 (9 years ago) parent8e91f4e
3 files changed+25−3
pkgs/development/idris-modules/default.nix+7−2 pkgs/development/idris-modules/idris-wrapper.nix+14 pkgs/top-level/all-packages.nix+4−1
pkgs/development/idris-modules/default.nix+7−2
@@ -1,4 +1,4 @@
1−{ pkgs, idris, overrides ? (self: super: {}) }: let
1+{ pkgs, idris-no-deps, overrides ? (self: super: {}) }: let
22 inherit (pkgs.lib) callPackageWith fix' extends;
33
44 /* Taken from haskell-modules/default.nix, should probably abstract this away */
@@ -33,7 +33,12 @@
3333
3434 value = callPackage (./. + "/${name}.nix") {};
3535 }) files)) // {
36− inherit idris callPackage;
36+ inherit idris-no-deps callPackage;
37+ # See #10450 about why we have to wrap the executable
38+ idris =
39+ (pkgs.callPackage ./idris-wrapper.nix {})
40+ idris-no-deps
41+ { path = [ pkgs.gcc ]; lib = [pkgs.gmp]; };
3742
3843 # A list of all of the libraries that come with idris
3944 builtins = pkgs.lib.mapAttrsToList (name: value: value) builtins_;
pkgs/development/idris-modules/idris-wrapper.nixnew file+14
@@ -0,0 +1,14 @@
1+{ symlinkJoin, makeWrapper, stdenv }: idris: { path, lib }:
2+
3+symlinkJoin {
4+ name = idris.name;
5+ src = idris.src;
6+ paths = [ idris ];
7+ buildInputs = [ makeWrapper ];
8+ postBuild = ''
9+ wrapProgram $out/bin/idris \
10+ --suffix PATH : ${ stdenv.lib.makeBinPath path } \
11+ --suffix LIBRARY_PATH : ${stdenv.lib.makeLibraryPath lib}
12+ '';
13+ }
14+
pkgs/top-level/all-packages.nix+4−1
@@ -5876,7 +5876,8 @@ with pkgs;
58765876 icedtea_web = icedtea8_web;
58775877
58785878 idrisPackages = callPackage ../development/idris-modules {
5879− idris =
5879+
5880+ idris-no-deps =
58805881 let
58815882 inherit (self.haskell) lib;
58825883 haskellPackages = self.haskellPackages.override {
@@ -5893,6 +5894,8 @@ with pkgs;
58935894 haskellPackages.idris;
58945895 };
58955896
5897+ idris = idrisPackages.with-packages [ idrisPackages.base ] ;
5898+
58965899 intercal = callPackage ../development/compilers/intercal { };
58975900
58985901 irony-server = callPackage ../development/tools/irony-server/default.nix {