about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/agda
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/agda')
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/1lab/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/cubical/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/generic/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix30
9 files changed, 281 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix b/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix
new file mode 100644
index 000000000000..81afbe4886cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix
@@ -0,0 +1,32 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation rec {
+  pname = "1lab";
+  version = "unstable-2023-03-07";
+
+  src = fetchFromGitHub {
+    owner = "plt-amy";
+    repo = pname;
+    # Last commit that compiles with Agda 2.6.3
+    rev = "c6ee57a2da327def241324b4775ec2c67cdab2af";
+    hash = "sha256-zDqFaDZxAdFxYM6l2zc7ZTi4XwMThw1AQwHfvhOxzdg=";
+  };
+
+  # We don't need anything in support; avoid installing LICENSE.agda
+  postPatch = ''
+    rm -rf support
+  '';
+
+  libraryName = "cubical-1lab";
+  libraryFile = "1lab.agda-lib";
+  everythingFile = "src/index.lagda.md";
+
+  meta = with lib; {
+    description =
+      "A formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory ";
+    homepage = src.meta.homepage;
+    license = licenses.agpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ncfavier ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix b/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix
new file mode 100644
index 000000000000..ff520fb85ef3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix
@@ -0,0 +1,38 @@
+{ lib, mkDerivation, fetchFromGitHub, standard-library }:
+
+mkDerivation rec {
+  version = "0.1.7.1a";
+  pname = "agda-categories";
+
+  src = fetchFromGitHub {
+    owner = "agda";
+    repo = "agda-categories";
+    rev = "v${version}";
+    sha256 = "sha256-VlxRDxXg+unzYlACUU58JQUHXxtg0fI5dEQvlBRxJtU=";
+  };
+
+  postPatch = ''
+    # Remove this once agda-categories incorporates this fix or once Agda's
+    # versioning system gets an overhaul in general. Right now there is no middle
+    # ground between "no version constraint" and "exact match down to patch". We
+    # do not want to need to change this postPatch directive on each minor
+    # version update of the stdlib, so we get rid of the version constraint
+    # altogether.
+    sed -Ei 's/standard-library-[0-9.]+/standard-library/' agda-categories.agda-lib
+
+    # The Makefile of agda-categories uses git(1) instead of find(1) to
+    # determine the list of source files. We cannot use git, as $PWD will not
+    # be a valid Git working directory.
+    find src -name '*.agda' | sed -e 's|^src/[/]*|import |' -e 's|/|.|g' -e 's/.agda//' -e '/import Everything/d' | LC_COLLATE='C' sort > Everything.agda
+  '';
+
+  buildInputs = [ standard-library ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A new Categories library";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix b/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix
new file mode 100644
index 000000000000..573b13d3b4f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix
@@ -0,0 +1,28 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation rec {
+  version = "unstable-2022-01-14";
+  pname = "agda-prelude";
+
+  src = fetchFromGitHub {
+    owner = "UlfNorell";
+    repo = "agda-prelude";
+    rev = "3d143d6d0a3f75966602480665623e87233ff93e";
+    hash = "sha256-ILhXDq788vrceMp5mCiQUMrJxeLPtS4yGtvMHMYxzg8=";
+  };
+
+  preConfigure = ''
+    cd test
+    make everything
+    mv Everything.agda ..
+    cd ..
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/UlfNorell/agda-prelude";
+    description = "Programming library for Agda";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+    maintainers = with maintainers; [ mudri alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix b/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix
new file mode 100644
index 000000000000..ccdf65f96570
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix
@@ -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 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix b/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix
new file mode 100644
index 000000000000..1ecf4b843c74
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix
@@ -0,0 +1,31 @@
+{ lib, mkDerivation, fetchFromGitHub, ghc }:
+
+mkDerivation rec {
+  pname = "cubical";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "agda";
+    rev = "v${version}";
+    hash = "sha256-47GOfZYwvE9TbGzdy/xSYZagTbjs/oeDpwjYUvI7z3k=";
+  };
+
+  # The cubical library has several `Everything.agda` files, which are
+  # compiled through the make file they provide.
+  nativeBuildInputs = [ ghc ];
+  buildPhase = ''
+    runHook preBuild
+    make
+    runHook postBuild
+  '';
+
+  meta = with lib; {
+    description =
+      "A cubical type theory library for use with the Agda compiler";
+    homepage = src.meta.homepage;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice ryanorendorff ncfavier ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix b/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix
new file mode 100644
index 000000000000..083741d58e94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, lib, mkDerivation, standard-library }:
+
+mkDerivation rec {
+  version = "0.4";
+  pname = "functional-linear-algebra";
+
+  buildInputs = [ standard-library ];
+
+  src = fetchFromGitHub {
+    repo = "functional-linear-algebra";
+    owner = "ryanorendorff";
+    rev = "v${version}";
+    sha256 = "05jk3792k9xf8iiwzm2hwlvd25f2pqqr3gppmqjf8xb9199i8fk0";
+  };
+
+  preConfigure = ''
+    sh generate-everything.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/ryanorendorff/functional-linear-algebra";
+    description = ''
+      Formalizing linear algebra in Agda by representing matrices as functions
+      from one vector space to another.
+    '';
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ryanorendorff ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/generic/default.nix b/nixpkgs/pkgs/development/libraries/agda/generic/default.nix
new file mode 100644
index 000000000000..855dd0f33c51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/generic/default.nix
@@ -0,0 +1,33 @@
+{ lib, mkDerivation, fetchFromGitHub, standard-library }:
+
+mkDerivation rec {
+  pname = "generic";
+  version = "0.1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "effectfully";
+    repo = "Generic";
+    rev = "v${version}";
+    sha256 = "05igsd2gaj6h9bkqwp8llhvn4qvc5gmi03x4fnz096ba8m6x8s3n";
+  };
+
+  buildInputs = [
+    standard-library
+  ];
+
+  preBuild = ''
+    echo "module Everything where" > Everything.agda
+    find src -name '*.agda' | sed -e 's/src\///;s/\//./g;s/\.agda$//;s/^/import /' >> Everything.agda
+  '';
+
+  meta = with lib; {
+    # Remove if a version compatible with agda 2.6.2 is made
+    broken = true;
+    description =
+      "A library for doing generic programming in Agda";
+    homepage = src.meta.homepage;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix b/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix
new file mode 100644
index 000000000000..1383cff9e55a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix
@@ -0,0 +1,31 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation (rec {
+  version = "1.5.0";
+  pname = "iowa-stdlib";
+
+  src = fetchFromGitHub {
+    owner = "cedille";
+    repo  = "ial";
+    rev = "v${version}";
+    sha256 = "0dlis6v6nzbscf713cmwlx8h9n2gxghci8y21qak3hp18gkxdp0g";
+  };
+
+  libraryFile = "";
+  libraryName = "IAL-1.3";
+
+  buildPhase = ''
+    patchShebangs find-deps.sh
+    make
+  '';
+
+  meta = {
+    homepage = "https://github.com/cedille/ial";
+    description = "Agda standard library developed at Iowa";
+    license = lib.licenses.free;
+    platforms = lib.platforms.unix;
+    # broken since Agda 2.6.1
+    broken = true;
+    maintainers = with lib.maintainers; [ alexarice turion ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix b/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix
new file mode 100644
index 000000000000..76f69f54d719
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix
@@ -0,0 +1,30 @@
+{ lib, mkDerivation, fetchFromGitHub, ghcWithPackages, nixosTests }:
+
+mkDerivation rec {
+  pname = "standard-library";
+  version = "1.7.2";
+
+  src = fetchFromGitHub {
+    repo = "agda-stdlib";
+    owner = "agda";
+    rev = "v${version}";
+    hash = "sha256-vvbyfC5+Yyx18IDikSbAAcTHHtU6krlz45Fd2YlwsBg=";
+  };
+
+  nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
+  preConfigure = ''
+    runhaskell GenerateEverything.hs
+    # We will only build/consider Everything.agda, in particular we don't want Everything*.agda
+    # do be copied to the store.
+    rm EverythingSafe.agda
+  '';
+
+  passthru.tests = { inherit (nixosTests) agda; };
+  meta = with lib; {
+    homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
+    description = "A standard library for use with the Agda compiler";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+    maintainers = with maintainers; [ jwiegley mudri alexarice turion ];
+  };
+}