outfly/build/nix/flake.nix

49 lines
1.2 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ ];
pkgs = import nixpkgs { inherit system overlays; };
in {
packages.outfly = pkgs.callPackage ./build.nix {};
packages.default = self.packages.${system}.outfly;
apps.outfly = {
type = "app";
program = "${self.packages.${system}.outfly}/bin/outfly";
};
apps.default = self.apps.${system}.outfly;
devShells.default = let
buildInputs = [
pkgs.alsa-lib.dev
#opengl
pkgs.libGL
pkgs.libxkbcommon
pkgs.xorg.libXcursor
pkgs.xorg.libXi
pkgs.xorg.libXrandr
pkgs.xorg.libX11
pkgs.vulkan-loader
];
nativeBuildInputs = [
pkgs.cargo
pkgs.pkg-config
];
in pkgs.mkShell {
inherit buildInputs nativeBuildInputs;
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}";
};
});
}