♻️ Simple & Efficient Gemini-to-HTTP Proxy fuwn.net
proxy gemini-protocol protocol gemini http rust

chore(flake): add packages and apps attributes

fuwn.net ac397302 8fe1e338

verified
+94 -15
+3
.gitignore
··· 15 15 16 16 # Visual Studio Code 17 17 .vscode 18 + 19 + # Nix 20 + result*
+21 -2
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "crane": { 4 + "locked": { 5 + "lastModified": 1727316705, 6 + "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", 7 + "owner": "ipetkov", 8 + "repo": "crane", 9 + "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "ipetkov", 14 + "repo": "crane", 15 + "type": "github" 16 + } 17 + }, 3 18 "flake-utils": { 4 19 "inputs": { 5 - "systems": "systems" 20 + "systems": [ 21 + "systems" 22 + ] 6 23 }, 7 24 "locked": { 8 25 "lastModified": 1710146030, ··· 36 53 }, 37 54 "root": { 38 55 "inputs": { 56 + "crane": "crane", 39 57 "flake-utils": "flake-utils", 40 58 "nixpkgs": "nixpkgs", 41 - "rust-overlay": "rust-overlay" 59 + "rust-overlay": "rust-overlay", 60 + "systems": "systems" 42 61 } 43 62 }, 44 63 "rust-overlay": {
+70 -13
flake.nix
··· 1 1 { 2 + description = "Simple & Efficient Gemini-to-HTTP Proxy"; 3 + 2 4 inputs = { 5 + crane.url = "github:ipetkov/crane"; 3 6 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 4 - flake-utils.url = "github:numtide/flake-utils"; 7 + systems.url = "github:nix-systems/default"; 8 + 9 + flake-utils = { 10 + url = "github:numtide/flake-utils"; 11 + inputs.systems.follows = "systems"; 12 + }; 5 13 6 14 rust-overlay = { 7 15 url = "github:oxalica/rust-overlay"; ··· 11 19 12 20 outputs = 13 21 { 14 - nixpkgs, 22 + crane, 15 23 flake-utils, 24 + nixpkgs, 16 25 rust-overlay, 26 + self, 17 27 ... 18 28 }: 19 29 flake-utils.lib.eachDefaultSystem ( 20 30 system: 21 31 let 22 - overlays = [ (import rust-overlay) ]; 23 - pkgs = import nixpkgs { inherit system overlays; }; 32 + pkgs = import nixpkgs { 33 + inherit system; 34 + 35 + overlays = [ (import rust-overlay) ]; 36 + }; 37 + 38 + craneLib = crane.mkLib pkgs; 39 + 40 + meta = with pkgs.lib; { 41 + homepage = "https://github.com/gemrest/september"; 42 + description = "Simple & Efficient Gemini-to-HTTP Proxy"; 43 + license = licenses.gpl3Only; 44 + maintainers = [ maintainers.Fuwn ]; 45 + mainPackage = "september"; 46 + platforms = platforms.linux; 47 + }; 48 + 49 + september = craneLib.buildPackage { 50 + inherit meta; 51 + 52 + strictDeps = true; 53 + 54 + src = pkgs.lib.cleanSourceWith { 55 + src = ./.; 56 + 57 + filter = 58 + path: type: 59 + builtins.match ".*css$" path != null 60 + || builtins.match ".*\\.git.*" path != null 61 + || (craneLib.filterCargoSources path type); 62 + }; 63 + }; 24 64 in 25 65 { 26 - devShells.${system} = 66 + packages = { 67 + inherit september; 68 + 69 + default = self.packages.${system}.september; 70 + }; 71 + 72 + apps = { 73 + september = { 74 + inherit meta; 75 + 76 + type = "app"; 77 + program = "${self.packages.${system}.september}/bin/september"; 78 + }; 79 + 80 + default = self.apps.${system}.september; 81 + }; 82 + 83 + devShells.default = 27 84 with pkgs; 28 85 mkShell.override 29 86 { 30 87 stdenv = stdenvAdapters.useMoldLinker clangStdenv; 31 88 } 32 89 { 90 + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 91 + 33 92 buildInputs = [ 34 - # https://github.com/oxalica/rust-overlay/issues/136#issuecomment-1716902831 93 + cargo-make 94 + openssl 95 + pkg-config 96 + cargo-watch 97 + 35 98 (lib.hiPrio ( 36 99 rust-bin.stable.latest.minimal.override { 37 100 extensions = [ "rust-docs" ]; 38 101 } 39 102 )) 103 + 40 104 (rust-bin.selectLatestNightlyWith ( 41 105 toolchain: 42 106 toolchain.minimal.override { 43 107 extensions = [ "rustfmt" ]; 44 108 } 45 109 )) 46 - cargo-make 47 - openssl 48 - pkg-config 49 - cargo-watch 50 110 ]; 51 - 52 - # https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/5?u=fuwn 53 - RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 54 111 }; 55 112 } 56 113 );