This flake should enable you to inject podman as a development environment dependency.
For providing the podman-shell
in a Nix development shell, this flake needs to be added to the
inputs
and its overlay
registered in the pkgs
overlay. Afterwards it can just be added to the
buildInputs
- but don't forget to integrate its shellHook
as well.
Example
# flake.nix
{
description = "Podman shell flake demo";
inputs.podman-shell.url = "github:rake5k/podman-shell-flake";
outputs = { self, nixpkgs, podman-shell }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
podman-shell.overlay
];
};
in
{
devShell = pkgs.mkShell {
name = "my-dev-shell";
buildInputs = with pkgs; [
podman-shell
podman-shell.dockerCompat # optional - for use as a `docker` drop-in replacement
];
inherit (pkgs.podman-shell) shellHook;
};
};
}
Highly inspired by adisbladis' podman-shell.nix.