2017-11-02 21:51:35 +00:00
|
|
|
{ pkgs, idris-no-deps, overrides ? (self: super: {}) }: let
|
2015-11-27 13:19:50 +00:00
|
|
|
inherit (pkgs.lib) callPackageWith fix' extends;
|
|
|
|
|
2017-09-29 14:11:26 +01:00
|
|
|
/* Taken from haskell-modules/default.nix, should probably abstract this away */
|
|
|
|
callPackageWithScope = scope: drv: args: (callPackageWith scope drv args) // {
|
|
|
|
overrideScope = f: callPackageWithScope (mkScope (fix' (extends f scope.__unfix__))) drv args;
|
|
|
|
};
|
|
|
|
|
|
|
|
mkScope = scope : pkgs // pkgs.xorg // pkgs.gnome2 // scope;
|
|
|
|
|
2015-11-27 13:19:50 +00:00
|
|
|
idrisPackages = self: let
|
2017-09-29 14:11:26 +01:00
|
|
|
defaultScope = mkScope self;
|
|
|
|
|
|
|
|
callPackage = callPackageWithScope defaultScope;
|
2015-11-27 14:35:59 +00:00
|
|
|
|
2015-11-27 14:55:22 +00:00
|
|
|
builtins_ = pkgs.lib.mapAttrs self.build-builtin-package {
|
2015-11-27 14:35:59 +00:00
|
|
|
prelude = [];
|
|
|
|
|
|
|
|
base = [ self.prelude ];
|
|
|
|
|
|
|
|
contrib = [ self.prelude self.base ];
|
|
|
|
|
|
|
|
effects = [ self.prelude self.base ];
|
|
|
|
|
|
|
|
pruviloj = [ self.prelude self.base ];
|
|
|
|
};
|
|
|
|
|
2017-11-06 18:18:59 +00:00
|
|
|
in
|
|
|
|
{
|
2017-11-02 21:51:35 +00:00
|
|
|
inherit idris-no-deps callPackage;
|
|
|
|
# See #10450 about why we have to wrap the executable
|
|
|
|
idris =
|
|
|
|
(pkgs.callPackage ./idris-wrapper.nix {})
|
|
|
|
idris-no-deps
|
|
|
|
{ path = [ pkgs.gcc ]; lib = [pkgs.gmp]; };
|
2015-11-27 14:35:59 +00:00
|
|
|
|
2017-11-06 18:18:59 +00:00
|
|
|
|
|
|
|
with-packages = callPackage ./with-packages.nix {} ;
|
|
|
|
|
|
|
|
build-builtin-package = callPackage ./build-builtin-package.nix {};
|
|
|
|
|
|
|
|
build-idris-package = callPackage ./build-idris-package.nix {};
|
|
|
|
|
|
|
|
# Libraries
|
|
|
|
|
2015-11-27 18:17:17 +00:00
|
|
|
# A list of all of the libraries that come with idris
|
2015-11-27 14:55:22 +00:00
|
|
|
builtins = pkgs.lib.mapAttrsToList (name: value: value) builtins_;
|
2017-11-06 18:18:59 +00:00
|
|
|
|
|
|
|
httpclient = callPackage ./httpclient.nix {};
|
|
|
|
|
|
|
|
lightyear = callPackage ./lightyear.nix {};
|
|
|
|
|
|
|
|
wl-pprint = callPackage ./wl-pprint.nix {};
|
|
|
|
|
|
|
|
specdris = callPackage ./specdris.nix {};
|
|
|
|
|
|
|
|
|
2015-11-27 14:55:22 +00:00
|
|
|
} // builtins_;
|
2015-11-27 13:19:50 +00:00
|
|
|
in fix' (extends overrides idrisPackages)
|