From 61c17e326f9c0f6fd742889c1b8743df83b79c0f Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Mon, 1 Sep 2014 01:31:17 +0100 Subject: [PATCH] Use agda builder for stdlib. mv to all-packages --- pkgs/development/compilers/agda/stdlib.nix | 26 +++++++++------------- pkgs/top-level/all-packages.nix | 4 ++++ pkgs/top-level/haskell-packages.nix | 1 - 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/agda/stdlib.nix b/pkgs/development/compilers/agda/stdlib.nix index d0ae1394f89..2857a7d3d71 100644 --- a/pkgs/development/compilers/agda/stdlib.nix +++ b/pkgs/development/compilers/agda/stdlib.nix @@ -1,7 +1,10 @@ -{ cabal, fetchurl, filemanip, Agda }: +{ stdenv, agda, fetchurl, ghcWithPackages }: -cabal.mkDerivation (self: rec { - pname = "Agda-stdlib"; +let + ghc = ghcWithPackages (s: [ s.filemanip ]); +in +agda.mkDerivation (self: rec { + name = "Agda-stdlib"; version = "0.8.1"; src = fetchurl { @@ -9,23 +12,16 @@ cabal.mkDerivation (self: rec { sha256 = "0ij4rg4lk0pq01ing285gbmnn23dcf2rhihdcs8bbdpjg52vl4gf"; }; - 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 + preConfigure = '' + ${ghc}/bin/runhaskell GenerateEverything.hs ''; + topSourceDirectories = [ "src" ]; + 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 ]; + maintainers = with stdenv.lib.maintaianers; [ jwiegley ]; }; }) \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9770b178e44..6a0fd08cca7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6535,6 +6535,10 @@ let inherit writeScriptBin; }; + AgdaStdlib = callPackage ../development/compilers/agda/stdlib.nix { + ghcWithPackages = haskellPackages.ghcWithPackages; + }; + ### DEVELOPMENT / LIBRARIES / JAVA atermjava = callPackage ../development/libraries/java/aterm { diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index b074a6ab48d..9afe4b715aa 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -2888,7 +2888,6 @@ self : let callPackage = x : y : modifyPrio (newScope self x y); in # Compilers. Agda = callPackage ../development/compilers/agda {}; - AgdaStdlib = callPackage ../development/compilers/agda/stdlib.nix {}; uhc = callPackage ../development/compilers/uhc {};