Skip to content

Commit 56c1f27

Browse files
committed
feat: include src and debug for pg14
1 parent 977b9f4 commit 56c1f27

File tree

1 file changed

+34
-65
lines changed

1 file changed

+34
-65
lines changed

flake.nix

Lines changed: 34 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,34 @@
420420
postgresql_15 = getPostgresqlPackage "15";
421421
postgresql_17 = getPostgresqlPackage "17";
422422
postgresql_orioledb-17 = getPostgresqlPackage "orioledb-17";
423+
424+
# Function to create PostgreSQL source packages
425+
mkPostgresSrc = name: pkg: pkgs.stdenv.mkDerivation {
426+
pname = "postgresql-${name}-src";
427+
version = pkg.version;
428+
src = pkg.src;
429+
nativeBuildInputs = [ pkgs.bzip2 ];
430+
431+
phases = [ "unpackPhase" "installPhase" ];
432+
433+
installPhase = ''
434+
mkdir -p $out
435+
cp -r . $out
436+
'';
437+
438+
meta = with pkgs.lib; {
439+
description = "PostgreSQL ${name} source files";
440+
homepage = "https://www.postgresql.org/";
441+
license = licenses.postgresql;
442+
platforms = platforms.all;
443+
};
444+
};
445+
446+
# Create source packages for each PostgreSQL version
447+
postgresql_14_src = mkPostgresSrc "14" postgresql_14;
448+
postgresql_15_src = mkPostgresSrc "15" postgresql_15;
449+
postgresql_17_src = mkPostgresSrc "17" postgresql_17;
450+
postgresql_orioledb-17_src = mkPostgresSrc "orioledb-17" postgresql_orioledb-17;
423451
in
424452
postgresVersions // {
425453
supabase-groonga = supabase-groonga;
@@ -435,74 +463,15 @@
435463
wal-g-3 = wal-g-3;
436464
sfcgal = sfcgal;
437465
pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;
438-
inherit postgresql_15 postgresql_17 postgresql_orioledb-17;
466+
inherit postgresql_14 postgresql_15 postgresql_17 postgresql_orioledb-17;
467+
postgresql_14_debug = if pkgs.stdenv.isLinux then postgresql_14.debug else null;
439468
postgresql_15_debug = if pkgs.stdenv.isLinux then postgresql_15.debug else null;
440469
postgresql_17_debug = if pkgs.stdenv.isLinux then postgresql_17.debug else null;
441470
postgresql_orioledb-17_debug = if pkgs.stdenv.isLinux then postgresql_orioledb-17.debug else null;
442-
postgresql_15_src = pkgs.stdenv.mkDerivation {
443-
pname = "postgresql-15-src";
444-
version = postgresql_15.version;
445-
446-
src = postgresql_15.src;
447-
448-
nativeBuildInputs = [ pkgs.bzip2 ];
449-
450-
phases = [ "unpackPhase" "installPhase" ];
451-
452-
installPhase = ''
453-
mkdir -p $out
454-
cp -r . $out
455-
'';
456-
457-
meta = with pkgs.lib; {
458-
description = "PostgreSQL 15 source files";
459-
homepage = "https://www.postgresql.org/";
460-
license = licenses.postgresql;
461-
platforms = platforms.all;
462-
};
463-
};
464-
postgresql_17_src = pkgs.stdenv.mkDerivation {
465-
pname = "postgresql-17-src";
466-
version = postgresql_17.version;
467-
src = postgresql_17.src;
468-
469-
nativeBuildInputs = [ pkgs.bzip2 ];
470-
471-
phases = [ "unpackPhase" "installPhase" ];
472-
473-
installPhase = ''
474-
mkdir -p $out
475-
cp -r . $out
476-
'';
477-
meta = with pkgs.lib; {
478-
description = "PostgreSQL 17 source files";
479-
homepage = "https://www.postgresql.org/";
480-
license = licenses.postgresql;
481-
platforms = platforms.all;
482-
};
483-
};
484-
postgresql_orioledb-17_src = pkgs.stdenv.mkDerivation {
485-
pname = "postgresql-17-src";
486-
version = postgresql_orioledb-17.version;
487-
488-
src = postgresql_orioledb-17.src;
489-
490-
nativeBuildInputs = [ pkgs.bzip2 ];
491-
492-
phases = [ "unpackPhase" "installPhase" ];
493-
494-
installPhase = ''
495-
mkdir -p $out
496-
cp -r . $out
497-
'';
498-
499-
meta = with pkgs.lib; {
500-
description = "PostgreSQL 15 source files";
501-
homepage = "https://www.postgresql.org/";
502-
license = licenses.postgresql;
503-
platforms = platforms.all;
504-
};
505-
};
471+
postgresql_14_src = postgresql_14_src;
472+
postgresql_15_src = postgresql_15_src;
473+
postgresql_17_src = postgresql_17_src;
474+
postgresql_orioledb-17_src = postgresql_orioledb-17_src;
506475
mecab_naist_jdic = mecab-naist-jdic;
507476
supabase_groonga = supabase-groonga;
508477
pg_regress = makePgRegress activeVersion;

0 commit comments

Comments
 (0)