aboutsummaryrefslogtreecommitdiff
path: root/nix/vale.nix
blob: 396f0b721032fa017953d26779531c55e764f505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "vale";
  version = "2.17.0";
  subPackages = [ "cmd/vale" ];
  outputs = [ "out" "data" ];
  src = fetchFromGitHub {
    owner = "errata-ai";
    repo = "vale";
    rev = "v${version}";
    sha256 = "sha256-PUaIx6rEaLz0HUxkglsVHw0Kx/ovI2f4Yhknuysr5Gs=";
  };
  vendorSha256 = "sha256-zdgLWEArmtHTDM844LoSJwKp0UGoAR8bHnFOSlrrjdg=";
  postInstall = ''
  mkdir -p $data/share/vale
  cp -r styles $data/share/vale
  '';
  ldflags = [ "-s" "-w" "-X main.version=${version}" ];
}