forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / gr / greenmask / package.nix
blobbec5628c9960081535a0ee1650bc3574091dc5fd
2   lib,
3   buildGoModule,
4   coreutils,
5   fetchFromGitHub,
6 }:
8 buildGoModule rec {
9   pname = "greenmask";
10   version = "0.2.0";
12   src = fetchFromGitHub {
13     owner = "GreenmaskIO";
14     repo = "greenmask";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-ouDYXXlmvLRuR6ATUAk2Gn9toTVxRwQY1CgMyQUN/B0=";
17   };
19   vendorHash = "sha256-M7HcTQp4pzfSLvyCiV/loqqprKM1B93LOr4wxOVoHjk=";
21   subPackages = [ "cmd/greenmask/" ];
23   ldflags = [
24     "-s"
25     "-w"
26     "-X=github.com/greenmaskio/greenmask/cmd/greenmask/cmd.Version=${version}"
27   ];
29   nativeCheckInputs = [ coreutils ];
31   preCheck = ''
32     substituteInPlace internal/db/postgres/transformers/custom/dynamic_definition_test.go \
33       --replace-fail "/bin/echo" "${coreutils}/bin/echo"
35     substituteInPlace tests/integration/greenmask/main_test.go \
36       --replace-fail "TestTocLibrary" "SkipTestTocLibrary" \
37       --replace-fail "TestGreenmaskBackwardCompatibility" "SkipTestGreenmaskBackwardCompatibility"
38     substituteInPlace tests/integration/storages/main_test.go \
39       --replace-fail "TestS3Storage" "SkipTestS3Storage"
40   '';
42   meta = with lib; {
43     description = "PostgreSQL database anonymization tool";
44     homepage = "https://github.com/GreenmaskIO/greenmask";
45     changelog = "https://github.com/GreenmaskIO/greenmask/releases/tag/v${version}";
46     license = licenses.asl20;
47     maintainers = with maintainers; [ fab ];
48     mainProgram = "greenmask";
49   };