Skip to content

Commit 951b86f

Browse files
committed
feat: add an optional package for local dev that can be built
to give access to the source of the postgresql_15 package we use
1 parent c213b04 commit 951b86f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

flake.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,29 @@
274274
pg_regress = pg_regress;
275275
pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;
276276
postgresql_15 = pkgs.postgresql_15;
277+
278+
postgresql_15_src = pkgs.stdenv.mkDerivation {
279+
pname = "postgresql-15-src";
280+
version = pkgs.postgresql_15.version;
281+
282+
src = pkgs.postgresql_15.src;
283+
284+
nativeBuildInputs = [ pkgs.bzip2 ];
285+
286+
phases = [ "unpackPhase" "installPhase" ];
287+
288+
installPhase = ''
289+
mkdir -p $out
290+
cp -r . $out
291+
'';
292+
293+
meta = with pkgs.lib; {
294+
description = "PostgreSQL 15 source files";
295+
homepage = "https://www.postgresql.org/";
296+
license = licenses.postgresql;
297+
platforms = platforms.all;
298+
};
299+
};
277300
# Start a version of the server.
278301
start-server =
279302
let

0 commit comments

Comments
 (0)