snicat: init at 0.0.1
This commit is contained in:
parent
3eaa8c8092
commit
760c8880b5
2 changed files with 57 additions and 0 deletions
12
pkgs/by-name/sn/snicat/deps.nix
generated
Normal file
12
pkgs/by-name/sn/snicat/deps.nix
generated
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/therootcompany/sclient";
|
||||||
|
fetch = {
|
||||||
|
type = "FromGitHub";
|
||||||
|
owner = "therootcompany";
|
||||||
|
repo = "sclient";
|
||||||
|
rev = "v1.5.0";
|
||||||
|
sha256 = "sha256-NAFTOx2sm92K+d746Z5UpB1HGsJI6cJgmh+YTyVkJ0w=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
45
pkgs/by-name/sn/snicat/package.nix
Normal file
45
pkgs/by-name/sn/snicat/package.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildGoPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
buildGoPackage rec {
|
||||||
|
pname = "snicat";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "CTFd";
|
||||||
|
repo = "snicat";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-fFlTBOz127le2Y7F9KKhbcldcyFEpAU5QiJ4VCAPs9Y=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
runHook prePatch
|
||||||
|
|
||||||
|
substituteInPlace snicat.go \
|
||||||
|
--replace-warn "v0.0.0" "v${version}"
|
||||||
|
|
||||||
|
runHook postPatch
|
||||||
|
'';
|
||||||
|
|
||||||
|
goPackagePath = "github.com/CTFd/snicat";
|
||||||
|
|
||||||
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -Dm555 go/bin/snicat $out/bin/sc
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "TLS & SNI aware netcat";
|
||||||
|
homepage = "https://github.com/CTFd/snicat";
|
||||||
|
license = licenses.asl20;
|
||||||
|
mainProgram = "sc";
|
||||||
|
maintainers = with maintainers; [ felixalbrigtsen ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue