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

Add GCC and GNU Make to the Nix flake development environment so that ruff can be compiled. #16090

Merged
merged 3 commits into from Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/16090.misc
@@ -0,0 +1 @@
Add GCC and GNU Make to the Nix flake development environment so that `ruff` can be compiled.
17 changes: 17 additions & 0 deletions flake.nix
Expand Up @@ -89,6 +89,10 @@
})
# The rust-analyzer language server implementation.
rust-analyzer
# GCC includes a linker; needed for building `ruff`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# GCC includes a linker; needed for building `ruff`
# GCC includes a linker; needed for building `ruff`

I've been trying to separate distinct sections with a space :)

gcc
# Needed for building `ruff`
gnumake

# Native dependencies for running Synapse.
icu
Expand Down Expand Up @@ -236,6 +240,19 @@
URI
YAMLLibYAML
]}";

# Clear the LD_LIBRARY_PATH environment variable on shell init.
#
# By default, devenv will set LD_LIBRARY_PATH to point to .devenv/profile/lib. This causes
# issues when we include `gcc` as a dependency to build C libraries, as the version of glibc
# that the development environment's cc compiler uses may differ from that of the system.
#
# When LD_LIBRARY_PATH is set, system tools will attempt to use the development environment's
# libraries. Which, when built against an different glibc version lead, to "version 'GLIBC_X.YY' not
# found" errors.
Comment on lines +251 to +252
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correcting past me.

Suggested change
# libraries. Which, when built against an different glibc version lead, to "version 'GLIBC_X.YY' not
# found" errors.
# libraries. Which, when built against a different glibc version lead, to "version 'GLIBC_X.YY'
# not found" errors.

enterShell = ''
unset LD_LIBRARY_PATH
'';
}
];
};
Expand Down