Refactor Idris packaging infrastructure
The main two changes are
1. Completely rewrite how with-packages works to remove use of envHooks
2. The package description is now an idris specific set rather than
being a subset of the arguments to mkDerivation. This mirrors the
way Haskell packages are treated.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Build one of the packages that come with idris
|
||||
# Build one of the packages that comes with idris
|
||||
# name: The name of the package
|
||||
# deps: The dependencies of the package
|
||||
{ idris, build-idris-package, lib }: name: deps:
|
||||
@@ -6,20 +6,16 @@ let
|
||||
inherit (builtins.parseDrvName idris.name) version;
|
||||
in
|
||||
build-idris-package {
|
||||
name = "${name}-${version}";
|
||||
|
||||
propagatedBuildInputs = deps;
|
||||
|
||||
inherit name version;
|
||||
inherit (idris) src;
|
||||
|
||||
idrisDeps = deps;
|
||||
|
||||
postUnpack = ''
|
||||
sourceRoot=$sourceRoot/libs/${name}
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
sed -i ${name}.ipkg -e "/^opts/ s|-i \\.\\./|-i $IDRIS_LIBRARY_PATH/|g"
|
||||
'';
|
||||
|
||||
meta = idris.meta // {
|
||||
description = "${name} builtin Idris library";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user