an http based roguelike rpg about jelqing
Blame: flake.nix
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 1 | { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 2 | description = "jelqd, a roguelike played entirely over HTTP"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 3 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 4 | inputs = { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 6 | crane.url = "github:ipetkov/crane"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 7 | flake-utils.url = "github:numtide/flake-utils"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 8 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 9 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 10 | outputs = |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 11 | { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 12 | self, |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 13 | nixpkgs, |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 14 | crane, |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 15 | flake-utils, |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 16 | }: |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 17 | flake-utils.lib.eachDefaultSystem ( |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 18 | system: |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 19 | let |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 20 | pkgs = nixpkgs.legacyPackages.${system}; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 21 | craneLib = crane.mkLib pkgs; |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 22 | src = pkgs.lib.cleanSourceWith { |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 23 | src = ./.; |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 24 | filter = path: type: pkgs.lib.hasSuffix ".html" path || craneLib.filterCargoSources path type; |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 25 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 26 | commonArgs = { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 27 | inherit src; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 28 | strictDeps = true; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 29 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 30 | cargoArtifacts = craneLib.buildDepsOnly commonArgs; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 31 | jelqd = craneLib.buildPackage ( |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 32 | commonArgs |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 33 | // { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 34 | inherit cargoArtifacts; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 35 | meta.mainProgram = "jelqd"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 36 | } |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 37 | ); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 38 | in |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 39 | { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 40 | packages.default = jelqd; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 41 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 42 | apps.default = flake-utils.lib.mkApp { drv = jelqd; } // { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 43 | meta.description = "Run the jelqd server"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 44 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 45 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 46 | checks = { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 47 | inherit jelqd; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 48 | clippy = craneLib.cargoClippy ( |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 49 | commonArgs |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 50 | // { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 51 | inherit cargoArtifacts; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 52 | cargoClippyExtraArgs = "--all-targets -- --deny warnings"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 53 | } |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 54 | ); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 55 | fmt = craneLib.cargoFmt { inherit src; }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 56 | test = craneLib.cargoTest (commonArgs // { inherit cargoArtifacts; }); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 57 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 58 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 59 | devShells.default = craneLib.devShell { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 60 | checks = self.checks.${system}; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 61 | packages = [ |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 62 | pkgs.rust-analyzer |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 63 | pkgs.nushell |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 64 | pkgs.curl |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 65 | ]; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 66 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 67 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 68 | formatter = pkgs.nixfmt; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 69 | } |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 70 | ); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 71 | } |