about summary refs log tree commit diff
path: root/pkgs/servers/swego/default.nix
blob: a446648099441006dc2d2929bce8b82459d25b26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
}:

buildGoModule rec {
  pname = "swego";
  version = "1.12";

  src = fetchFromGitHub {
    owner = "nodauf";
    repo = "Swego";
    rev = "refs/tags/v${version}";
    hash = "sha256-roaAzh6Mncu4qtaxEoXk41Mrmz/l7X1+n+Yh5skA65A=";
  };

  vendorHash = "sha256-mJWJdwbZq042//hM3WWp2rnLC1GebckUnsIopbF858Q=";

  postInstall = ''
    mv $out/bin/src $out/bin/$pname
  '';

  ldflags = [
    "-w"
    "-s"
  ];

  meta = with lib; {
    description = "Simple Webserver";
    longDescription = ''
      Swiss army knife Webserver in Golang. Similar to the Python
      SimpleHTTPServer but with many features.
    '';
    homepage = "https://github.com/nodauf/Swego";
    license = with licenses; [ gpl2Only ];
    maintainers = with maintainers; [ fab ];
    # darwin crashes with:
    # src/controllers/parsingArgs.go:130:4: undefined: PrintEmbeddedFiles
    broken = stdenv.isDarwin;
    mainProgram = "swego";
  };
}