Homebrew RSS reader server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nix: add flake for declarative nixos builds

* enables building slurp as a proper nix package
* includes dev shell with rust toolchain and dependencies
* uses rustPlatform.buildRustPackage with cargo lock
* adds flake-utils for cross-platform support

This allows referencing slurp as a flake input in nixos config
without requiring --impure flag or absolute paths.

+100
+1
.gitignore
··· 4 4 *.db-shm 5 5 slurp.toml 6 6 SUMMARY.md 7 + result
+61
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1731533236, 9 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 + "nixpkgs": { 22 + "locked": { 23 + "lastModified": 1769527094, 24 + "narHash": "sha256-xV20Alb7ZGN7qujnsi5lG1NckSUmpIb05H2Xar73TDc=", 25 + "owner": "nixos", 26 + "repo": "nixpkgs", 27 + "rev": "afce96367b2e37fc29afb5543573cd49db3357b7", 28 + "type": "github" 29 + }, 30 + "original": { 31 + "owner": "nixos", 32 + "ref": "nixpkgs-unstable", 33 + "repo": "nixpkgs", 34 + "type": "github" 35 + } 36 + }, 37 + "root": { 38 + "inputs": { 39 + "flake-utils": "flake-utils", 40 + "nixpkgs": "nixpkgs" 41 + } 42 + }, 43 + "systems": { 44 + "locked": { 45 + "lastModified": 1681028828, 46 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 47 + "owner": "nix-systems", 48 + "repo": "default", 49 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 50 + "type": "github" 51 + }, 52 + "original": { 53 + "owner": "nix-systems", 54 + "repo": "default", 55 + "type": "github" 56 + } 57 + } 58 + }, 59 + "root": "root", 60 + "version": 7 61 + }
+38
flake.nix
··· 1 + { 2 + description = "Slurp - Headless RSS aggregator"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 6 + flake-utils.url = "github:numtide/flake-utils"; 7 + }; 8 + 9 + outputs = { self, nixpkgs, flake-utils }: 10 + flake-utils.lib.eachDefaultSystem (system: 11 + let pkgs = nixpkgs.legacyPackages.${system}; 12 + in { 13 + packages.default = pkgs.rustPlatform.buildRustPackage { 14 + pname = "slurp"; 15 + version = "0.1.0"; 16 + src = ./.; 17 + 18 + cargoLock.lockFile = ./Cargo.lock; 19 + 20 + nativeBuildInputs = with pkgs; [ pkg-config ]; 21 + buildInputs = with pkgs; [ openssl sqlite ]; 22 + 23 + meta = with pkgs.lib; { 24 + description = "Headless RSS aggregator with Fever API"; 25 + mainProgram = "slurp"; 26 + }; 27 + }; 28 + 29 + devShells.default = pkgs.mkShell { 30 + buildInputs = with pkgs; [ 31 + rustc cargo rust-analyzer rustfmt clippy 32 + pkg-config openssl sqlite 33 + ]; 34 + DATABASE_URL = "sqlite:slurp.db"; 35 + }; 36 + } 37 + ); 38 + }