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

Configure Feed

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

at main 114 lines 2.8 kB view raw
1{ 2 description = "Simple & Efficient Gemini-to-HTTP Proxy"; 3 4 inputs = { 5 crane.url = "github:ipetkov/crane"; 6 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 7 systems.url = "github:nix-systems/default"; 8 9 flake-utils = { 10 url = "github:numtide/flake-utils"; 11 inputs.systems.follows = "systems"; 12 }; 13 14 rust-overlay = { 15 url = "github:oxalica/rust-overlay"; 16 inputs.nixpkgs.follows = "nixpkgs"; 17 }; 18 }; 19 20 outputs = 21 { 22 crane, 23 flake-utils, 24 nixpkgs, 25 rust-overlay, 26 self, 27 ... 28 }: 29 flake-utils.lib.eachDefaultSystem ( 30 system: 31 let 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 }; 64 in 65 { 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 = 84 with pkgs; 85 mkShell.override 86 { 87 stdenv = stdenvAdapters.useMoldLinker clangStdenv; 88 } 89 { 90 RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 91 92 buildInputs = [ 93 cargo-make 94 openssl 95 pkg-config 96 cargo-watch 97 98 (lib.hiPrio ( 99 rust-bin.stable.latest.minimal.override { 100 extensions = [ "rust-docs" ]; 101 } 102 )) 103 104 (rust-bin.selectLatestNightlyWith ( 105 toolchain: 106 toolchain.minimal.override { 107 extensions = [ "rustfmt" ]; 108 } 109 )) 110 ]; 111 }; 112 } 113 ); 114}