diff --git a/pkgs/development/libraries/agda/generic/default.nix b/pkgs/development/libraries/agda/generic/default.nix new file mode 100644 index 000000000000..1287e08bda1d --- /dev/null +++ b/pkgs/development/libraries/agda/generic/default.nix @@ -0,0 +1,31 @@ +{ lib, mkDerivation, fetchFromGitHub, standard-library }: + +mkDerivation rec { + pname = "generic"; + version = "0.1"; + + src = fetchFromGitHub { + repo = "Generic"; + owner = "effectfully"; + rev = "v${version}"; + sha256 = "121121rg3daaqp91845fbyws6g28hyj1ywmh12n54r3nicb35g5q"; + }; + + 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; { + 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/pkgs/top-level/agda-packages.nix b/pkgs/top-level/agda-packages.nix index 5b5b2d19181c..3209aff94968 100644 --- a/pkgs/top-level/agda-packages.nix +++ b/pkgs/top-level/agda-packages.nix @@ -24,5 +24,7 @@ let agda-categories = callPackage ../development/libraries/agda/agda-categories { }; cubical = callPackage ../development/libraries/agda/cubical { }; + + generic = callPackage ../development/libraries/agda/generic { }; }; in mkAgdaPackages Agda