From f59e705eca2f3dc5a1cc7d9a9fad62ac67b95a04 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 15 Jun 2020 11:54:01 -0400 Subject: break out an agda.nix --- home/modules/development.nix | 3 +- home/modules/development/agda.nix | 61 +++++++++++++++++++++++++++++++++++++++ home/modules/emacs.nix | 2 -- 3 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 home/modules/development/agda.nix diff --git a/home/modules/development.nix b/home/modules/development.nix index 04c672539fff..39e964d1da3e 100644 --- a/home/modules/development.nix +++ b/home/modules/development.nix @@ -32,6 +32,7 @@ with lib; ./lib/zshFunctions.nix ./development/kube.nix ./development/urbint.nix + ./development/agda.nix ]; home.packages = with pkgs; [ @@ -48,8 +49,6 @@ with lib; clj2nix - haskellPackages.Agda - AgdaStdlib pg-dump-upsert (import ../pkgs/clang-tools { inherit pkgs; }) diff --git a/home/modules/development/agda.nix b/home/modules/development/agda.nix new file mode 100644 index 000000000000..7a197e907f3c --- /dev/null +++ b/home/modules/development/agda.nix @@ -0,0 +1,61 @@ +{ config, lib, pkgs, ... }: + +let + + nixpkgs-unstable = import {}; + + agda-categories = with nixpkgs-unstable.agdaPackages; mkDerivation rec { + pname = "agda-categories"; + version = "2128fab"; + src = pkgs.fetchFromGitHub { + owner = "agda"; + repo = "agda-categories"; + rev = version; + sha256 = "08mc20qaz9vp5rhi60rh8wvjkg5aby3bgwwdhfnxha1663qf1q24"; + }; + + buildInputs = [ standard-library ]; + }; + +in + +{ + imports = [ + ../lib/cloneRepo.nix + ]; + + home.packages = with pkgs; [ + (nixpkgs-unstable.agda.withPackages + (p: with p; [ + p.standard-library + + ])) + ]; + + grfn.impure.clonedRepos = { + agda-stdlib = { + github = "agda/agda-stdlib"; + path = "code/agda-stdlib"; + }; + + agda-categories = { + github = "agda/agda-categories"; + path = "code/agda-categories"; + }; + + categories-examples = { + github = "agda/categories-examples"; + path = "code/categories-examples"; + }; + }; + + home.file.".agda/defaults".text = '' + standard-library + ''; + + home.file.".agda/libraries".text = '' + ${config.home.homeDirectory}/code/agda-stdlib/standard-library.agda-lib + ${config.home.homeDirectory}/code/agda-categories/agda-categories.agda-lib + ''; + +} diff --git a/home/modules/emacs.nix b/home/modules/emacs.nix index b6b8994638df..3f82880d2bd6 100644 --- a/home/modules/emacs.nix +++ b/home/modules/emacs.nix @@ -21,8 +21,6 @@ in { config = mkMerge [ { home.packages = with pkgs; [ - haskellPackages.Agda - # LaTeX (for org export) (pkgs.texlive.combine { inherit (pkgs.texlive) -- cgit 1.4.1