1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6 testers,
7 shell2http,
8}:
9
10buildGoModule rec {
11 pname = "shell2http";
12 version = "1.17.0";
13
14 src = fetchFromGitHub {
15 owner = "msoap";
16 repo = "shell2http";
17 rev = "v${version}";
18 hash = "sha256-CU7ENLx5C1qCO1f9m0fl/AmUzmtmj6IjMlx9WNqAnS0=";
19 };
20
21 vendorHash = "sha256-K/0ictKvX0sl/5hFDKjTkpGMze0x9fJA98RXNsep+DM=";
22
23 nativeBuildInputs = [
24 installShellFiles
25 ];
26
27 ldflags = [
28 "-s"
29 "-w"
30 "-X=main.version=${version}"
31 ];
32
33 postInstall = ''
34 installManPage shell2http.1
35 '';
36
37 passthru.tests = {
38 version = testers.testVersion {
39 package = shell2http;
40 };
41 };
42
43 __darwinAllowLocalNetworking = true;
44
45 meta = with lib; {
46 description = "Executing shell commands via HTTP server";
47 mainProgram = "shell2http";
48 homepage = "https://github.com/msoap/shell2http";
49 changelog = "https://github.com/msoap/shell2http/releases/tag/${src.rev}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ figsoda ];
52 };
53}