Merge pull request #217654 from SuperSandro2000/croc
This commit is contained in:
commit
66a08872f2
@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "croc";
|
||||
version = "9.6.2";
|
||||
version = "9.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "schollz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-MaIvxO2bvLGrZmBLXZk2vgW1NtyoVKRxXEZALEwI/lY=";
|
||||
sha256 = "sha256-nAziLnuLkkPl1/RskKEehvQBMG4sYTEv+uPOQemum9w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-X+DxN0DAyZ/z8YRRjuezegcPHa6SJ3/XXPYP+1Apmjw=";
|
||||
vendorSha256 = "sha256-yZ7S/6I5xdrfmyPkZsUUavXum8RqEVrlgrkJMQZc6IQ=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
@ -2,18 +2,27 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "croc-test-local-relay";
|
||||
meta.timeout = 300;
|
||||
|
||||
nativeBuildInputs = [ croc ];
|
||||
|
||||
buildCommand = ''
|
||||
HOME=$(mktemp -d)
|
||||
# start a local relay
|
||||
${croc}/bin/croc relay --ports 11111,11112 &
|
||||
# start sender in background
|
||||
MSG="See you later, alligator!"
|
||||
${croc}/bin/croc --relay localhost:11111 send --code correct-horse-battery-staple --text "$MSG" &
|
||||
# wait for things to settle
|
||||
sleep 1
|
||||
MSG2=$(${croc}/bin/croc --relay localhost:11111 --yes correct-horse-battery-staple)
|
||||
# compare
|
||||
[ "$MSG" = "$MSG2" ] && touch $out
|
||||
HOME=$(mktemp -d)
|
||||
# start a local relay
|
||||
croc relay --ports 11111,11112 &
|
||||
# start sender in background
|
||||
MSG="See you later, alligator!"
|
||||
croc --relay localhost:11111 send --code correct-horse-battery-staple --text "$MSG" &
|
||||
# wait for things to settle
|
||||
sleep 1
|
||||
MSG2=$(croc --relay localhost:11111 --yes correct-horse-battery-staple)
|
||||
# compare
|
||||
[ "$MSG" = "$MSG2" ] && touch $out
|
||||
'';
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = {
|
||||
timeout = 300;
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user