about summary refs log tree commit diff
path: root/nix/pkgs/r2wars-web/default.nix
blob: 1d55de384ca625a4ac5f9259a49f669e4c02c2c9 (plain)
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
{
  pkgs,
  lib,
  fetchFromGitHub,
  ...
}:

pkgs.buildGoModule rec {
  name = "r2wars-web-${version}";
  version = "0.1.2";

  src = fetchFromGitHub {
    owner = "hanemile";
    repo = "r2wars-web";
    rev = "main";    
    sha256 = "sha256-cKvdMPysrJonoBqxiXWyb8Nn6qr2Zn6eQqyGWRMgmao=";
  };

  vendorHash = null;

  CGO_ENABLED = 0;
  subPackages = [ "src" ];

  postInstall = ''
    mkdir -p $out
    cp -r templates $out
    mv $out/bin/src $out/bin/r2wars-web
  '';

  doCheck = false;

  meta = {
    description = "A golang implementation of r2wars";
    homepage = "https://r2wa.rs";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ hanemile ];
  };
}