Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agda-categories: init at 0.1 #74773

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pkgs/development/libraries/agda/agda-categories/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ lib, agda, fetchFromGitHub, AgdaStdlib }:

agda.mkDerivation (self: rec {
version = "0.1";
pname = "agda-categories";
name = "${pname}-${version}";

src = fetchFromGitHub {
owner = "agda";
repo = pname;
rev = "release/v${version}";
sha256 = "0m4pjy92jg6zfziyv0bxv5if03g8k4413ld8c3ii2xa8bzfn04m2";
};

# Remove the dependency in the agda file as this breaks the current agda infrastructure
patches = [ ./depend.patch ];
sourceDirectories = [ "Categories" "Relation" ];

buildDepends = [ AgdaStdlib ];

meta = with lib; {
inherit (src.meta) homepage;
description = "A new Categories library";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ alexarice ];
};
})
9 changes: 9 additions & 0 deletions pkgs/development/libraries/agda/agda-categories/depend.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --git a/agda-categories.agda-lib b/agda-categories.agda-lib
index cc76242..888b196 100644
--- a/agda-categories.agda-lib
+++ b/agda-categories.agda-lib
@@ -1,3 +1,2 @@
name: agda-categories
-depend: standard-library
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps AgdaStdLib is badly named so it can't detect it. Probably it'd not be too hard to figure out what this agda-lib stuff is looking for and make it so that AgdaStdLib dependency is picked up by it without changing this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the default for all the agda-lib stuff is ~/.agda which isn't a very convenient location for nix. I believe this can be modified by the AGDA_DIR environment variable so I might have a play around at some point if I have time. I wonder if wrapping agda to have this set to some nix generated folder would allow the agda builder to be simpler/ make an agdaWithPackages derivation very easy

include: .
\ No newline at end of file
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6638,7 +6638,7 @@ in
thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { };

tiled = libsForQt5.callPackage ../applications/editors/tiled { };

tiledb = callPackage ../development/libraries/tiledb { };

timemachine = callPackage ../applications/audio/timemachine { };
Expand Down Expand Up @@ -14670,6 +14670,8 @@ in

agdaBase = callPackage ../development/libraries/agda/agda-base { };

agda-categories = callPackage ../development/libraries/agda/agda-categories { };

agdaIowaStdlib = callPackage ../development/libraries/agda/agda-iowa-stdlib { };

agdaPrelude = callPackage ../development/libraries/agda/agda-prelude { };
Expand Down