{ description = "a unixy rss/atom reader"; outputs = { self, nixpkgs }: let supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }); in { overlays.default = final: prev: { syn = let packageMeta = (final.lib.importTOML ./Cargo.toml).package; in final.rustPlatform.buildRustPackage { pname = packageMeta.name; inherit (packageMeta) version; src = self; nativeBuildInputs = [ final.pkg-config ]; buildInputs = [ final.openssl ]; cargoLock.lockFile = ./Cargo.lock; }; }; packages = forAllSystems (system: { inherit (nixpkgsFor."${system}") syn; }); defaultPackage = forAllSystems (system: self.packages."${system}".syn); devShell = forAllSystems (system: let pkgs = nixpkgsFor."${ system}"; in pkgs.mkShell { nativeBuildInputs = [ pkgs.rustc pkgs.cargo pkgs.rustfmt pkgs.rust-analyzer pkgs.cargo-watch ]; RUST_BACKTRACE = 1; } ); }; }