diff --git a/flake.lock b/flake.lock index 4e92b89..f534b01 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index d711a13..7a55dac 100644 --- a/flake.nix +++ b/flake.nix @@ -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"); diff --git a/nix/overlay.nix b/nix/overlay.nix index 8067c56..27f4bff 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -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 {}; } diff --git a/nix/sources.json b/nix/sources.json index 47e0e6c..63cd1d8 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -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///archive/.tar.gz", "version": "" }, diff --git a/nix/upstreamable/default.nix b/nix/upstreamable/default.nix index a06b42d..2a40905 100644 --- a/nix/upstreamable/default.nix +++ b/nix/upstreamable/default.nix @@ -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 ]} \ ; ''; }; diff --git a/src/nix/modules/composition/deployment.nix b/src/nix/modules/composition/deployment.nix new file mode 100644 index 0000000..2e484e1 --- /dev/null +++ b/src/nix/modules/composition/deployment.nix @@ -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; + }; +} diff --git a/src/nix/modules/composition/deployment/docker.nix b/src/nix/modules/composition/deployment/docker.nix new file mode 100644 index 0000000..78e1ff5 --- /dev/null +++ b/src/nix/modules/composition/deployment/docker.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +let + inherit (lib) mkOption types; +in +{ + options = { + deployment.technology = mkOption { + type = types.enum ["docker"]; + default = "docker"; + }; + }; +} diff --git a/src/nix/modules/composition/deployment/podman.nix b/src/nix/modules/composition/deployment/podman.nix new file mode 100644 index 0000000..4fb77f7 --- /dev/null +++ b/src/nix/modules/composition/deployment/podman.nix @@ -0,0 +1,11 @@ +{ lib, ... }: +let + inherit (lib) mkOption types; +in +{ + options = { + deployment.technology = mkOption { + type = types.enum ["podman"]; + }; + }; +}