File tree Expand file tree Collapse file tree 5 files changed +55
-11
lines changed
Expand file tree Collapse file tree 5 files changed +55
-11
lines changed Original file line number Diff line number Diff line change @@ -87,18 +87,18 @@ jobs:
8787 POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
8888 run : |
8989 GIT_SHA=${{github.sha}}
90- nix run nixpkgs #packer -- init amazon-arm64-nix.pkr.hcl
90+ nix run github:supabase/postgres/${GIT_SHA} #packer -- init amazon-arm64-nix.pkr.hcl
9191 # why is postgresql_major defined here instead of where the _three_ other postgresql_* variables are defined?
92- nix run nixpkgs #packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
92+ nix run github:supabase/postgres/${GIT_SHA} #packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
9393
9494 - name : Build AMI stage 2
9595 env :
9696 POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
9797 run : |
9898 GIT_SHA=${{github.sha}}
99- nix run nixpkgs #packer -- init stage2-nix-psql.pkr.hcl
99+ nix run github:supabase/postgres/${GIT_SHA} #packer -- init stage2-nix-psql.pkr.hcl
100100 POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
101- nix run nixpkgs #packer -- build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
101+ nix run github:supabase/postgres/${GIT_SHA} #packer -- build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
102102
103103 - name : Grab release version
104104 id : process_release_version
Original file line number Diff line number Diff line change 5353 AWS_RETRY_MODE : adaptive
5454 run : |
5555 GIT_SHA=${{ github.sha }}
56- nix run nixpkgs #packer -- init amazon-arm64-nix.pkr.hcl
57- nix run nixpkgs #packer -- build \
56+ nix run github:supabase/postgres/${GIT_SHA} #packer -- init amazon-arm64-nix.pkr.hcl
57+ nix run github:supabase/postgres/${GIT_SHA} #packer -- build \
5858 -var "git-head-version=${GIT_SHA}" \
5959 -var "packer-execution-id=${EXECUTION_ID}" \
6060 -var-file="development-arm.vars.pkr.hcl" \
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ postgres_major:
1010
1111# Full version strings for each major version
1212postgres_release :
13- postgresorioledb-17 : " 17.6.0.034 -orioledb"
14- postgres17 : " 17.6.1.077 "
15- postgres15 : " 15.14.1.077 "
13+ postgresorioledb-17 : " 17.6.0.035 -orioledb"
14+ postgres17 : " 17.6.1.078 "
15+ postgres15 : " 15.14.1.078 "
1616
1717# Non Postgres Extensions
1818pgbouncer_release : 1.25.1
Original file line number Diff line number Diff line change 3333 {
3434 packages = (
3535 {
36- build-ami = pkgs . callPackage ./build-ami.nix { } ;
37- build-test-ami = pkgs . callPackage ./build-test-ami.nix { } ;
36+ build-ami = pkgs . callPackage ./build-ami.nix { packer = self' . packages . packer ; } ;
37+ build-test-ami = pkgs . callPackage ./build-test-ami.nix { packer = self' . packages . packer ; } ;
3838 cleanup-ami = pkgs . callPackage ./cleanup-ami.nix { } ;
3939 dbmate-tool = pkgs . callPackage ./dbmate-tool.nix { inherit ( self . supabase ) defaults ; } ;
4040 docs = pkgs . callPackage ./docs.nix { } ;
4949 mecab-naist-jdic = pkgs . callPackage ./mecab-naist-jdic.nix { } ;
5050 migrate-tool = pkgs . callPackage ./migrate-tool.nix { psql_15 = self' . packages . "psql_15/bin" ; } ;
5151 overlayfs-on-package = pkgs . callPackage ./overlayfs-on-package.nix { } ;
52+ packer = pkgs . callPackage ./packer.nix { inherit inputs ; } ;
5253 pg-backrest = inputs . nixpkgs . legacyPackages . ${ pkgs . stdenv . hostPlatform . system } . pgbackrest ;
5354 pg-restore = pkgs . callPackage ./pg-restore.nix { psql_15 = self' . packages . "psql_15/bin" ; } ;
5455 pg_prove = pkgs . perlPackages . TAPParserSourceHandlerpgTAP ;
Original file line number Diff line number Diff line change 1+ {
2+ pkgs ,
3+ lib ,
4+ fetchFromGitHub ,
5+ installShellFiles ,
6+ ...
7+ } :
8+ let
9+ buildGoModule = pkgs . buildGoModule ;
10+ in
11+ buildGoModule rec {
12+ pname = "packer" ;
13+ version = "1.14.1" ;
14+
15+ src = fetchFromGitHub {
16+ owner = "hashicorp" ;
17+ repo = "packer" ;
18+ rev = "v${ version } " ;
19+ hash = "sha256-3g9hsmrfLzGhjcGvUza/L9PMGUFw+KLbg2pIK0CxlQI=" ;
20+ } ;
21+
22+ vendorHash = "sha256-F6hn+pXPyPe70UTK8EF24lk7ArYz7ygUyVVsatW6+hI=" ;
23+
24+ subPackages = [ "." ] ;
25+
26+ ldflags = [
27+ "-s"
28+ "-w"
29+ ] ;
30+
31+ nativeBuildInputs = [ installShellFiles ] ;
32+
33+ postInstall = ''
34+ installShellCompletion --zsh contrib/zsh-completion/_packer
35+ '' ;
36+
37+ meta = {
38+ description = "Tool for creating identical machine images for multiple platforms from a single source configuration" ;
39+ homepage = "https://www.packer.io" ;
40+ license = lib . licenses . bsl11 ;
41+ changelog = "https://github.com/hashicorp/packer/blob/v${ version } /CHANGELOG.md" ;
42+ } ;
43+ }
You can’t perform that action at this time.
0 commit comments