{ description = "A simple text redaction GUI tool"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, flake-utils, rust-overlay }: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; rust = pkgs.rust-bin.stable.latest.default; nativeBuildInputs = with pkgs; [ rust pkg-config ]; buildInputs = with pkgs; [ # egui/eframe dependencies libxkbcommon libGL wayland libx11 libxcursor libxrandr libxi vulkan-loader ]; in { devShells.default = pkgs.mkShell { inherit nativeBuildInputs buildInputs; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; }; packages.default = pkgs.rustPlatform.buildRustPackage { pname = "redactor"; version = "0.1.0"; src = ./.; cargoLock.lockFile = ./Cargo.lock; inherit nativeBuildInputs buildInputs; postFixup = '' patchelf --set-rpath "${pkgs.lib.makeLibraryPath buildInputs}" $out/bin/redactor ''; }; } ); }