summary refs log tree commit diff
path: root/pkgs/development/compilers/agda/stdlib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/agda/stdlib.nix')
-rw-r--r--pkgs/development/compilers/agda/stdlib.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/compilers/agda/stdlib.nix b/pkgs/development/compilers/agda/stdlib.nix
new file mode 100644
index 00000000000..913ae5cd90f
--- /dev/null
+++ b/pkgs/development/compilers/agda/stdlib.nix
@@ -0,0 +1,31 @@
+{ cabal, fetchurl, filemanip, Agda }:
+
+cabal.mkDerivation (self: rec {
+  pname = "Agda-stdlib";
+  version = "0.8";
+
+  src = fetchurl {
+    url = "https://github.com/agda/agda-stdlib/archive/v${version}.tar.gz";
+    sha256 = "03gdcy2gar46qlmd6w91y05cm1x304ig6bda90ryww9qn05kif78";
+  };
+
+  buildDepends = [ filemanip Agda ];
+
+  preConfigure = "cd ffi";
+
+  postInstall = ''
+      mkdir -p $out/share
+      cd ..
+      ${self.ghc.ghc}/bin/runhaskell GenerateEverything
+      ${Agda}/bin/agda -i . -i src Everything.agda
+      cp -pR src $out/share/agda
+  '';
+
+  meta = {
+    homepage = "http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
+    description = "A standard library for use with the Agda compiler.";
+    license = "unknown";
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.jwiegley ];
+  };
+})
\ No newline at end of file