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 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 4 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 5 | |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 6 | outputs = |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 7 | { self, nixpkgs }: |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 8 | let |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 9 | inherit (nixpkgs) lib; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 10 | systems = [ |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 11 | "x86_64-linux" |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 12 | "aarch64-linux" |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 13 | "x86_64-darwin" |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 14 | "aarch64-darwin" |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 15 | ]; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 16 | pkgsFor = lib.genAttrs systems (system: nixpkgs.legacyPackages.${system}); |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 17 | forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system}); |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 18 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 19 | src = lib.fileset.toSource { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 20 | root = ./.; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 21 | fileset = lib.fileset.unions [ |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 22 | ./Cargo.toml |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 23 | ./Cargo.lock |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 24 | ./src |
782069860236 | atagen | 2026-10-10 12:44 UTC | 25 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 26 | ]; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 27 | }; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 28 | in |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 29 | { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 30 | packages = forAllSystems (pkgs: { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 31 | default = pkgs.rustPlatform.buildRustPackage { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 32 | pname = "jelqd"; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 33 | version = "0.6.9"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 34 | inherit src; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 35 | cargoLock.lockFile = ./Cargo.lock; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 36 | meta.mainProgram = "jelqd"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 37 | }; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 38 | }); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 39 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 40 | apps = forAllSystems (pkgs: { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 41 | default = { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 42 | type = "app"; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 43 | program = lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.default; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 44 | meta.description = "Run the jelqd server"; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 45 | }; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 46 | }); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 47 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 48 | checks = forAllSystems ( |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 49 | pkgs: |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 50 | let |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 51 | jelqd = self.packages.${pkgs.stdenv.hostPlatform.system}.default; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 52 | in |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 53 | { |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 54 | inherit jelqd; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 55 | clippy = jelqd.overrideAttrs (old: { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 56 | pname = "jelqd-clippy"; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 57 | nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.clippy ]; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 58 | buildPhase = "cargo clippy --offline --all-targets -- --deny warnings"; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 59 | doCheck = false; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 60 | installPhase = "touch $out"; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 61 | }); |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 62 | fmt = |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 63 | pkgs.runCommand "jelqd-fmt" |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 64 | { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 65 | nativeBuildInputs = [ |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 66 | pkgs.cargo |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 67 | pkgs.rustfmt |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 68 | ]; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 69 | } |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 70 | '' |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 71 | cd ${src} |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 72 | cargo fmt --check |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 73 | touch $out |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 74 | ''; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 75 | } |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 76 | ); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 77 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 78 | devShells = forAllSystems (pkgs: { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 79 | default = pkgs.mkShell { |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 80 | inputsFrom = [ self.packages.${pkgs.stdenv.hostPlatform.system}.default ]; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 81 | packages = [ |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 82 | pkgs.clippy |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 83 | pkgs.rustfmt |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 84 | pkgs.rust-analyzer |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 85 | pkgs.nushell |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 86 | pkgs.curl |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 87 | ]; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 88 | }; |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 89 | }); |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 90 | |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 91 | formatter = forAllSystems (pkgs: pkgs.nixfmt); |
d2e314cf03d5 | atagen | 2026-10-10 12:21 UTC | 92 | }; |
a9b016e4b248 | atagen | 2026-10-10 08:12 UTC | 93 | } |