{ description = "Ivy Bridge Custom Mesa"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs }: let systems = ["x86_64-linux"]; forAllSystems = f: nixpkgs.lib.genAttrs systems f; buildCustomMesa = pkgs: pkgs.mesa.overrideAttrs (old: { patches = (old.patches or []) ++ [ ./hd4000-custom.patch ]; mesonFlags = (old.mesonFlags or []) ++ [ "-Dgallium-rusticl=true" ]; }); in { packages = forAllSystems (system: let pkgs = import nixpkgs { inherit system; }; in { mesa-custom = buildCustomMesa pkgs; mesa-custom-32 = buildCustomMesa pkgs.pkgsi686Linux; } ); }; }