git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #100351 from turion/dev_add_agdarsec

agdarsec: init at 0.4.1

commitd3ee4ba650985024fe56e6c9af4f60e5ec3b3f45 authorAnderson Torres <torres.anderson.85@protonmail.com> dateWed 6 Oct 2021, 17:48 (5 years ago) parent1d88d6f2e5ce89
3 files changed+33−1
pkgs/build-support/agda/default.nix+3−1 pkgs/development/libraries/agda/agdarsec/default.nix+28 pkgs/top-level/agda-packages.nix+2
pkgs/build-support/agda/default.nix+3−1
@@ -49,6 +49,7 @@ let
4949 , meta
5050 , buildInputs ? []
5151 , everythingFile ? "./Everything.agda"
52+ , includePaths ? []
5253 , libraryName ? pname
5354 , libraryFile ? "${libraryName}.agda-lib"
5455 , buildPhase ? null
@@ -57,6 +58,7 @@ let
5758 , ...
5859 }: let
5960 agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
61+ includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
6062 in
6163 {
6264 inherit libraryName libraryFile;
@@ -67,7 +69,7 @@ let
6769
6870 buildPhase = if buildPhase != null then buildPhase else ''
6971 runHook preBuild
70− agda -i ${dirOf everythingFile} ${everythingFile}
72+ agda ${includePathArgs} ${everythingFile}
7173 runHook postBuild
7274 '';
7375
pkgs/development/libraries/agda/agdarsec/default.nixnew file+28
@@ -0,0 +1,28 @@
1+{ lib, mkDerivation, fetchFromGitHub
2+, standard-library }:
3+
4+mkDerivation rec {
5+ pname = "agdarsec";
6+ version = "0.4.1";
7+
8+ src = fetchFromGitHub {
9+ owner = "gallais";
10+ repo = "agdarsec";
11+ rev = "v${version}";
12+ sha256 = "02fqkycvicw6m2xsz8p01aq8n3gj2d2gyx8sgj15l46f8434fy0x";
13+ };
14+
15+ everythingFile = "./index.agda";
16+
17+ includePaths = [ "src" "examples" ];
18+
19+ buildInputs = [ standard-library ];
20+
21+ meta = with lib; {
22+ homepage = "https://gallais.github.io/agdarsec/";
23+ description = "Total Parser Combinators in Agda";
24+ license = licenses.gpl3;
25+ platforms = platforms.unix;
26+ maintainers = with maintainers; [ turion ];
27+ };
28+}
pkgs/top-level/agda-packages.nix+2
@@ -31,5 +31,7 @@ let
3131 ../development/libraries/agda/functional-linear-algebra { };
3232
3333 generic = callPackage ../development/libraries/agda/generic { };
34+
35+ agdarsec = callPackage ../development/libraries/agda/agdarsec { };
3436 };
3537in mkAgdaPackages Agda