nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildGoModule,
5 fetchFromGitHub,
6}:
7
8buildGoModule rec {
9 pname = "swego";
10 version = "1.14";
11
12 src = fetchFromGitHub {
13 owner = "nodauf";
14 repo = "Swego";
15 tag = "v${version}";
16 hash = "sha256-28PU7jAVnWfRbFmTE2pmwJO1Zi+ceyFrzY5MiRt+91Y=";
17 };
18
19 vendorHash = "sha256-w2OhZq7vaVDVoRfnWPH0bFO85yGTFcO6KpDo5ulTifo=";
20
21 postInstall = ''
22 mv $out/bin/src $out/bin/$pname
23 '';
24
25 ldflags = [
26 "-w"
27 "-s"
28 ];
29
30 meta = {
31 description = "Simple Webserver";
32 longDescription = ''
33 Swiss army knife Webserver in Golang. Similar to the Python
34 SimpleHTTPServer but with many features.
35 '';
36 homepage = "https://github.com/nodauf/Swego";
37 changelog = "https://github.com/nodauf/Swego/releases/tag/${src.tag}";
38 license = lib.licenses.gpl2Only;
39 maintainers = with lib.maintainers; [ fab ];
40 # darwin crashes with:
41 # src/controllers/parsingArgs.go:130:4: undefined: PrintEmbeddedFiles
42 broken = stdenv.hostPlatform.isDarwin;
43 mainProgram = "swego";
44 };
45}