{ description = "RSS Reader Web Application"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; nativeBuildInputs = with pkgs; [ pkg-config rust-bin.stable.latest.default ]; buildInputs = with pkgs; [ openssl sqlite ]; in { devShells.default = pkgs.mkShell { inherit nativeBuildInputs buildInputs; shellHook = '' export DATABASE_URL="sqlite:rss-reader.db" ''; }; packages.default = pkgs.rustPlatform.buildRustPackage { pname = "rss-reader"; version = "0.1.0"; src = ./.; cargoLock = { lockFile = ./Cargo.lock; }; inherit nativeBuildInputs buildInputs; # Copy static files to the output postInstall = '' mkdir -p $out cp -r static $out cp -r templates $out ''; meta = with pkgs.lib; { description = "A web-based RSS reader application"; # TODO add real homepage homepage = "https://example.com/yourusername/rss-reader"; # TODO figure out license #license = licenses.mit; maintainers = []; }; }; } ); }