nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5}:
6
7buildGoModule rec {
8 pname = "yor";
9 version = "0.1.200";
10
11 src = fetchFromGitHub {
12 owner = "bridgecrewio";
13 repo = "yor";
14 rev = version;
15 hash = "sha256-IoQe1/D3Sl1y76dXH0CuwU6/LBC6n6or9vsysHhDeeg=";
16 };
17
18 vendorHash = "sha256-uT/jGD4hDVes4h+mlSIT2p+C9TjxnUWsmKv9haPjjLc=";
19
20 doCheck = false;
21
22 # https://github.com/bridgecrewio/yor/blob/main/set-version.sh
23 preBuild = ''
24 cat << EOF > src/common/version.go
25 package common
26
27 const Version = "${version}"
28 EOF
29 '';
30
31 ldflags = [
32 "-s"
33 "-w"
34 ];
35
36 meta = {
37 description = "Extensible auto-tagger for your IaC files. The ultimate way to link entities in the cloud back to the codified resource which created it";
38 homepage = "https://github.com/bridgecrewio/yor";
39 changelog = "https://github.com/bridgecrewio/yor/releases/tag/${version}";
40 license = lib.licenses.asl20;
41 maintainers = [ lib.maintainers.ivankovnatsky ];
42 };
43}