about summary refs log tree commit diff
path: root/pkgs/servers/icebreaker/default.nix
blob: 0624a97be5e0ad8d48bb7c356f2d3bae8f9bf1f2 (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
{ lib
, buildGoModule
, fetchFromGitHub
, makeBinaryWrapper
}:

buildGoModule {
  pname = "icebreaker";
  version = "unstable-2023-08-13";

  src = fetchFromGitHub {
    owner = "jonhoo";
    repo = "icebreaker";
    rev = "71fe0679fcf82ccf458b47585cda09f3ef213155";
    hash = "sha256-d8x4Q4ZT0qrKWEIRbYVOUjhnkJWOgY0ct/+cjaSh7SU=";
  };

  proxyVendor = true;
  vendorHash = "sha256-A0jNy8cUKpfAqocgjdYU7LB4EgIr9tiOCyEaXGQl8TM=";

  nativeBuildInputs = [
    makeBinaryWrapper
  ];

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

  postInstall = ''
    mkdir -p $out/share
    cp -r static templates $out/share

    wrapProgram $out/bin/icebreaker \
      --chdir $out/share \
      --set-default GIN_MODE release
  '';

  meta = with lib; {
    description = "Web app that allows students to ask real-time, anonymous questions during class";
    homepage = "https://github.com/jonhoo/icebreaker";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
    mainProgram = "icebreaker";
  };
}