dotfiles/out-of-tree/nixGL/flake.nix

50 lines
1.5 KiB
Nix
Raw Permalink Normal View History

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";
2023-06-18 00:46:31 +00:00
outputs = {
self,
nixpkgs,
flake-utils,
}:
(flake-utils.lib.eachDefaultSystem (system: let
isIntelX86Platform = system == "x86_64-linux";
nix_pkgs = import nixpkgs {inherit system;};
pkgs = import ./default.nix {
pkgs = nix_pkgs;
enable32bits = isIntelX86Platform;
enableIntelX86Extensions = isIntelX86Platform;
};
in rec {
packages = {
# makes it easy to use "nix run nixGL --impure -- program"
default = pkgs.auto.nixGLDefault;
2022-12-30 08:45:15 +00:00
2023-06-18 00:46:31 +00:00
nixGLDefault = pkgs.auto.nixGLDefault;
nixGLNvidia = pkgs.auto.nixGLNvidia;
nixGLNvidiaBumblebee = pkgs.auto.nixGLNvidiaBumblebee;
nixGLIntel = pkgs.nixGLIntel;
nixVulkanNvidia = pkgs.auto.nixVulkanNvidia;
nixVulkanIntel = pkgs.nixVulkanIntel;
};
2022-12-30 08:45:15 +00:00
2023-06-18 00:46:31 +00:00
# deprecated attributes for retro compatibility
defaultPackage = packages;
}))
// rec {
2023-01-13 06:42:21 +00:00
# deprecated attributes for retro compatibility
overlay = overlays.default;
2023-06-18 00:46:31 +00:00
overlays.default = final: _: let
isIntelX86Platform = final.system == "x86_64-linux";
in {
nixgl = import ./default.nix {
pkgs = final;
enable32bits = isIntelX86Platform;
enableIntelX86Extensions = isIntelX86Platform;
2023-01-13 06:42:21 +00:00
};
2023-06-18 00:46:31 +00:00
};
2023-01-13 06:42:21 +00:00
};
2022-12-30 08:45:15 +00:00
}