From 85ab735653d30a030891b7e187b0a7eb24f2a258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 2 Aug 2025 13:35:58 +0200 Subject: [PATCH 1/4] Add nix-direnv --- .envrc | 1 + .gitignore | 1 + README.md | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 12df926f..8158f64b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *~ +/.direnv/ .test_info.* /src/sql/hydra-postgresql.sql /src/sql/hydra-sqlite.sql diff --git a/README.md b/README.md index b0244f60..4cbd13cb 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ $ mesonConfigurePhase $ ninja ``` +The development environment can also automatically be established using [nix-direnv](https://github.com/nix-community/nix-direnv). + ### Executing Hydra During Development When working on new features or bug fixes you need to be able to run Hydra from your working copy. This From 80b9d82ea47b46e9cc26d5055f80068d27c54028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 2 Aug 2025 13:41:39 +0200 Subject: [PATCH 2/4] Fix meson and ninja commands and link bootstrap --- .gitignore | 1 + README.md | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8158f64b..bf385fa3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *~ /.direnv/ .test_info.* +/src/root/static/bootstrap /src/sql/hydra-postgresql.sql /src/sql/hydra-sqlite.sql /src/sql/tmp.sqlite diff --git a/README.md b/README.md index 4cbd13cb..52faffbd 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,9 @@ $ nix build You can use the provided shell.nix to get a working development environment: ``` $ nix develop -$ mesonConfigurePhase -$ ninja +$ ln -svf ../../../build/src/bootstrap src/root/static/bootstrap +$ meson setup build +$ ninja -C build ``` The development environment can also automatically be established using [nix-direnv](https://github.com/nix-community/nix-direnv). From d2c10bf851cb2b59e6d7235bff9dc2945176e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 2 Aug 2025 13:52:35 +0200 Subject: [PATCH 3/4] Fixup static libraries in development server --- .gitignore | 2 ++ README.md | 2 ++ src/meson.build | 16 ++++------------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index bf385fa3..ea9c2985 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ /.direnv/ .test_info.* /src/root/static/bootstrap +/src/root/static/fontawesome +/src/root/static/js/flot /src/sql/hydra-postgresql.sql /src/sql/hydra-sqlite.sql /src/sql/tmp.sqlite diff --git a/README.md b/README.md index 52faffbd..7c20f9bf 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ You can use the provided shell.nix to get a working development environment: ``` $ nix develop $ ln -svf ../../../build/src/bootstrap src/root/static/bootstrap +$ ln -svf ../../../build/src/fontawesome src/root/static/fontawesome +$ ln -svf ../../../../build/src/flot src/root/static/js/flot $ meson setup build $ ninja -C build ``` diff --git a/src/meson.build b/src/meson.build index 52b821bc..c2ffc075 100644 --- a/src/meson.build +++ b/src/meson.build @@ -57,20 +57,12 @@ fontawesome = custom_target( command: ['unzip', '-u', '-d', '@OUTDIR@', '@INPUT@'], ) custom_target( - 'name-fontawesome-css', + 'name-fontawesome', input: fontawesome, - output: 'css', - command: ['cp', '-r', '@INPUT@/css', '@OUTPUT@'], + output: 'fontawesome', + command: ['cp', '-r', '@INPUT@' , '@OUTPUT@'], install: true, - install_dir: hydra_libexecdir_static / 'fontawesome', -) -custom_target( - 'name-fontawesome-webfonts', - input: fontawesome, - output: 'webfonts', - command: ['cp', '-r', '@INPUT@/webfonts', '@OUTPUT@'], - install: true, - install_dir: hydra_libexecdir_static / 'fontawesome', + install_dir: hydra_libexecdir_static, ) # Scripts From ec3d0c696b0c6488f11661b24278a1f88842093e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 2 Aug 2025 13:52:49 +0200 Subject: [PATCH 4/4] Fix the evaluator not finding hydra-eval-jobset --- foreman/start-evaluator.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/foreman/start-evaluator.sh b/foreman/start-evaluator.sh index a2858003..73e0fe42 100755 --- a/foreman/start-evaluator.sh +++ b/foreman/start-evaluator.sh @@ -1,5 +1,7 @@ #!/bin/sh +export PATH=$(pwd)/src/script:$PATH + # wait for hydra-server to listen while ! nc -z localhost 63333; do sleep 1; done