{ description = "Extract Flash .swf files from Windows .exe files"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; naersk = { url = "github:nmattia/naersk"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, flake-utils, fenix, naersk }: flake-utils.lib.eachDefaultSystem ( system: let pkgs = import nixpkgs { inherit system; }; rust-toolchain = fenix.packages."${system}".stable.defaultToolchain; rust-analyzer = fenix.packages."${system}".stable.rust-analyzer; rust-src = fenix.packages."${system}".stable.rust-src; naersk-lib = naersk.lib.${system}.override { cargo = rust-toolchain; rustc = rust-toolchain; }; in rec { packages.exe2swf = naersk-lib.buildPackage { pname = "exe2swf"; root = ./.; }; packages.default = packages.exe2swf; apps.exe2swf = flake-utils.lib.mkApp { drv = packages.exe2swf; }; apps.default = apps.exe2swf; devShells.default = pkgs.mkShell { name = "exe2swf-env"; buildInputs = [ rust-analyzer rust-toolchain ]; shellHook = '' export RUST_SRC_PATH="${rust-src}/lib/rustlib/src/rust/library" ''; }; } ); }