Skip to content

Commit 07efeae

Browse files
committed
build: scope inherited nix package pins
1 parent 13cf23c commit 07efeae

6 files changed

Lines changed: 31 additions & 13 deletions

File tree

.github/scripts/clang-tidy-nix.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: AGPL-3.0-or-later OR Apache-2.0
3+
24
set -euo pipefail
35

46
extra_args=()

.github/workflows/build-kuebikodb.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
build:
2121
runs-on: depot-ubuntu-24.04-8
2222
env:
23-
CCACHE_DIR: ${{ github.workspace }}/.ccache
2423
CCACHE_MAXSIZE: 2G
2524
CCACHE_BASEDIR: ${{ github.workspace }}
2625
CCACHE_NOHASHDIR: true
@@ -36,7 +35,7 @@ jobs:
3635
if: ${{ inputs.enable_ccache }}
3736
uses: actions/cache@v4
3837
with:
39-
path: ${{ env.CCACHE_DIR }}
38+
path: ${{ github.workspace }}/.ccache
4039
key: ccache-${{ runner.os }}-build-kuebikodb-${{ inputs.build_mode }}-${{ hashFiles('flake.nix', 'flake.lock', 'configure.py', 'CMakeLists.txt', 'cmake/**', '.gitmodules') }}-${{ github.run_id }}
4140
restore-keys: |
4241
ccache-${{ runner.os }}-build-kuebikodb-${{ inputs.build_mode }}-${{ hashFiles('flake.nix', 'flake.lock', 'configure.py', 'CMakeLists.txt', 'cmake/**', '.gitmodules') }}-
@@ -45,12 +44,15 @@ jobs:
4544
- name: Configure ccache
4645
if: ${{ inputs.enable_ccache }}
4746
run: |
47+
echo "CCACHE_DIR=$GITHUB_WORKSPACE/.ccache" >> "$GITHUB_ENV"
48+
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
4849
mkdir -p "$CCACHE_DIR"
4950
nix develop .#cpp -c ccache --max-size="$CCACHE_MAXSIZE"
5051
nix develop .#cpp -c ccache --zero-stats
5152
- name: Generate the building system
5253
run: |
5354
git config --global --add safe.directory $GITHUB_WORKSPACE
55+
# The .#cpp shell's compiler wrappers use ccache when CCACHE_DIR is set.
5456
nix develop .#cpp -c ./configure.py --mode ${{ inputs.build_mode }} --with scylla
5557
- run: |
5658
nix develop .#cpp -c ninja build/${{ inputs.build_mode }}/scylla

default.nix

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
# shell env will want to add stuff to the environment, and the way
2727
# for it to do so is to pass us a function with this signatire:
2828
, devInputs ? ({ pkgs, llvm }: [])
29+
30+
# Compatibility pins for the inherited C++ build. Keep these local to this
31+
# expression so tooling packages in dev shells can still use current nixpkgs.
32+
, antlr3Package ? pkgs.antlr3
33+
, fmtPackage ? pkgs.fmt
2934
}:
3035

3136
let
@@ -77,9 +82,10 @@ in derive ({
7782
# "aspirational" all the way to "cargo cult ritual" -- i.e. not
7883
# expected to be actually correct or verifiable. but it's the
7984
# thought that counts!
80-
nativeBuildInputs = with pkgs; [
85+
nativeBuildInputs = [
86+
antlr3Package
87+
] ++ (with pkgs; [
8188
ant
82-
antlr3
8389
boost
8490
cargo
8591
cmake
@@ -113,15 +119,16 @@ in derive ({
113119
ragel
114120
rustc
115121
stow
116-
] ++ (devInputs { inherit pkgs llvm; });
122+
]) ++ (devInputs { inherit pkgs llvm; });
117123

118-
buildInputs = with pkgs; [
124+
buildInputs = [
125+
antlr3Package
126+
fmtPackage
127+
] ++ (with pkgs; [
119128
abseil-cpp
120-
antlr3
121129
boost
122130
c-ares
123131
cryptopp
124-
fmt
125132
gmp
126133
gnutls
127134
hwloc
@@ -155,7 +162,7 @@ in derive ({
155162
xxHash
156163
zlib
157164
zstd
158-
];
165+
]);
159166

160167
JAVA8_HOME = "${pkgs.openjdk8_headless}/lib/openjdk";
161168
JAVA_HOME = "${pkgs.openjdk11_headless}/lib/openjdk";

docs/relicensing/inventory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ It is an audit starting point, not a legal conclusion.
66
- Source: tracked files in the current working tree
77
- Generator: `docs/relicensing/generate-inventory.py`
88
- Complete per-file inventory: `inventory.tsv`
9-
- Tracked files scanned: `5953`
9+
- Tracked files scanned: `5954`
1010

1111
## License Classes
1212

1313
| Category | Files |
1414
|-----------------|-------|
1515
| AGPL-only | 1694 |
1616
| Apache-only | 39 |
17-
| dual-licensed | 371 |
17+
| dual-licensed | 372 |
1818
| unknown-license | 3849 |
1919

2020
## File Flags

docs/relicensing/inventory.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ path license_class spdx copyright flags binary
1010
.github/mergify.yml unknown-license no
1111
.github/pull_request_template.md unknown-license no
1212
.github/scripts/auto-backport.py unknown-license no
13+
.github/scripts/clang-tidy-nix.sh dual-licensed AGPL-3.0-or-later OR Apache-2.0 no
1314
.github/scripts/label_promoted_commits.py unknown-license no
1415
.github/scripts/sync_labels.py unknown-license no
1516
.github/workflows/build-kuebikodb.yaml unknown-license no

flake.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
(final: prev: {
2929
# default.nix predates current nixpkgs and still references
3030
# package names that have been removed from unstable.
31-
antlr3 = prev.antlr3_4;
32-
fmt = prev.fmt_10;
3331
llvmPackages_15 = prev.llvmPackages;
3432
boost175 = prev.boost181;
3533
libyamlcpp = prev.yaml-cpp;
@@ -109,6 +107,14 @@
109107
flake = true;
110108
shell = true;
111109
srcPath = self;
110+
antlr3Package = pkgs.antlr3_4;
111+
fmtPackage = pkgs.fmt_10.overrideAttrs (old: {
112+
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
113+
"-DFMT_TEST=OFF"
114+
];
115+
doCheck = false;
116+
doInstallCheck = false;
117+
});
112118
devInputs =
113119
{ pkgs, llvm }:
114120
with pkgs;

0 commit comments

Comments
 (0)