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