This commit is contained in:
elwrcl committed 2026-06-05 21:33:26 +03:00
1 parent 575726804c
commit 9e75b7c917
1 file changed
+24 -10
+24 -10
View File
@@ -3,20 +3,34 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
mesa-src = {
url = "git+https://gitlab.freedesktop.org/mesa/mesa?rev=1a8953c9562d779f2d2730900a85ab5f446fff12";
flake = false;
};
}; };
outputs = { self, nixpkgs, mesa-src }: outputs = { self, nixpkgs }:
let let
system = "x86_64-linux"; systems = ["x86_64-linux"];
pkgs = import nixpkgs { inherit system; };
forAllSystems = f: nixpkgs.lib.genAttrs systems f;
in { in {
packages.${system}.mesa-custom = pkgs.mesa.overrideAttrs (old: { packages = forAllSystems (system:
src = mesa-src; let
patches = [ ./hd4000-custom.patch ]; pkgs = import nixpkgs { inherit system; };
buildCustomMesa = pkgs: pkgs.mesa.overrideAttrs (old: {
patches = (old.patches or []) ++ [
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/elwrcl/intel-hard-graphics/main/hd4000-custom.patch";
hash = ""; # İlk build'de hash al
})
];
mesonFlags = (old.mesonFlags or []) ++ [ "-Dgallium-rusticl=true" ];
}); });
in {
mesa-custom = buildCustomMesa pkgs;
mesa-custom-32 = if system == "x86_64-linux" then
buildCustomMesa pkgs.pkgsi686Linux
else null;
}
);
}; };
} }