Skip to content

Commit ea70282

Browse files
committed
Inject the embedded image tag late
This allows us to make an image tarball that can be loaded with `podman load` and end up with the expected tag.
1 parent 7b588b6 commit ea70282

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

flake.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@
2323
{
2424
overlays = final: prev: {
2525
datomic-pro = pkgs.callPackage ./pkgs/datomic-pro.nix { };
26-
datomic-pro-container = pkgs.callPackage ./pkgs/datomic-pro-container-image.nix { };
26+
datomic-pro-container = pkgs.callPackage ./pkgs/datomic-pro-container-image.nix {
27+
imageTag = final.datomic-pro.version;
28+
};
29+
datomic-pro-container-unstable = pkgs.callPackage ./pkgs/datomic-pro-container-image.nix {
30+
imageTag = "unstable";
31+
};
2732
datomic-generate-properties = pkgs.callPackage ./pkgs/datomic-generate-properties.nix { };
2833
};
2934
packages = {
3035
default = self.packages.${system}.datomic-pro;
3136
datomic-pro = pkgs.datomic-pro;
3237
datomic-pro-container = pkgs.datomic-pro-container;
38+
datomic-pro-container-unstable = pkgs.datomic-pro-container-unstable;
3339
datomic-generate-properties = pkgs.datomic-generate-properties;
3440
};
3541
nixosModules = {

pkgs/datomic-pro-container-image.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
imageTag,
23
lib,
34
stdenv,
45
fetchzip,
@@ -45,7 +46,7 @@ let
4546
in
4647
dockerTools.buildLayeredImage {
4748
name = "ghcr.io/ramblurr/datomic-pro";
48-
tag = datomic-pro.version;
49+
tag = imageTag;
4950
fromImage = null;
5051
contents = [
5152
datomic-pro

0 commit comments

Comments
 (0)