Skip to content

Commit

Permalink
WIP podman-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed May 25, 2021
1 parent 7996505 commit ee39d57
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 12 deletions.
12 changes: 7 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
description = "Arion - use Docker Compose via Nix";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";

outputs = { self, nixpkgs }:
let
lib = import (nixpkgs + "/lib");
Expand Down
13 changes: 10 additions & 3 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,22 @@ in
haskellPkgs.cabal-install
haskellPkgs.ghcid
haskellPkgs.haskell-language-server
super.docker-compose
super.podman
super.podman-compose
self.docker-compose
self.podman
self.podman-compose
self.niv
self.releaser
];
};
};

podman-compose = super.podman-compose.overrideAttrs(o: {
src = ~/h/podman-compose;
# patches = (o.patches or []) ++ [
# ./podman-compose-stop_signal.patch
# ];
});

inherit (import (sources.niv) {}) niv;
releaser = self.haskellPackages.callCabal2nix "releaser" sources.releaser {};
}
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "296793637b22bdb4d23b479879eba0a71c132a66",
"sha256": "0j09yih9693w5vjx64ikfxyja1ha7pisygrwrpg3wfz3sssglg69",
"rev": "83d907fd760d9ee4f49b4b7e4b1c6682f137b573",
"sha256": "0qc8gfkbga7v5p8r6h2hbdi8bjl3piikdwcbb9fff5cjnxi7v7qa",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/296793637b22bdb4d23b479879eba0a71c132a66.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/83d907fd760d9ee4f49b4b7e4b1c6682f137b573.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": ""
},
Expand Down
2 changes: 1 addition & 1 deletion nix/upstreamable/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let
mv $out/bin/arion $out/libexec
makeWrapper $out/libexec/arion $out/bin/arion \
--unset PYTHONPATH \
--prefix PATH : ${lib.makeBinPath [ pkgs.docker-compose ]} \
--prefix PATH : ${lib.makeBinPath [ pkgs.docker-compose pkgs.podman pkgs.podman-compose ]} \
;
'';
};
Expand Down
15 changes: 15 additions & 0 deletions src/nix/modules/composition/deployment.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ config, lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {
deployment.technology = mkOption {
description = "Which container technology to use.";
type = types.enum [];
};
};
config = {
docker-compose.raw.x-arion.technology = config.deployment.technology;
};
}
12 changes: 12 additions & 0 deletions src/nix/modules/composition/deployment/docker.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {
deployment.technology = mkOption {
type = types.enum ["docker"];
default = "docker";
};
};
}
11 changes: 11 additions & 0 deletions src/nix/modules/composition/deployment/podman.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {
deployment.technology = mkOption {
type = types.enum ["podman"];
};
};
}

0 comments on commit ee39d57

Please sign in to comment.