aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-08-01 04:01:34 +0000
committerGerrit Code Review <gerrit@localhost>2024-08-01 04:01:34 +0000
commita3ab2cc78a736109435f3cc8e1364fcc366c6c97 (patch)
tree933093239d0df0567e95d6e9d7684864cb32eff4 /flake.nix
parentddfca6e81b3685ca17b28a9063caf5c58d412dda (diff)
parent5eecdd3ae9f47b1aaac22134eced318ff3e4bc41 (diff)
Merge changes from topic "undefined-behaviour" into main
* changes: releng: move officialRelease to version.json Add -Werror CI job ci: add a asan+ubsan test run on x86_64-linux tree-wide: add support for asan!
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index cec970974..d2173cf47 100644
--- a/flake.nix
+++ b/flake.nix
@@ -59,7 +59,8 @@
(Run `touch .nocontribmsg` to hide this message.)
'';
- officialRelease = false;
+ versionJson = builtins.fromJSON (builtins.readFile ./version.json);
+ officialRelease = versionJson.official_release;
# Set to true to build the release notes for the next release.
buildUnreleasedNotes = true;
@@ -275,6 +276,19 @@
# System tests.
tests = import ./tests/nixos { inherit lib nixpkgs nixpkgsFor; } // {
+ # This is x86_64-linux only, just because we have significantly
+ # cheaper x86_64-linux compute in CI.
+ # It is clangStdenv because clang's sanitizers are nicer.
+ asanBuild = self.packages.x86_64-linux.nix-clangStdenv.override {
+ sanitize = [
+ "address"
+ "undefined"
+ ];
+ # it is very hard to make *every* CI build use this option such
+ # that we don't wind up building Lix twice, so we do it here where
+ # we are already doing so.
+ werror = true;
+ };
# Make sure that nix-env still produces the exact same result
# on a particular version of Nixpkgs.
@@ -406,7 +420,7 @@
pkgs: stdenv:
let
nix = pkgs.callPackage ./package.nix {
- inherit stdenv officialRelease versionSuffix;
+ inherit stdenv versionSuffix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox;
internalApiDocs = false;
};