2022-12-30 08:45:15 +00:00
|
|
|
{
|
|
|
|
description = "A wrapper tool for nix OpenGL applications";
|
|
|
|
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
(flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
isIntelX86Platform = system == "x86_64-linux";
|
2023-01-13 06:42:21 +00:00
|
|
|
nix_pkgs = import nixpkgs { inherit system; };
|
2022-12-30 08:45:15 +00:00
|
|
|
pkgs = import ./default.nix {
|
2023-01-12 20:01:11 +00:00
|
|
|
pkgs = nix_pkgs;
|
2022-12-30 08:45:15 +00:00
|
|
|
enable32bits = isIntelX86Platform;
|
|
|
|
enableIntelX86Extensions = isIntelX86Platform;
|
|
|
|
};
|
2023-01-13 06:42:21 +00:00
|
|
|
in
|
|
|
|
rec {
|
2022-12-30 08:45:15 +00:00
|
|
|
|
|
|
|
packages = {
|
|
|
|
# makes it easy to use "nix run nixGL --impure -- program"
|
|
|
|
default = pkgs.auto.nixGLDefault;
|
|
|
|
|
|
|
|
nixGLDefault = pkgs.auto.nixGLDefault;
|
|
|
|
nixGLNvidia = pkgs.auto.nixGLNvidia;
|
|
|
|
nixGLNvidiaBumblebee = pkgs.auto.nixGLNvidiaBumblebee;
|
|
|
|
nixGLIntel = pkgs.nixGLIntel;
|
|
|
|
nixVulkanNvidia = pkgs.auto.nixVulkanNvidia;
|
|
|
|
nixVulkanIntel = pkgs.nixVulkanIntel;
|
|
|
|
};
|
|
|
|
|
|
|
|
# deprecated attributes for retro compatibility
|
|
|
|
defaultPackage = packages;
|
|
|
|
})) // rec {
|
2023-01-13 06:42:21 +00:00
|
|
|
# deprecated attributes for retro compatibility
|
|
|
|
overlay = overlays.default;
|
|
|
|
overlays.default = final: _:
|
|
|
|
let isIntelX86Platform = final.system == "x86_64-linux";
|
|
|
|
in {
|
|
|
|
nixgl = import ./default.nix {
|
|
|
|
pkgs = final;
|
|
|
|
enable32bits = isIntelX86Platform;
|
|
|
|
enableIntelX86Extensions = isIntelX86Platform;
|
2022-12-30 08:45:15 +00:00
|
|
|
};
|
2023-01-13 06:42:21 +00:00
|
|
|
};
|
|
|
|
};
|
2022-12-30 08:45:15 +00:00
|
|
|
}
|