apps/run-workflow-with-vm: update to 2024-05-10

This commit is contained in:
Gabriel Arazas 2024-05-10 16:46:01 +08:00
parent 177364306a
commit 08b1cf8df3
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
4 changed files with 19 additions and 6 deletions

View File

@ -16,7 +16,7 @@ When run, it should build a VM with its script to easily initialize it.
== Extra niceties
There's some niceties left with this script including the ability to include your own config by overriding `extra-config` as part of the include path.
There's some niceties left with this script including the ability to include your own set of modules by overriding `extra-config` as part of the include path.
It is expected that the extra configuration folder is structured similarly to this NixOS cluster.
[source, tree]

View File

@ -3,6 +3,11 @@
workflow=$1
shift 1
# Just mind the ordering of the search paths here, the extra `extra-config` is
# just the fallback value. As of Nix v2.18, there is a first-come first-serve
# precedence so if the user sets the `extra-config` Nix path, it should
# override the default.
# shellcheck disable=SC2068
nix-build -A config.system.build.vm -k \
--argstr workflow "$workflow" \

View File

@ -2,13 +2,14 @@
, lib
, meson
, ninja
, nix
, makeWrapper
, inputs ? [ ]
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "run-workflow-with-vm";
version = "2024-03-15";
version = "2024-05-10";
src = ./.;
@ -22,9 +23,16 @@ stdenv.mkDerivation {
mesonFlagsArray+=("-Dinputs=[${lib.concatStringsSep "," inputs}]")
'';
postInstall = ''
wrapProgram $out/bin/${finalAttrs.pname} \
--prefix PATH ':' '${lib.makeBinPath [ nix ]}'
'';
meta = with lib; {
description = "Quickly run workflow modules with a VM.";
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = finalAttrs.pname;
maintainers = with maintainers; [ foo-dogsquared ];
};
}
})

View File

@ -1,5 +1,5 @@
project('run-workflow-with-vm',
version: '2024-03-15',
version: '2024-05-10',
license: 'GPL-3.0-or-later',
meson_version: '>=0.54.0',
)
@ -20,7 +20,7 @@ bindata.set('inputsArgs', inputsArgs)
bindata.set('projectname', meson.project_name())
configure_file(
input: 'app.sh',
output: 'run-workflow-with-vm',
output: meson.project_name(),
configuration: bindata,
install_dir: get_option('bindir'),
install_mode: 'rwxr-xr-x',