packages/linux-lava: fix clang build issues after nixpkgs changes
This commit is contained in:
parent
80be3da7fc
commit
24aa8d0174
3 changed files with 26 additions and 13 deletions
|
|
@ -2,6 +2,7 @@ builtins.map (path: import path) [
|
||||||
./android-studio.nix
|
./android-studio.nix
|
||||||
./ccache.nix
|
./ccache.nix
|
||||||
./eww.nix
|
./eww.nix
|
||||||
|
./linux-lava.nix
|
||||||
./material-icons.nix
|
./material-icons.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./steam.nix
|
./steam.nix
|
||||||
|
|
|
||||||
23
overlays/linux-lava.nix
Normal file
23
overlays/linux-lava.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
self: super: let
|
||||||
|
llvmPackages = super.llvmPackages_19;
|
||||||
|
clangVersion = super.lib.versions.major llvmPackages.libclang.version;
|
||||||
|
cc = llvmPackages.stdenv.cc.override {
|
||||||
|
# :sob: see https://github.com/NixOS/nixpkgs/issues/142901
|
||||||
|
bintools = llvmPackages.bintools;
|
||||||
|
extraBuildCommands = ''
|
||||||
|
substituteInPlace "$out/nix-support/cc-cflags" --replace " -nostdlibinc" ""
|
||||||
|
substituteInPlace "$out/nix-support/add-local-cc-cflags-before.sh" --replace 'echo "Warning: supplying the --target argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead." >&2' ""
|
||||||
|
echo " -resource-dir=${llvmPackages.libclang.lib}/lib/clang/${clangVersion}" >> $out/nix-support/cc-cflags
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
stdenv = super.ccacheStdenv.override {
|
||||||
|
stdenv = super.overrideCC llvmPackages.stdenv cc;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
linuxLavaEnv = {
|
||||||
|
inherit llvmPackages clangVersion cc stdenv;
|
||||||
|
};
|
||||||
|
rust-bindgen-unwrapped = super.rust-bindgen-unwrapped.override {
|
||||||
|
clang = cc;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,16 @@
|
||||||
{ buildLinux
|
{ buildLinux
|
||||||
, callPackage
|
, callPackage
|
||||||
, ccacheStdenv
|
|
||||||
, inputs
|
, inputs
|
||||||
, kernelPatches
|
|
||||||
, lib
|
, lib
|
||||||
, llvmPackages_16
|
, linuxLavaEnv
|
||||||
, overrideCC
|
|
||||||
, ...
|
, ...
|
||||||
} @ args:
|
} @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
sources = callPackage ./sources.nix { inherit inputs; };
|
sources = callPackage ./sources.nix { inherit inputs; };
|
||||||
llvmPackages = llvmPackages_16;
|
|
||||||
kernel = buildLinux (args // {
|
kernel = buildLinux (args // {
|
||||||
inherit (sources) src kernelPatches;
|
inherit (sources) src kernelPatches;
|
||||||
stdenv = ccacheStdenv.override {
|
inherit (linuxLavaEnv) stdenv;
|
||||||
# :sob: see https://github.com/NixOS/nixpkgs/issues/142901
|
|
||||||
stdenv = overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override {
|
|
||||||
bintools = llvmPackages.bintools.override {
|
|
||||||
sharedLibraryLoader = null;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
version = "${sources.version}-tkg-Lava";
|
version = "${sources.version}-tkg-Lava";
|
||||||
isZen = true;
|
isZen = true;
|
||||||
extraMakeFlags = [ "LLVM=1" "LLVM_IAS=1" ];
|
extraMakeFlags = [ "LLVM=1" "LLVM_IAS=1" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue