mirror of
https://github.com/hercules-ci/arion.git
synced 2024-11-26 10:05:39 +03:00
Extract dockerComposeRef and link into new lib.nix
This commit is contained in:
parent
42146bb0b2
commit
c8944a2871
16
src/nix/lib.nix
Normal file
16
src/nix/lib.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ lib }:
|
||||
let
|
||||
|
||||
link = url: text:
|
||||
''link:${url}[${text}]'';
|
||||
|
||||
dockerComposeRef = fragment:
|
||||
''See ${link "https://docs.docker.com/compose/compose-file/#${fragment}" "Docker Compose#${fragment}"}'';
|
||||
|
||||
in
|
||||
{
|
||||
inherit
|
||||
dockerComposeRef
|
||||
link
|
||||
;
|
||||
}
|
@ -10,10 +10,11 @@ let
|
||||
inherit (lib) mkOption types;
|
||||
inherit (types) listOf nullOr attrsOf str either int bool submodule enum;
|
||||
|
||||
link = url: text:
|
||||
''link:${url}[${text}]'';
|
||||
dockerComposeRef = fragment:
|
||||
''See ${link "https://docs.docker.com/compose/compose-file/#${fragment}" "Docker Compose#${fragment}"}'';
|
||||
inherit (import ../../lib.nix { inherit lib; })
|
||||
link
|
||||
dockerComposeRef
|
||||
;
|
||||
|
||||
dockerComposeKitchenSink = ''
|
||||
Analogous to the `docker run` counterpart.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user