FromCabal: remove LLVM evil#668
Merged
sternenseemann merged 5 commits intoNixOS:masterfrom Sep 9, 2025
Merged
Conversation
sternenseemann
requested changes
Sep 8, 2025
a8fd87f to
503355c
Compare
We’re patching out the `-fllvm` in Nixpkgs instead. This was incorrect, anyway, as the LLVM build tools should not be added to `libraryPkgconfigDepends`.
Usually, there is no reason to tie use of LLVM libraries to the LLVM version used by GHC’s LLVM backend as packages should not declare this as a library dependency. Also, `libclang` is the correct dependency for Clang used as a library, rather than the wrapped `clang` tool. (In practice, though, this doesn’t really help: the packages this changes in Nixpkgs are already broken because they depend on ancient LLVMs, want the `llvm-config(1)` tool that is in the `llvm` package, and in one of the two cases the `Setup.hs` doesn’t even build with modern Cabal.) To get a consistent result in hackage-packages.nix, we unfortunately have to add an extra alias for clang-3.8 (which has long been removed) until LibClang is removed from the package set.
Previously, vte-2.91 was mapped to a pseudo attribute vte_291 which was special cased in resolveInNixpkgs. This seems not much better than encoding this knowledge via libNixName directly, so let's simplify the logic.
These do not appear to have an effect on hackage-packages.nix at all (anymore?).
503355c to
23ceb3c
Compare
Member
|
With the extra cleanup, we now have the following diff: diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 85eea82315fd..45910e661c6d 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -16266,7 +16266,6 @@ self: {
mkDerivation,
array,
base,
- llvm,
}:
mkDerivation {
pname = "GlomeVec";
@@ -16276,11 +16275,10 @@ self: {
array
base
];
- libraryPkgconfigDepends = [ llvm ];
description = "Simple 3D vector library";
license = "GPL";
}
- ) { inherit (self.llvmPackages) llvm; };
+ ) { };
"GlomeView" = callPackage (
{
@@ -27647,9 +27645,9 @@ self: {
base,
bytestring,
c2hs,
- clang,
filepath,
hashable,
+ libclang,
mtl,
ncurses,
resourcet,
@@ -27676,7 +27674,7 @@ self: {
transformers-base
vector
];
- librarySystemDepends = [ clang ];
+ librarySystemDepends = [ libclang ];
libraryPkgconfigDepends = [ ncurses ];
libraryToolDepends = [ c2hs ];
description = "Haskell bindings for libclang (a C++ parsing library)";
@@ -27686,7 +27684,7 @@ self: {
}
)
{
- inherit (self.llvmPackages) clang;
+ inherit (pkgs) libclang;
inherit (pkgs) ncurses;
};
@@ -141306,11 +141304,11 @@ self: {
base,
bytestring,
Cabal,
- clang,
containers,
contravariant,
inline-c,
lens,
+ libclang,
microlens,
microlens-contra,
process,
@@ -141344,7 +141342,7 @@ self: {
template-haskell
vector
];
- librarySystemDepends = [ clang ];
+ librarySystemDepends = [ libclang ];
testHaskellDepends = [
base
bytestring
@@ -141355,7 +141353,7 @@ self: {
hydraPlatforms = lib.platforms.none;
broken = true;
}
- ) { inherit (self.llvmPackages) clang; };
+ ) { inherit (pkgs) libclang; };
"clanki" = callPackage (
{
@@ -267231,7 +267229,7 @@ self: {
haskell-gi-overloading,
text,
transformers,
- vte_291,
+ vte,
}:
mkDerivation {
pname = "gi-vte";
@@ -267270,12 +267268,12 @@ self: {
text
transformers
];
- libraryPkgconfigDepends = [ vte_291 ];
+ libraryPkgconfigDepends = [ vte ];
description = "Vte bindings";
license = lib.licenses.lgpl21Only;
badPlatforms = lib.platforms.darwin;
}
- ) { vte_291 = pkgs.vte; };
+ ) { inherit (pkgs) vte; };
"gi-webkit" = callPackage (
{
@@ -664371,7 +664369,7 @@ self: {
text,
transformers,
unordered-containers,
- vte_291,
+ vte,
xml-conduit,
xml-html-qq,
yaml,
@@ -664421,7 +664419,7 @@ self: {
libraryPkgconfigDepends = [
gtk3
pcre2
- vte_291
+ vte
];
executableHaskellDepends = [ base ];
testHaskellDepends = [
@@ -664441,7 +664439,7 @@ self: {
{
inherit (pkgs) gtk3;
inherit (pkgs) pcre2;
- vte_291 = pkgs.vte;
+ inherit (pkgs) vte;
};
"termplot" = callPackage ( |
sternenseemann
approved these changes
Sep 8, 2025
Member
Author
|
LGTM. Do you want me to regenerate the diff in NixOS/nixpkgs#441101, or just let it get washed out by the next |
Member
|
I would merge NixOS/nixpkgs#441324 and then put a similar update onto your PR, though I can take care of that for you. |
Member
Author
|
Sounds good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.