mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Merge staging-next into staging
This commit is contained in:
commit
47331eb8bb
11 changed files with 752 additions and 670 deletions
46
pkgs/by-name/or/orioledb/extension.nix
Normal file
46
pkgs/by-name/or/orioledb/extension.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
curl,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
postgresql,
|
||||
postgresqlBuildExtension,
|
||||
postgresqlTestExtension,
|
||||
python3,
|
||||
}:
|
||||
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "orioledb";
|
||||
# SQL extension version is 1.8, official version is beta16-pre-3
|
||||
version = "1.8-beta16-pre-3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "orioledb";
|
||||
repo = "orioledb";
|
||||
tag = "beta16-pre-3";
|
||||
hash = "sha256-nBLyc9VFETRo75HfBSLmQ13a6Vcc9rlSCp06y/SnDqQ=";
|
||||
};
|
||||
|
||||
buildInputs = postgresql.buildInputs ++ [
|
||||
curl
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3
|
||||
];
|
||||
|
||||
makeFlags = [ "USE_PGXS=1" ];
|
||||
|
||||
meta =
|
||||
# Inheriting maintainers from `postgresql` is only OK to do,
|
||||
# because it's the orioledb-specific fork of PostgreSQL.
|
||||
# Once these patches are upstreamed and the extension can
|
||||
# run on stock PG, this meta section needs to be adjusted.
|
||||
assert postgresql.pname == "orioledb-postgres";
|
||||
{
|
||||
inherit (postgresql.meta) description maintainers;
|
||||
license = lib.licenses.OR [
|
||||
lib.licenses.asl20
|
||||
lib.licenses.postgresql
|
||||
];
|
||||
};
|
||||
})
|
||||
50
pkgs/by-name/or/orioledb/package.nix
Normal file
50
pkgs/by-name/or/orioledb/package.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
postgresql_17,
|
||||
}:
|
||||
|
||||
let
|
||||
orioledb-postgres = postgresql_17.overrideAttrs (
|
||||
finalAttrs: oldAttrs: {
|
||||
pname = "orioledb-postgres";
|
||||
version = "17.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "orioledb";
|
||||
repo = "postgres";
|
||||
tag = "patches17_20";
|
||||
hash = "sha256-3dC00fFpD8fJDKed37oQvILMtA3GKBsWo1GEdUQzXzQ=";
|
||||
};
|
||||
|
||||
# Configure extracts the patch version from the git tag. This
|
||||
# is required by the extension build to verify it builds against
|
||||
# the correctly patched postgresql version.
|
||||
postPatch = oldAttrs.postPatch or "" + ''
|
||||
substituteInPlace configure \
|
||||
--replace-fail "git describe --tags --exact-match" "echo '${finalAttrs.src.tag}'"
|
||||
'';
|
||||
|
||||
# orioledb seems to have made pg_rewind extensible somehow. For that reason,
|
||||
# there is now a header file in the -dev output for it. Until reported otherwise
|
||||
# we'll just strip that reference to avoid a cycle between outputs.
|
||||
postInstall = oldAttrs.postInstall or "" + ''
|
||||
remove-references-to -t "$dev" -t "$doc" -t "$man" "$out/bin/pg_rewind"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (oldAttrs.meta)
|
||||
license
|
||||
pkgConfigModules
|
||||
platforms
|
||||
broken
|
||||
;
|
||||
description = "Cloud-native storage engine for PostgreSQL";
|
||||
maintainers = [
|
||||
lib.maintainers.wolfgangwalther
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
orioledb-postgres.withPackages (pkgs: [ (pkgs.callPackage ./extension.nix { }) ])
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "14.23";
|
||||
rev = "refs/tags/REL_14_23";
|
||||
hash = "sha256-fjoboaUhrHFDqusmIXzSS5ZnIpSRHO9+qcqvkchl2dM=";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "15.18";
|
||||
rev = "refs/tags/REL_15_18";
|
||||
hash = "sha256-tw1zzgLXx7Jr4bi8rMKRmTJzOSQFGvrP2nHr9FcVrjs=";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "16.14";
|
||||
rev = "refs/tags/REL_16_14";
|
||||
hash = "sha256-g2+OdB2dGIKBSFJ24Z3Yy7oRAFywNMSVDdWfnsaeJJQ=";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "17.10";
|
||||
rev = "refs/tags/REL_17_10";
|
||||
hash = "sha256-3ZAqlT3R8ywhNH13oqz2VUbSwpOJ2JaICbxZ29awaMw=";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "18.4";
|
||||
rev = "refs/tags/REL_18_4";
|
||||
hash = "sha256-Ac/Dqcj8vjcW3my5vsnKaMiQqTq/HPtUzckJ3SMyrfA=";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import ./generic.nix {
|
||||
{
|
||||
version = "19beta1";
|
||||
rev = "refs/tags/REL_19_BETA1";
|
||||
hash = "sha256-thvbttX8wwGLf5tMJRHl86Xv8OgINzahoqB/AzAdtMI=";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ let
|
|||
version: path:
|
||||
let
|
||||
attrName = if jitSupport then "${version}_jit" else version;
|
||||
postgresql = import path { inherit self; };
|
||||
postgresql = self.callPackage ./generic.nix (import path // { inherit self; });
|
||||
attrValue = if jitSupport then postgresql.withJIT else postgresql;
|
||||
in
|
||||
self.lib.nameValuePair attrName attrValue
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
71
pkgs/servers/sql/postgresql/wrapper.nix
Normal file
71
pkgs/servers/sql/postgresql/wrapper.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
buildEnv,
|
||||
callPackage,
|
||||
lib,
|
||||
makeBinaryWrapper,
|
||||
postgresql,
|
||||
}:
|
||||
f:
|
||||
let
|
||||
installedExtensions = f postgresql.pkgs;
|
||||
recurse = import ./wrapper.nix {
|
||||
# explicitly listed in case they were overridden
|
||||
inherit
|
||||
buildEnv
|
||||
callPackage
|
||||
lib
|
||||
makeBinaryWrapper
|
||||
postgresql
|
||||
;
|
||||
};
|
||||
in
|
||||
buildEnv (finalAttrs: {
|
||||
pname = "${postgresql.pname}-and-plugins";
|
||||
inherit (postgresql) version;
|
||||
paths = installedExtensions ++ [
|
||||
# consider keeping in-sync with `postBuild` below
|
||||
postgresql
|
||||
postgresql.man # in case user installs this into environment
|
||||
];
|
||||
|
||||
pathsToLink = [
|
||||
"/"
|
||||
"/bin"
|
||||
"/share/postgresql/extension"
|
||||
# Unbreaks Omnigres' build system
|
||||
"/share/postgresql/timezonesets"
|
||||
"/share/postgresql/tsearch_data"
|
||||
];
|
||||
|
||||
derivationArgs = {
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
postBuild =
|
||||
let
|
||||
args = lib.concatMap (ext: ext.wrapperArgs or [ ]) installedExtensions;
|
||||
in
|
||||
''
|
||||
wrapProgram "$out/bin/postgres" ${lib.concatStringsSep " " args}
|
||||
'';
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit installedExtensions;
|
||||
inherit (postgresql)
|
||||
pkgs
|
||||
psqlSchema
|
||||
;
|
||||
|
||||
pg_config = postgresql.pg_config.override {
|
||||
outputs = {
|
||||
out = finalAttrs.finalPackage;
|
||||
man = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
withJIT = recurse (_: installedExtensions ++ [ postgresql.jit ]);
|
||||
withoutJIT = recurse (_: lib.remove postgresql.jit installedExtensions);
|
||||
|
||||
withPackages = f': recurse (ps: installedExtensions ++ f' ps);
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue