Merge pull request #148 from hercules-ci/hs-update
arion-compose.cabal: Loosen base constraint + update
This commit is contained in:
commit
cd962c840e
14 changed files with 36 additions and 19 deletions
|
@ -29,7 +29,7 @@ source-repository head
|
|||
location: https://github.com/hercules-ci/arion
|
||||
|
||||
common common
|
||||
build-depends: base >=4.12.0.0 && <4.15
|
||||
build-depends: base >=4.12.0.0 && <4.17
|
||||
, aeson
|
||||
, aeson-pretty
|
||||
, async
|
||||
|
|
|
@ -233,7 +233,7 @@ Type:: string
|
|||
Default::
|
||||
+
|
||||
----
|
||||
{"_type":"literalExpression","text":"config.service.name"}
|
||||
{"_type":"literalExpression","text":"\"localhost/\" + config.service.name"}
|
||||
----
|
||||
|
||||
|
||||
|
|
|
@ -8,10 +8,12 @@ let
|
|||
options = eval.options;
|
||||
};
|
||||
|
||||
in (pkgs.writeText "agent-options" ''
|
||||
in (pkgs.runCommand "agent-options.adoc" { } ''
|
||||
cat >$out <<EOF
|
||||
= Arion options
|
||||
|
||||
${options.optionsAsciiDoc}
|
||||
EOF
|
||||
cat ${options.optionsAsciiDoc} >>$out
|
||||
'').overrideAttrs (o: {
|
||||
# Work around https://github.com/hercules-ci/hercules-ci-agent/issues/168
|
||||
allowSubstitutes = true;
|
||||
|
|
|
@ -41,7 +41,10 @@ dimension "Nixpkgs version" {
|
|||
} // lib.optionalAttrs enableNixOSTests {
|
||||
inherit (pkgs) tests;
|
||||
} // lib.optionalAttrs enableDoc {
|
||||
inherit (pkgs) doc doc-options doc-options-check;
|
||||
inherit (pkgs)
|
||||
# FIXME: nixpkgs antora packaging is broken
|
||||
# doc
|
||||
doc-options doc-options-check;
|
||||
} // lib.optionalAttrs isReferenceTarget {
|
||||
inherit (pkgs.arion-project.haskellPkgs) arion-compose-checked;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,12 @@ let
|
|||
inherit (pkgs.haskell.lib) overrideCabal addBuildTools;
|
||||
in
|
||||
overrideCabal (addBuildTools (haskellPackages.callCabal2nix "arion-compose" ./.. {}) [pkgs.nix]) (o: o // {
|
||||
src = pkgs.lib.sourceByRegex ../. [
|
||||
".*[.]cabal"
|
||||
"LICENSE"
|
||||
"src/?.*"
|
||||
"README.asciidoc"
|
||||
];
|
||||
preCheck = ''
|
||||
export NIX_LOG_DIR=$TMPDIR
|
||||
export NIX_STATE_DIR=$TMPDIR
|
||||
|
|
|
@ -36,15 +36,15 @@
|
|||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"branch": "master",
|
||||
"branch": "lib-modules-allow-disable-_modules.args-docs-internal",
|
||||
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
|
||||
"homepage": "https://github.com/NixOS/nixpkgs",
|
||||
"owner": "NixOS",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f8232491252438cd70b93554e31fe8238a573636",
|
||||
"sha256": "019bz8dxp9d30ghmi9v0inn0p7mj3mia69lkh5cyivhhp1i0cs5i",
|
||||
"rev": "35f40b20607428901e8edace7d4643d4ac11e876",
|
||||
"sha256": "0w1ivhzszggq2j4fxbhdppvzj07zkginfnqdpkl6mdzvpwhy8f0d",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/f8232491252438cd70b93554e31fe8238a573636.tar.gz",
|
||||
"url": "https://github.com/hercules-ci/nixpkgs/archive/35f40b20607428901e8edace7d4643d4ac11e876.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
|
||||
"version": ""
|
||||
},
|
||||
|
|
|
@ -25,7 +25,8 @@ loadImages requestedImages = do
|
|||
isNew i =
|
||||
-- On docker, the image name is unmodified
|
||||
(imageName i <> ":" <> imageTag i) `notElem` loaded
|
||||
-- -- On podman, you automatically get a localhost prefix
|
||||
-- On podman, you used to automatically get a localhost prefix
|
||||
-- however, since NixOS 22.05, this expected to be part of the name instead
|
||||
&& ("localhost/" <> imageName i <> ":" <> imageTag i) `notElem` loaded
|
||||
|
||||
traverse_ loadImage . filter isNew $ requestedImages
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"PATH": "/usr/bin:/run/current-system/sw/bin/",
|
||||
"container": "docker"
|
||||
},
|
||||
"image": "webserver:<HASH>",
|
||||
"image": "localhost/webserver:<HASH>",
|
||||
"ports": [
|
||||
"8000:80"
|
||||
],
|
||||
|
@ -32,7 +32,7 @@
|
|||
"images": [
|
||||
{
|
||||
"imageExe": "<STOREPATH>",
|
||||
"imageName": "webserver",
|
||||
"imageName": "localhost/webserver",
|
||||
"imageTag": "<HASH>"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -12,7 +12,6 @@ let
|
|||
inherit (pkgs) lib;
|
||||
|
||||
composition = lib.evalModules {
|
||||
check = true;
|
||||
modules = builtinModules ++ modules;
|
||||
};
|
||||
|
||||
|
@ -24,6 +23,7 @@ let
|
|||
_file = ./eval-composition.nix;
|
||||
key = ./eval-composition.nix;
|
||||
config._module.args.pkgs = lib.mkIf (pkgs != null) (lib.mkForce pkgs);
|
||||
config._module.args.check = true;
|
||||
config.host.nixStorePrefix = hostNixStorePrefix;
|
||||
config.host.uid = lib.toInt uid;
|
||||
};
|
||||
|
|
|
@ -8,6 +8,9 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
_module.args = mkOption {
|
||||
internal = true;
|
||||
};
|
||||
project.name = mkOption {
|
||||
description = ''
|
||||
Name of the project.
|
||||
|
|
|
@ -104,8 +104,8 @@ in
|
|||
};
|
||||
image.name = mkOption {
|
||||
type = str;
|
||||
default = config.service.name;
|
||||
defaultText = lib.literalExpression or lib.literalExample "config.service.name";
|
||||
default = "localhost/" + config.service.name;
|
||||
defaultText = lib.literalExpression or lib.literalExample ''"localhost/" + config.service.name'';
|
||||
description = ''
|
||||
A human readable name for the docker image.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ let
|
|||
in
|
||||
{
|
||||
name = "arion-test";
|
||||
machine = { pkgs, lib, ... }: {
|
||||
nodes.machine = { pkgs, lib, ... }: {
|
||||
environment.systemPackages = [
|
||||
pkgs.arion
|
||||
] ++ lib.optional usePodman pkgs.docker;
|
||||
|
|
|
@ -30,7 +30,7 @@ recurseIntoAttrs {
|
|||
|
||||
testWithPodman =
|
||||
if arionTestingFlags.nixosHasPodmanDockerSocket
|
||||
then nixosTest (pkgs.callPackage ./arion-test { usePodman = true; })
|
||||
then nixosTest (import ./arion-test { usePodman = true; inherit pkgs lib; })
|
||||
else {};
|
||||
|
||||
testBuild = arion.build {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# ];
|
||||
service.ports = [ "9092:9092" ];
|
||||
service.depends_on = [ "zookeeper" ];
|
||||
image.name = "localhost/kafka";
|
||||
image.contents = [
|
||||
(pkgs.runCommand "root" { } ''
|
||||
mkdir -p $out/bin
|
||||
|
@ -41,6 +42,7 @@
|
|||
# # volume.nocopy = true;
|
||||
# }
|
||||
# ];
|
||||
image.name = "localhost/zookeeper";
|
||||
image.contents = [
|
||||
(pkgs.buildEnv {
|
||||
name = "root";
|
||||
|
@ -51,7 +53,7 @@
|
|||
})
|
||||
];
|
||||
image.command = [
|
||||
"${pkgs.zookeeper.override { jre = pkgs.jdk8_headless; }}/bin/zkServer.sh"
|
||||
"${pkgs.zookeeper}/bin/zkServer.sh"
|
||||
"--config"
|
||||
"${./zookeeper}"
|
||||
"start-foreground"
|
||||
|
|
Loading…
Reference in a new issue