aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 07:11:19 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 07:11:19 +0100
commite8a488236c0f3e33d3ed71a5bb543d59ec54d2f1 (patch)
tree8d5acbaa29084240621b9bcd4b4d3381959936cc /flake.nix
parentd8a293d61d4b4e826ae1c153b5a816d0e0e8138d (diff)
Merge pull request #9393 from hercules-ci/changelog-d
Automatically compile hand-written release notes with `changelog-d` (cherry picked from commit 928f0c13414d20c1af88b30bd6700fd730ee0bab) Change-Id: Ia0685835c52edf185b64dd696b19305746c077e5
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index beaeabcd2..2caef3f7d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,9 @@
officialRelease = true;
+ # Set to true to build the release notes for the next release.
+ buildUnreleasedNotes = false;
+
version = lib.fileContents ./.version + versionSuffix;
versionSuffix =
if officialRelease
@@ -169,6 +172,8 @@
"--enable-internal-api-docs"
];
+ changelog-d = pkgs.buildPackages.changelog-d;
+
nativeBuildDeps =
[
buildPackages.bison
@@ -185,7 +190,10 @@
buildPackages.mercurial # FIXME: remove? only needed for tests
buildPackages.jq # Also for custom mdBook preprocessor.
]
- ++ lib.optionals stdenv.hostPlatform.isLinux [(buildPackages.util-linuxMinimal or buildPackages.utillinuxMinimal)];
+ ++ lib.optionals stdenv.hostPlatform.isLinux [(buildPackages.util-linuxMinimal or buildPackages.utillinuxMinimal)]
+ # Official releases don't have rl-next, so we don't need to compile a changelog
+ ++ lib.optional (!officialRelease && buildUnreleasedNotes) changelog-d
+ ;
buildDeps =
[ curl
@@ -746,6 +754,8 @@
++ lib.optional
(stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform)
pkgs.buildPackages.clang-tools
+ # We want changelog-d in the shell even if the current build doesn't need it
+ ++ lib.optional (officialRelease || ! buildUnreleasedNotes) changelog-d
;
buildInputs = buildDeps ++ propagatedDeps