Nix: add patched libglvnd overlay

This commit is contained in:
Félix Baylac-Jacqué 2022-11-24 16:45:28 +01:00
parent 0ccc67bbb4
commit 7e49ce6fbd
No known key found for this signature in database
GPG Key ID: EFD315F31848DBA4
2 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{
description = "Gluing native OpenGL drivers";
description = "Gluing host OpenGL drivers to a Nix-built binary";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs =
{ self
@ -11,12 +11,18 @@
"aarch64-linux"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
pkgs = system: import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
defaultPackage = forAllSystems (system:
import ./default.nix {
pkgs = import nixpkgs { inherit system; };
});
defaultPackage = forAllSystems (system: import ./default.nix { pkgs = pkgs system; });
overlays.default = import ./overlays/nixpkgs.nix;
legacyPackages = forAllSystems (system: (pkgs system));
devShell = forAllSystems (system:
nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { }
);
@ -24,5 +30,6 @@
formatter = forAllSystems (system:
nixpkgs.legacyPackages.${system}.nixpkgs-fmt
);
};
}

11
overlays/nixpkgs.nix Normal file
View File

@ -0,0 +1,11 @@
self: super:
{
libglvnd = super.libglvnd.overrideAttrs (old: {
src = super.fetchFromGitHub {
owner = "NinjaTrappeur";
repo = "libglvnd";
rev = "f4dff011f78ecd5a69871d4a8ddf3c742de5f621";
sha256 = "sha256-57awDiR9DaFTGe8J4ed89Xm3Fc4/OM6qflsuHqx9mxE=";
};
});
}