Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 35934b0

Browse files
authored
Add GCC and GNU Make to the Nix flake development environment so that ruff can be compiled. (#16090)
* Add gcc and GNU make to the Nix flake * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> * unset LD_LIBRARY_PATH --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
1 parent ffe4ea1 commit 35934b0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

changelog.d/16090.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add GCC and GNU Make to the Nix flake development environment so that `ruff` can be compiled.

flake.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
})
9090
# The rust-analyzer language server implementation.
9191
rust-analyzer
92+
# GCC includes a linker; needed for building `ruff`
93+
gcc
94+
# Needed for building `ruff`
95+
gnumake
9296

9397
# Native dependencies for running Synapse.
9498
icu
@@ -236,6 +240,19 @@
236240
URI
237241
YAMLLibYAML
238242
]}";
243+
244+
# Clear the LD_LIBRARY_PATH environment variable on shell init.
245+
#
246+
# By default, devenv will set LD_LIBRARY_PATH to point to .devenv/profile/lib. This causes
247+
# issues when we include `gcc` as a dependency to build C libraries, as the version of glibc
248+
# that the development environment's cc compiler uses may differ from that of the system.
249+
#
250+
# When LD_LIBRARY_PATH is set, system tools will attempt to use the development environment's
251+
# libraries. Which, when built against an different glibc version lead, to "version 'GLIBC_X.YY' not
252+
# found" errors.
253+
enterShell = ''
254+
unset LD_LIBRARY_PATH
255+
'';
239256
}
240257
];
241258
};

0 commit comments

Comments
 (0)