Merge pull request #100351 from turion/dev_add_agdarsec

agdarsec: init at 0.4.1
This commit is contained in:
Anderson Torres 2021-10-06 17:48:25 -03:00 committed by GitHub
commit d3ee4ba650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 1 deletions

View file

@ -49,6 +49,7 @@ let
, meta
, buildInputs ? []
, everythingFile ? "./Everything.agda"
, includePaths ? []
, libraryName ? pname
, libraryFile ? "${libraryName}.agda-lib"
, buildPhase ? null
@ -57,6 +58,7 @@ let
, ...
}: let
agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
in
{
inherit libraryName libraryFile;
@ -67,7 +69,7 @@ let
buildPhase = if buildPhase != null then buildPhase else ''
runHook preBuild
agda -i ${dirOf everythingFile} ${everythingFile}
agda ${includePathArgs} ${everythingFile}
runHook postBuild
'';

View file

@ -0,0 +1,28 @@
{ lib, mkDerivation, fetchFromGitHub
, standard-library }:
mkDerivation rec {
pname = "agdarsec";
version = "0.4.1";
src = fetchFromGitHub {
owner = "gallais";
repo = "agdarsec";
rev = "v${version}";
sha256 = "02fqkycvicw6m2xsz8p01aq8n3gj2d2gyx8sgj15l46f8434fy0x";
};
everythingFile = "./index.agda";
includePaths = [ "src" "examples" ];
buildInputs = [ standard-library ];
meta = with lib; {
homepage = "https://gallais.github.io/agdarsec/";
description = "Total Parser Combinators in Agda";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ turion ];
};
}

View file

@ -31,5 +31,7 @@ let
../development/libraries/agda/functional-linear-algebra { };
generic = callPackage ../development/libraries/agda/generic { };
agdarsec = callPackage ../development/libraries/agda/agdarsec { };
};
in mkAgdaPackages Agda