WIP podman-compose

This commit is contained in:
Robert Hensing 2021-05-25 11:41:03 +02:00
parent 3dcadd5e40
commit 8d5371229d
8 changed files with 60 additions and 10 deletions

View file

@ -2,16 +2,18 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1601906239,
"narHash": "sha256-P1jBYbYeFswig/0FKbgh+BpVhh9iurD3m0T2ae4gdx8=",
"lastModified": 1621356929,
"narHash": "sha256-lD43MQ+bDFioz6eTxMmc5/tZ2nGUQ2e26CFRKp8JlF4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c2bb4af48d26ed091e5674394bacbf8d488c7939",
"rev": "6be706bbe5d892de78ce2c3b757508701ac592a6",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {

View file

@ -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");

View file

@ -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 {};
}

View file

@ -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 ]} \
;
'';
};

View file

@ -46,6 +46,7 @@
"-l"
]
}
}
},
"technology": "docker"
}
}

View file

@ -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;
};
}

View file

@ -0,0 +1,12 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {
deployment.technology = mkOption {
type = types.enum ["docker"];
default = "docker";
};
};
}

View file

@ -0,0 +1,11 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {
deployment.technology = mkOption {
type = types.enum ["podman"];
};
};
}