From 57518cd0bf2487403414da193ebc98c7f51c6842 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 11 Oct 2020 22:36:26 +0200 Subject: [PATCH] git: remove test dependencies on delta and git-lfs --- tests/modules/programs/git/git-expected.conf | 4 ++-- tests/modules/programs/git/git.nix | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/modules/programs/git/git-expected.conf b/tests/modules/programs/git/git-expected.conf index c3e534af0..fe258a0d3 100644 --- a/tests/modules/programs/git/git-expected.conf +++ b/tests/modules/programs/git/git-expected.conf @@ -7,7 +7,7 @@ gpgSign = true [core] - pager = "@deltaCommand@" + pager = "@delta@/bin/delta" [delta] features = "decorations" @@ -41,7 +41,7 @@ program = "path-to-gpg" [interactive] - diffFilter = "@deltaCommand@ --color-only" + diffFilter = "@delta@/bin/delta --color-only" [user] email = "user@example.org" diff --git a/tests/modules/programs/git/git.nix b/tests/modules/programs/git/git.nix index feefff54b..981d19348 100644 --- a/tests/modules/programs/git/git.nix +++ b/tests/modules/programs/git/git.nix @@ -14,9 +14,6 @@ let substituteExpected = path: pkgs.substituteAll { src = path; - - deltaCommand = "${pkgs.gitAndTools.delta}/bin/delta"; - git_include_path = pkgs.writeText "contents" (builtins.readFile ./git-expected-include.conf); }; @@ -82,6 +79,17 @@ in { } ]; + nixpkgs.overlays = [ + (self: super: { + git-lfs = pkgs.writeScriptBin "dummy-git-lfs" ""; + gitAndTools = super.gitAndTools // { + delta = pkgs.writeScriptBin "dummy-delta" "" // { + outPath = "@delta@"; + }; + }; + }) + ]; + nmt.script = '' assertFileExists home-files/.config/git/config assertFileContent home-files/.config/git/config ${