2015-11-27 18:17:17 +00:00
|
|
|
# Build one of the packages that come with idris
|
|
|
|
# name: The name of the package
|
|
|
|
# deps: The dependencies of the package
|
2017-08-23 01:48:56 +01:00
|
|
|
{ idris, build-idris-package, lib }: name: deps:
|
|
|
|
let
|
|
|
|
inherit (builtins.parseDrvName idris.name) version;
|
|
|
|
in
|
|
|
|
build-idris-package {
|
|
|
|
name = "${name}-${version}";
|
2015-11-27 14:35:59 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = deps;
|
|
|
|
|
|
|
|
inherit (idris) src;
|
|
|
|
|
|
|
|
postUnpack = ''
|
2017-08-23 01:49:25 +01:00
|
|
|
sourceRoot=$sourceRoot/libs/${name}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i ${name}.ipkg -e "/^opts/ s|-i \\.\\./|-i $IDRIS_LIBRARY_PATH/|g"
|
2015-11-27 14:35:59 +00:00
|
|
|
'';
|
2015-11-27 18:17:17 +00:00
|
|
|
|
|
|
|
meta = idris.meta // {
|
|
|
|
description = "${name} builtin Idris library";
|
|
|
|
};
|
|
|
|
}
|