tangled
alpha
login
or
join now
blooym.dev
/
jacquard
forked from
nonbinary.computer/jacquard
0
fork
atom
A better Rust ATProto crate
0
fork
atom
overview
issues
pulls
pipelines
update ci and formatting
Orual
5 months ago
5aad02ae
9d9a92c7
+75
-72
5 changed files
expand all
collapse all
unified
split
.tangled
workflows
build.yml
crates
jacquard-common
src
types
nsid.rs
flake.nix
nix
modules
devshell.nix
rust.nix
+1
-1
.tangled/workflows/build.yml
···
6
6
7
7
dependencies:
8
8
nixpkgs:
9
9
-
- just
9
9
+
#- just
10
10
11
11
steps:
12
12
- name: build appview
+1
crates/jacquard-common/src/types/nsid.rs
···
1
1
+
+3
-3
flake.nix
···
14
14
};
15
15
16
16
outputs = inputs:
17
17
-
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
17
17
+
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
18
18
systems = import inputs.systems;
19
19
20
20
# See ./nix/modules/*.nix for the modules that are imported here.
21
21
imports = with builtins;
22
22
map
23
23
-
(fn: ./nix/modules/${fn})
24
24
-
(attrNames (readDir ./nix/modules));
23
23
+
(fn: ./nix/modules/${fn})
24
24
+
(attrNames (readDir ./nix/modules));
25
25
};
26
26
}
+21
-21
nix/modules/devshell.nix
···
1
1
-
{inputs, ...}: {
2
2
-
perSystem = {
3
3
-
config,
4
4
-
self',
5
5
-
pkgs,
6
6
-
lib,
7
7
-
...
8
8
-
}: {
9
9
-
devShells.default = pkgs.mkShell {
10
10
-
name = "jacquard-shell";
11
11
-
inputsFrom = [
12
12
-
self'.devShells.rust
13
13
-
config.pre-commit.devShell # See ./nix/modules/pre-commit.nix
14
14
-
];
15
15
-
packages = with pkgs; [
16
16
-
just
17
17
-
nixd # Nix language server
18
18
-
bacon
19
19
-
rust-analyzer
20
20
-
];
1
1
+
{ inputs, ... }: {
2
2
+
perSystem =
3
3
+
{ config
4
4
+
, self'
5
5
+
, pkgs
6
6
+
, lib
7
7
+
, ...
8
8
+
}: {
9
9
+
devShells.default = pkgs.mkShell {
10
10
+
name = "jacquard-shell";
11
11
+
inputsFrom = [
12
12
+
self'.devShells.rust
13
13
+
config.pre-commit.devShell # See ./nix/modules/pre-commit.nix
14
14
+
];
15
15
+
packages = with pkgs; [
16
16
+
just
17
17
+
nixd # Nix language server
18
18
+
bacon
19
19
+
rust-analyzer
20
20
+
];
21
21
+
};
21
22
};
22
22
-
};
23
23
}
+49
-47
nix/modules/rust.nix
···
1
1
-
{inputs, ...}: {
1
1
+
{ inputs, ... }: {
2
2
imports = [
3
3
inputs.rust-flake.flakeModules.default
4
4
inputs.rust-flake.flakeModules.nixpkgs
5
5
# inputs.process-compose-flake.flakeModule
6
6
# inputs.cargo-doc-live.flakeModule
7
7
];
8
8
-
perSystem = {
9
9
-
config,
10
10
-
self',
11
11
-
pkgs,
12
12
-
lib,
13
13
-
...
14
14
-
}: let
15
15
-
inherit (pkgs.stdenv) isDarwin;
16
16
-
inherit (pkgs.darwin) apple_sdk;
17
17
-
18
18
-
# Common configuration for all crates
19
19
-
globalCrateConfig = {
20
20
-
crane.clippy.enable = false;
21
21
-
};
8
8
+
perSystem =
9
9
+
{ config
10
10
+
, self'
11
11
+
, pkgs
12
12
+
, lib
13
13
+
, ...
14
14
+
}:
15
15
+
let
16
16
+
inherit (pkgs.stdenv) isDarwin;
17
17
+
inherit (pkgs.darwin) apple_sdk;
22
18
23
23
-
# Common build inputs for all crates
24
24
-
commonBuildInputs = lib.optionals isDarwin (
25
25
-
with apple_sdk.frameworks; [
26
26
-
IOKit
27
27
-
Security
28
28
-
SystemConfiguration
29
29
-
]
30
30
-
);
31
31
-
in {
32
32
-
rust-project = {
33
33
-
# Source filtering to avoid unnecessary rebuilds
34
34
-
src = lib.cleanSourceWith {
35
35
-
src = inputs.self;
36
36
-
filter = config.rust-project.crane-lib.filterCargoSources;
19
19
+
# Common configuration for all crates
20
20
+
globalCrateConfig = {
21
21
+
crane.clippy.enable = false;
37
22
};
38
38
-
crates = {
39
39
-
"jacquard" = {
40
40
-
imports = [globalCrateConfig];
41
41
-
autoWire = ["crate" "clippy"];
42
42
-
path = ./../../crates/jacquard;
43
43
-
crane = {
44
44
-
args = {
45
45
-
buildInputs = commonBuildInputs;
23
23
+
24
24
+
# Common build inputs for all crates
25
25
+
commonBuildInputs = lib.optionals isDarwin (
26
26
+
with apple_sdk.frameworks; [
27
27
+
IOKit
28
28
+
Security
29
29
+
SystemConfiguration
30
30
+
]
31
31
+
);
32
32
+
in
33
33
+
{
34
34
+
rust-project = {
35
35
+
# Source filtering to avoid unnecessary rebuilds
36
36
+
src = lib.cleanSourceWith {
37
37
+
src = inputs.self;
38
38
+
filter = config.rust-project.crane-lib.filterCargoSources;
39
39
+
};
40
40
+
crates = {
41
41
+
"jacquard" = {
42
42
+
imports = [ globalCrateConfig ];
43
43
+
autoWire = [ "crate" "clippy" ];
44
44
+
path = ./../../crates/jacquard;
45
45
+
crane = {
46
46
+
args = {
47
47
+
buildInputs = commonBuildInputs;
48
48
+
};
46
49
};
47
50
};
48
48
-
};
49
51
50
50
-
"jacquard-common" = {
51
51
-
imports = [globalCrateConfig];
52
52
-
autoWire = ["crate" "clippy"];
53
53
-
path = ./../../crates/jacquard-common;
54
54
-
crane = {
55
55
-
args = {
56
56
-
buildInputs = commonBuildInputs;
52
52
+
"jacquard-common" = {
53
53
+
imports = [ globalCrateConfig ];
54
54
+
autoWire = [ "crate" "clippy" ];
55
55
+
path = ./../../crates/jacquard-common;
56
56
+
crane = {
57
57
+
args = {
58
58
+
buildInputs = commonBuildInputs;
59
59
+
};
57
60
};
58
61
};
59
62
};
60
63
};
64
64
+
packages.default = self'.packages.jacquard;
61
65
};
62
62
-
packages.default = self'.packages.jacquard;
63
63
-
};
64
66
}