mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
apps/run-workflow-with-vm: update to 2024-05-10
This commit is contained in:
parent
177364306a
commit
08b1cf8df3
@ -16,7 +16,7 @@ When run, it should build a VM with its script to easily initialize it.
|
|||||||
|
|
||||||
== Extra niceties
|
== 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.
|
It is expected that the extra configuration folder is structured similarly to this NixOS cluster.
|
||||||
|
|
||||||
[source, tree]
|
[source, tree]
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
workflow=$1
|
workflow=$1
|
||||||
shift 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
|
# shellcheck disable=SC2068
|
||||||
nix-build -A config.system.build.vm -k \
|
nix-build -A config.system.build.vm -k \
|
||||||
--argstr workflow "$workflow" \
|
--argstr workflow "$workflow" \
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
, lib
|
, lib
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
|
, nix
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, inputs ? [ ]
|
, inputs ? [ ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "run-workflow-with-vm";
|
pname = "run-workflow-with-vm";
|
||||||
version = "2024-03-15";
|
version = "2024-05-10";
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
@ -22,9 +23,16 @@ stdenv.mkDerivation {
|
|||||||
mesonFlagsArray+=("-Dinputs=[${lib.concatStringsSep "," inputs}]")
|
mesonFlagsArray+=("-Dinputs=[${lib.concatStringsSep "," inputs}]")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/${finalAttrs.pname} \
|
||||||
|
--prefix PATH ':' '${lib.makeBinPath [ nix ]}'
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Quickly run workflow modules with a VM.";
|
description = "Quickly run workflow modules with a VM.";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
mainProgram = finalAttrs.pname;
|
||||||
|
maintainers = with maintainers; [ foo-dogsquared ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
project('run-workflow-with-vm',
|
project('run-workflow-with-vm',
|
||||||
version: '2024-03-15',
|
version: '2024-05-10',
|
||||||
license: 'GPL-3.0-or-later',
|
license: 'GPL-3.0-or-later',
|
||||||
meson_version: '>=0.54.0',
|
meson_version: '>=0.54.0',
|
||||||
)
|
)
|
||||||
@ -20,7 +20,7 @@ bindata.set('inputsArgs', inputsArgs)
|
|||||||
bindata.set('projectname', meson.project_name())
|
bindata.set('projectname', meson.project_name())
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'app.sh',
|
input: 'app.sh',
|
||||||
output: 'run-workflow-with-vm',
|
output: meson.project_name(),
|
||||||
configuration: bindata,
|
configuration: bindata,
|
||||||
install_dir: get_option('bindir'),
|
install_dir: get_option('bindir'),
|
||||||
install_mode: 'rwxr-xr-x',
|
install_mode: 'rwxr-xr-x',
|
||||||
|
Loading…
Reference in New Issue
Block a user