3
0
Fork 0
forked from mirrors/nixpkgs

idris-modules: documentation

This commit is contained in:
Shea Levy 2015-11-27 13:17:17 -05:00
parent 0dce60b34d
commit 0f90c9dbc1
6 changed files with 46 additions and 10 deletions

View file

@ -1,4 +1,7 @@
{ idris, build-idris-package }: name: deps: build-idris-package (args: {
# Build one of the packages that come with idris
# name: The name of the package
# deps: The dependencies of the package
{ idris, build-idris-package, lib }: name: deps: build-idris-package {
inherit name;
propagatedBuildInputs = deps;
@ -9,4 +12,8 @@
mv $sourceRoot/libs/${name} $IDRIS_LIBRARY_PATH
sourceRoot=$IDRIS_LIBRARY_PATH/${name}
'';
})
meta = idris.meta // {
description = "${name} builtin Idris library";
};
}

View file

@ -1,4 +1,8 @@
{ stdenv, idris, gmp }: argf: let args = {
# Build an idris package
#
# args: Additional arguments to pass to mkDerivation. Generally should include at least
# name and src.
{ stdenv, idris, gmp }: args: stdenv.mkDerivation ({
preHook = ''
mkdir idris-libs
export IDRIS_LIBRARY_PATH=$PWD/idris-libs
@ -33,4 +37,4 @@
'';
buildInputs = [ gmp ];
}; in stdenv.mkDerivation (args // (argf args))
} // args)

View file

@ -28,9 +28,14 @@
files = builtins.filter (n: n != "default") (pkgs.lib.mapAttrsToList (name: type: let
m = builtins.match "(.*)\.nix" name;
in if m == null then "default" else builtins.head m) (builtins.readDir ./.));
in (builtins.listToAttrs (map (name: { inherit name; value = callPackage (./. + "/${name}.nix") {}; }) files)) // {
in (builtins.listToAttrs (map (name: {
inherit name;
value = callPackage (./. + "/${name}.nix") {};
}) files)) // {
inherit idris callPackage;
# A list of all of the libraries that come with idris
builtins = pkgs.lib.mapAttrsToList (name: value: value) builtins_;
} // builtins_;
in fix' (extends overrides idrisPackages)

View file

@ -1,7 +1,9 @@
{ stdenv, idris }: buildInputs: stdenv.mkDerivation {
# Build a version of idris with a set of packages visible
# packages: The packages visible to idris
{ stdenv, idris }: packages: stdenv.mkDerivation {
inherit (idris) name;
inherit buildInputs;
buildInputs = packages;
preHook = ''
mkdir -p $out/lib/${idris.name}

View file

@ -1,4 +1,10 @@
{ build-idris-package, fetchgit, prelude, base }: build-idris-package (args : {
{ build-idris-package
, fetchgit
, prelude
, base
, lib
, idris
}: build-idris-package {
name = "wl-pprint";
src = fetchgit {
@ -8,4 +14,14 @@
};
propagatedBuildInputs = [ prelude base ];
})
meta = {
description = "Wadler-Leijen pretty-printing library";
homepage = https://github.com/shayan-najd/wl-pprint;
license = lib.licenses.bsd2;
inherit (idris.meta) platforms;
};
}

View file

@ -4121,7 +4121,9 @@ let
icedtea_web = icedtea8_web;
idrisPackages = callPackage ../development/idris-modules { inherit (haskellPackages) idris; };
idrisPackages = callPackage ../development/idris-modules {
inherit (haskellPackages) idris;
};
ikarus = callPackage ../development/compilers/ikarus { };