Skip to content

Commit edd5431

Browse files
committed
Revert "feat: packaging and devshell with various cargo-pgrx versions! (#1277)"
This reverts commit 743c6f7.
1 parent 3fba826 commit edd5431

File tree

7 files changed

+16
-345
lines changed

7 files changed

+16
-345
lines changed

flake.lock

Lines changed: 1 addition & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 10 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
flake-utils.url = "github:numtide/flake-utils";
77
nix2container.url = "github:nlewo/nix2container";
88
nix-editor.url = "github:snowfallorg/nix-editor";
9-
rust-overlay.url = "github:oxalica/rust-overlay";
109
};
1110

12-
outputs = { self, nixpkgs, flake-utils, nix2container, nix-editor, rust-overlay, ...}:
11+
outputs = { self, nixpkgs, flake-utils, nix2container, nix-editor, ...}:
1312
let
1413
gitRev = "vcs=${self.shortRev or "dirty"}+${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}";
1514

@@ -54,41 +53,10 @@
5453
};
5554
inherit system;
5655
overlays = [
57-
# NOTE add any needed overlays here. in theory we could
56+
# NOTE (aseipp): add any needed overlays here. in theory we could
5857
# pull them from the overlays/ directory automatically, but we don't
5958
# want to have an arbitrary order, since it might matter. being
6059
# explicit is better.
61-
(import rust-overlay)
62-
(final: prev: {
63-
cargo-pgrx = final.callPackage ./nix/cargo-pgrx/default.nix {
64-
inherit (final) lib;
65-
inherit (final) darwin;
66-
inherit (final) fetchCrate;
67-
inherit (final) openssl;
68-
inherit (final) pkg-config;
69-
inherit (final) makeRustPlatform;
70-
inherit (final) stdenv;
71-
inherit (final) rust-bin;
72-
};
73-
74-
buildPgrxExtension = final.callPackage ./nix/cargo-pgrx/buildPgrxExtension.nix {
75-
inherit (final) cargo-pgrx;
76-
inherit (final) lib;
77-
inherit (final) Security;
78-
inherit (final) pkg-config;
79-
inherit (final) makeRustPlatform;
80-
inherit (final) stdenv;
81-
inherit (final) writeShellScriptBin;
82-
};
83-
84-
buildPgrxExtension_0_11_3 = prev.buildPgrxExtension.override {
85-
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_11_3;
86-
};
87-
88-
buildPgrxExtension_0_12_6 = prev.buildPgrxExtension.override {
89-
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_12_6;
90-
};
91-
})
9260
(final: prev: {
9361
postgresql = final.callPackage ./nix/postgresql/default.nix {
9462
inherit (final) lib;
@@ -98,6 +66,7 @@
9866
inherit (final) callPackage;
9967
};
10068
})
69+
(import ./nix/overlays/cargo-pgrx-0-11-3.nix)
10170
];
10271
};
10372
sfcgal = pkgs.callPackage ./nix/ext/sfcgal/sfcgal.nix { };
@@ -339,8 +308,6 @@
339308
in
340309
postgresVersions //{
341310
supabase-groonga = supabase-groonga;
342-
cargo-pgrx_0_11_3 = pkgs.cargo-pgrx.cargo-pgrx_0_11_3;
343-
cargo-pgrx_0_12_6 = pkgs.cargo-pgrx.cargo-pgrx_0_12_6;
344311
# PostgreSQL versions.
345312
psql_15 = postgresVersions.psql_15;
346313
psql_16 = postgresVersions.psql_16;
@@ -623,7 +590,10 @@
623590
packages = flake-utils.lib.flattenTree basePackages // {
624591
# Any extra packages we might want to include in our package
625592
# set can go here.
626-
inherit (pkgs);
593+
inherit (pkgs)
594+
# NOTE: comes from our cargo-pgrx-0-11-3.nix overlay
595+
cargo-pgrx_0_11_3;
596+
627597
};
628598

629599
# The list of exported 'checks' that are run with every run of 'nix
@@ -657,21 +627,7 @@
657627
# ambient $PATH environment when you run 'nix develop'. This is useful
658628
# for development and puts many convenient devtools instantly within
659629
# reach.
660-
661-
devShells = let
662-
mkCargoPgrxDevShell = { pgrxVersion, rustVersion }: pkgs.mkShell {
663-
packages = with pkgs; [
664-
basePackages."cargo-pgrx_${pgrxVersion}"
665-
(rust-bin.stable.${rustVersion}.default.override {
666-
extensions = [ "rust-src" ];
667-
})
668-
];
669-
shellHook = ''
670-
export HISTFILE=.history
671-
'';
672-
};
673-
in {
674-
default = pkgs.mkShell {
630+
devShells.default = pkgs.mkShell {
675631
packages = with pkgs; [
676632
coreutils
677633
just
@@ -694,15 +650,6 @@
694650
export HISTFILE=.history
695651
'';
696652
};
697-
cargo-pgrx_0_11_3 = mkCargoPgrxDevShell {
698-
pgrxVersion = "0_11_3";
699-
rustVersion = "1.80.0";
700-
};
701-
cargo-pgrx_0_12_6 = mkCargoPgrxDevShell {
702-
pgrxVersion = "0_12_6";
703-
rustVersion = "1.80.0";
704-
};
705-
};
706-
}
707-
);
653+
}
654+
);
708655
}

nix/cargo-pgrx/buildPgrxExtension.nix

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)