depot/third_party/nixpkgs/pkgs/by-name/gr/greenmask/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

50 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
coreutils,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "greenmask";
version = "0.2.8";
src = fetchFromGitHub {
owner = "GreenmaskIO";
repo = "greenmask";
tag = "v${version}";
hash = "sha256-Upgf/VmWHtvldIx3n6e3NTHDzs7XoZUBVcEVC+ix9cQ=";
};
vendorHash = "sha256-UY79Fex8hwaXtFLefBUeyO7PxJevWWaQU5MEOAMLPkA=";
subPackages = [ "cmd/greenmask/" ];
ldflags = [
"-s"
"-w"
"-X=github.com/greenmaskio/greenmask/cmd/greenmask/cmd.Version=${version}"
];
nativeCheckInputs = [ coreutils ];
preCheck = ''
substituteInPlace internal/db/postgres/transformers/custom/dynamic_definition_test.go \
--replace-fail "/bin/echo" "${coreutils}/bin/echo"
substituteInPlace tests/integration/greenmask/main_test.go \
--replace-fail "TestTocLibrary" "SkipTestTocLibrary" \
--replace-fail "TestGreenmaskBackwardCompatibility" "SkipTestGreenmaskBackwardCompatibility"
substituteInPlace tests/integration/storages/main_test.go \
--replace-fail "TestS3Storage" "SkipTestS3Storage"
'';
meta = with lib; {
description = "PostgreSQL database anonymization tool";
homepage = "https://github.com/GreenmaskIO/greenmask";
changelog = "https://github.com/GreenmaskIO/greenmask/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
mainProgram = "greenmask";
};
}