From 801344766138395b36ebcc4b076c1fd1027a904f Mon Sep 17 00:00:00 2001 From: Hugo McNally Date: Tue, 1 Jul 2025 10:56:06 +0300 Subject: [PATCH 1/2] nix: Added descriptions to apps Nix now shows a warning for apps that don't have descriptions. ``` warning: app 'apps.x86_64-linux.lint-cpp' lacks attribute 'meta.description' ``` --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index cfe4b0a..4972a85 100644 --- a/flake.nix +++ b/flake.nix @@ -228,6 +228,7 @@ value = { type = "app"; program = getExe program; + meta.description = "Part of the Sonata Software lints and tests suite."; }; }) [lint-all lint-cpp lint-python tests-runner tests-fpga-runner]); }; From b33333a770ddc7376f29683e786a1fe4e4a806c5 Mon Sep 17 00:00:00 2001 From: Hugo McNally Date: Tue, 1 Jul 2025 10:57:16 +0300 Subject: [PATCH 2/2] nix: switched over to the new submodules flake attribute In the latest release of Nix, one can now declare that they'd like submodules included within the flake files inputs. --- .github/workflows/ci.yml | 14 +++++++------- flake.nix | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d288ae..8ee73ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,15 +33,15 @@ jobs: run: nix fmt -- . --check --exclude ./third_party --exclude ./cheriot-rtos - name: Run Lints - run: nix run .?submodules=1#lint-all + run: nix run .#lint-all - name: Build Software run: | - nix build -L .?submodules=1#sonata-exercises - nix build -L .?submodules=1#sonata-examples - nix build -L .?submodules=1#sonata-automotive-demo-legacy-component - nix build -L .?submodules=1#sonata-heartbleed-demo-legacy-component - nix build -L .?submodules=1#sonata-tests + nix build -L .#sonata-exercises + nix build -L .#sonata-examples + nix build -L .#sonata-automotive-demo-legacy-component + nix build -L .#sonata-heartbleed-demo-legacy-component + nix build -L .#sonata-tests - name: Run Nix Checks - run: nix flake check -L .?submodules=1# + run: nix flake check -L .# diff --git a/flake.nix b/flake.nix index 4972a85..00b7244 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ { description = "Sonata software"; inputs = { + self.submodules = true; sonata-system.url = "github:lowRISC/sonata-system"; lowrisc-nix.follows = "sonata-system/lowrisc-nix"; nixpkgs.follows = "lowrisc-nix/nixpkgs";