{ inputs = { flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { self, flake-utils, naersk, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = (import nixpkgs) { inherit system; }; naersk' = pkgs.callPackage naersk { }; libPath = with pkgs; lib.makeLibraryPath [ glibc ]; in rec { # For `nix build` & `nix run`: packages.default = naersk'.buildPackage { src = ./.; pname = "vtub"; nativeBuildInputs = with pkgs; [ makeWrapper pkg-config openssl ]; GIT_HASH = "000000000000000000000000000000"; postInstall = '' wrapProgram "$out/bin/${packages.default.pname}" --prefix LD_LIBRARY_PATH : "${libPath}" ''; }; # For `nix develop`: devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ godot_4 ]; LD_LIBRARY_PATH = libPath; env = { VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; RUST_BACKTRACE = 1; RUST_LOG = "debug"; }; }; }); }