2022-05-02 01:15:08 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, coreutils }:
|
2022-01-30 07:37:18 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "skeema";
|
2022-09-16 05:50:47 +02:00
|
|
|
version = "1.8.2";
|
2022-01-30 07:37:18 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skeema";
|
|
|
|
repo = "skeema";
|
|
|
|
rev = "v${version}";
|
2022-09-16 05:50:47 +02:00
|
|
|
sha256 = "sha256-PyQ5nLoJl3N/ewmHTZZHRLj9WV3EsUjL6fyESc8POss=";
|
2022-01-30 07:37:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2022-05-02 01:15:08 +02:00
|
|
|
preCheck = ''
|
|
|
|
# Disable tests requiring network access to gitlab.com
|
|
|
|
buildFlagsArray+=("-run" "[^(Test(ParseDir(Symlinks|))|DirRelPath)]")
|
|
|
|
|
|
|
|
# Fix tests expecting /usr/bin/printf and /bin/echo
|
|
|
|
substituteInPlace skeema_cmd_test.go \
|
|
|
|
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
|
|
|
|
|
|
|
substituteInPlace internal/fs/dir_test.go \
|
|
|
|
--replace /bin/echo "${coreutils}/bin/echo" \
|
|
|
|
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
|
|
|
|
|
|
|
substituteInPlace internal/applier/ddlstatement_test.go \
|
|
|
|
--replace /bin/echo "${coreutils}/bin/echo"
|
|
|
|
|
|
|
|
substituteInPlace internal/util/shellout_unix_test.go \
|
|
|
|
--replace /bin/echo "${coreutils}/bin/echo" \
|
|
|
|
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
|
|
|
|
|
|
|
substituteInPlace internal/util/shellout_unix_test.go \
|
|
|
|
--replace /bin/echo "${coreutils}/bin/echo"
|
|
|
|
'';
|
|
|
|
|
2022-01-30 07:37:18 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Declarative pure-SQL schema management for MySQL and MariaDB";
|
|
|
|
homepage = "https://skeema.io/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
|
|
};
|
|
|
|
}
|