pgroll: 0.7.0 -> 0.8.0 (#365668)

This commit is contained in:
Thiago Kenji Okada
2024-12-18 17:45:43 +00:00
committed by GitHub
3 changed files with 61 additions and 29 deletions
+33 -12
View File
@@ -1,39 +1,60 @@
{ lib, stdenv, fetchFromGitHub, which, squawk }:
{
lib,
stdenv,
fetchFromGitHub,
which,
squawk,
protobufc,
xxHash,
}:
stdenv.mkDerivation rec {
pname = "libpg_query";
version = "16-5.1.0";
version = "17-6.0.0";
src = fetchFromGitHub {
owner = "pganalyze";
repo = "libpg_query";
rev = version;
hash = "sha256-X48wjKdgkAc4wUubQ5ip1zZYiCKzQJyQTgGvO/pOY3I=";
tag = version;
hash = "sha256-hwF3kowuMmc1eXMdvhoCpBxT6++wp29MRYhy4S5Jhfg=";
};
nativeBuildInputs = [ which ];
makeFlags = [ "build" "build_shared" ];
makeFlags = [
"build"
"build_shared"
];
installPhase = ''
install -Dm644 -t $out/lib libpg_query.a
install -Dm644 -t $out/include pg_query.h
install -Dm644 -t $out/lib libpg_query${stdenv.hostPlatform.extensions.sharedLibrary}
runHook preInstall
install -Dm644 libpg_query.a -t $out/lib
install -Dm644 libpg_query${stdenv.hostPlatform.extensions.sharedLibrary} -t $out/lib
cp -r src/include $out/include
cp -r src/postgres/include/* $out/include
cp -r protobuf $out/include/protobuf
ln -s ${protobufc.dev}/include/protobuf-c $out/include/protobuf-c
cp -r ${protobufc.dev}/include/protobuf-c/* $out/include
ln -s ${xxHash}/include $out/include/xxhash
install -Dm644 pg_query.h -t $out/include
runHook postInstall
'';
doCheck = true;
checkTarget = "test";
passthru.tests = {
inherit squawk;
};
meta = with lib; {
meta = {
homepage = "https://github.com/pganalyze/libpg_query";
description = "C library for accessing the PostgreSQL parser outside of the server environment";
changelog = "https://github.com/pganalyze/libpg_query/blob/${version}/CHANGELOG.md";
license = licenses.bsd3;
platforms = platforms.unix;
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
+18 -8
View File
@@ -2,28 +2,38 @@
buildGoModule,
fetchFromGitHub,
lib,
libpg_query,
xxHash,
}:
buildGoModule rec {
pname = "pgroll";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
owner = "xataio";
repo = "pgroll";
rev = "v${version}";
hash = "sha256-7hIdm/qdcwlXC+vrEbjmBunORfEyItsr+Hia5u4ZBZk=";
tag = "v${version}";
hash = "sha256-iRa1dCUKmGUBpWjQXgKGrVu69WaTGQD8XhKmNxkF0JI=";
};
vendorHash = "sha256-jP4tTV/4kgT86d46L47Jcr/7ZtP2rL8boZiwqLvYo40=";
vendorHash = "sha256-XTypaCEB0+cfAmN4UyDRQgiF7spQhkiH2jCwjhd3I8Y=";
excludedPackages = [
"dev"
];
buildInputs = [
libpg_query
xxHash
];
# Tests require a running docker daemon
doCheck = false;
meta = with lib; {
meta = {
description = "PostgreSQL zero-downtime migrations made easy";
license = licenses.asl20;
license = lib.licenses.asl20;
homepage = "https://github.com/xataio/pgroll";
maintainers = with maintainers; [ ilyakooo0 ];
maintainers = with lib.maintainers; [ ilyakooo0 ];
};
}
+10 -9
View File
@@ -9,19 +9,20 @@
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "squawk";
version = "1.0.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "sbdchd";
repo = pname;
rev = "v${version}";
hash = "sha256-Uc357UspC2O/IxRRTy04jubzhKDRnIAN2CoHvbrGbHg=";
repo = "squawk";
tag = "v${version}";
hash = "sha256-uvgzfMMW/7oiy/SON+Hp4NItiGeKAAM+bMpQ7FPtfqY=";
};
cargoHash = "sha256-G0t3wvcp1Dm0ZCDnzTVf1XJ2Dtr0LyrKM1Vvso0IoaA=";
useFetchCargoVendor = true;
cargoHash = "sha256-oIVtlVkW46UeNw2MCwECQON09fRzTKot3pDgWoC35D0=";
nativeBuildInputs = [
pkg-config
@@ -50,11 +51,11 @@ rustPlatform.buildRustPackage rec {
"--skip=parse::tests::test_parse_sql_query_json"
];
meta = with lib; {
meta = {
description = "Linter for PostgreSQL, focused on migrations";
homepage = "https://squawkhq.com/";
homepage = "https://squawkhq.com";
changelog = "https://github.com/sbdchd/squawk/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Only;
license = with lib.licenses; [ gpl3Only ];
maintainers = with lib.maintainers; [ andrewsmith ];
};
}