Skip to content

Commit

Permalink
add simple override test
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Theil <theil.markus@gmail.com>
  • Loading branch information
thillux committed Aug 13, 2024
1 parent 2fed634 commit 2b90911
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ let
'';

inherit (pkgs) lib;
# Generate a git repository hat can be served via HTTP.

# Generate a git repository that can be served via HTTP.
#
# By default the repository will contain an empty `test.txt`
# file. For all defined tags the name of the tag is written to that
Expand Down Expand Up @@ -423,4 +424,17 @@ in
'';
};
};

gitDependencyOverride = mkGitTest rec {
name = "git-dependency-override";
repositories."foo" = gitRepo;
commands = ''
npins init --bare
npins add git http://localhost:8000/foo -b test-branch
npins show
OUTPATH=$(NPINS_OVERRIDE_foo=/foo nix-instantiate --eval npins -A foo.outPath --impure)
eq "$OUTPATH" /foo
'';
};
}

0 comments on commit 2b90911

Please sign in to comment.