Skip to content

Commit

Permalink
test git get
Browse files Browse the repository at this point in the history
  • Loading branch information
bpaulin committed Oct 29, 2022
1 parent 5248772 commit 42c0a72
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
29 changes: 18 additions & 11 deletions modules/work/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,25 @@
bitwarden-cli
];

programs.git = {
includes = [
{
condition = "gitdir:**/*github.com/myERP/**";
contents = {
user = {
email = "bruno@oneup.com";
signingKey = config.id_pub.oneup;
programs = {
git = {
includes = [
{
condition = "gitdir:**/*github.com/myERP/**";
contents = {
user = {
email = "bruno@oneup.com";
signingKey = config.id_pub.oneup;
};
};
};
}
];
}
];
};
ssh = {
extraConfig = "
IdentityFile /home/bpaulin/.ssh/id_ed25519_oneup
";
};
};
};
};
Expand Down
14 changes: 11 additions & 3 deletions pkgs/nixpkgs/git-get/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, pkgs }:

buildGoModule rec{
pname = "git-get";
version = "0.5.0";
doCheck = false;

src = fetchFromGitHub {
owner = "grdl";
repo = "git-get";
rev = "v${version}";
sha256 = "BantFytvr+grCZjUME9Hm3k+8c+NcNYnKuagrUrQOww=";
};

vendorSha256 = "C+XOjMDMFneKJNeBh0KWPx8yM7XiiIpTlc2daSfhZhY=";

doCheck = true;
checkInputs = [ pkgs.git ];
preCheck = ''
export HOME=$(pwd)
git config --global user.email "user@example.com"
git config --global user.user "user"
# this test tries to access /root
rm pkg/git/finder_test.go
'';

ldflags = [
"-s"
"-w"
Expand Down

0 comments on commit 42c0a72

Please sign in to comment.