From ba91ac59489f288e74c7b5b733d26c303dd3a774 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 6 Jun 2020 16:37:27 +0200 Subject: [PATCH] texlive: remove upstream dependency in tests This changes the tests to not require downloading the texlive distribution. --- .../programs/texlive/texlive-minimal.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/modules/programs/texlive/texlive-minimal.nix b/tests/modules/programs/texlive/texlive-minimal.nix index df143dbc..1b13936b 100644 --- a/tests/modules/programs/texlive/texlive-minimal.nix +++ b/tests/modules/programs/texlive/texlive-minimal.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; @@ -6,8 +6,22 @@ with lib; config = { programs.texlive.enable = true; + # Set up a minimal mocked texlive package set. + nixpkgs.overlays = [ + (self: super: { + texlive = { + collection-basic = pkgs.writeTextDir "collection-basic" ""; + combine = tpkgs: + pkgs.symlinkJoin { + name = "dummy-texlive-combine"; + paths = attrValues tpkgs; + }; + }; + }) + ]; + nmt.script = '' - assertFileExists home-path/bin/tex + assertFileExists home-path/collection-basic ''; }; }