Skip to content

Commit

Permalink
Fix Agda-related nix shell error and add texlive
Browse files Browse the repository at this point in the history
  • Loading branch information
Unisay authored and zeme-wana committed Oct 8, 2024
1 parent 3b63513 commit 58b882d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
31 changes: 19 additions & 12 deletions nix/agda-packages.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{ repoRoot, inputs, pkgs, system, lib }:
{ repoRoot
, inputs
, pkgs
, system
, lib
,
}:

# We want to keep control of which version of Agda we use, so we supply our own and override
# the one from nixpkgs.
Expand All @@ -18,25 +24,26 @@
let
Agda = repoRoot.nix.agda-project.hsPkgs.Agda;

frankenAgda = (pkgs.symlinkJoin {
frankenAgdaBin = pkgs.symlinkJoin {
name = "agda";
version = Agda.identifier.version;
paths = [
Agda.components.exes.agda
Agda.components.exes.agda-mode
];
}) //
{
version = Agda.identifier.version;
};

frankenPkgs =
pkgs //
{
haskellPackages = pkgs.haskellPackages //
{
inherit (repoRoot.nix.agda-project) ghcWithPackages;
};
frankenAgda = frankenAgdaBin // {
# Newer Agda is built with enableSeparateBinOutput, hence this hacky workaround.
# https://github.com/NixOS/nixpkgs/commit/294245f7501e0a8e69b83346a4fa5afd4ed33ab3
bin = frankenAgdaBin;
};

frankenPkgs = pkgs // {
haskellPackages = pkgs.haskellPackages // {
inherit (repoRoot.nix.agda-project) ghcWithPackages;
};
};
in

pkgs.agdaPackages.override {
Expand Down
3 changes: 3 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ in
repoRoot.nix.r-with-packages
pkgs.R

# LaTeX environment
pkgs.texlive

# Misc useful stuff, could make these commands but there's a lot already
pkgs.jekyll
pkgs.plantuml
Expand Down

0 comments on commit 58b882d

Please sign in to comment.