Skip to content

Commit 13299fc

Browse files
Merge master into async-refactor
2 parents b03061a + 713b50c commit 13299fc

434 files changed

Lines changed: 59407 additions & 19155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.branding‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://github.com/Keavon/graphite-branded-assets/archive/6687dc6d3d8552948458d00d35e2bee3a40ab66b.tar.gz
2-
7663b4a35f377a5d3363430a725a1d5f634fbdc56adca5e43167786b8fe1b253
1+
https://github.com/Keavon/graphite-branded-assets/archive/ca7dd793caba8999ec33fde99bb721a69c3d221f.tar.gz
2+
77e8a6b68d67a8d5fcfd6268a6b7938ac9322d877378c6563e933a57df6da821

‎.github/workflows/website.yml‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ on:
77
- master
88
paths:
99
- website/**
10+
- frontend/eslint.config.js
11+
- frontend/eslint-require-data-selectors.js
12+
- frontend/package-lock.json
1013
pull_request:
1114
paths:
1215
- website/**
16+
- frontend/eslint.config.js
17+
- frontend/eslint-require-data-selectors.js
18+
- frontend/package-lock.json
1319
env:
1420
CARGO_TERM_COLOR: always
1521
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.art" data-api="/visit/event" src="/visit/script.hash.js"></script>
@@ -30,6 +36,10 @@ jobs:
3036
uses: actions/setup-node@v6
3137
with:
3238
node-version-file: .nvmrc
39+
cache: npm
40+
cache-dependency-path: |
41+
frontend/package-lock.json
42+
website/package-lock.json
3343
3444
- name: 🕸 Install Zola
3545
uses: taiki-e/install-action@v2
@@ -55,9 +65,12 @@ jobs:
5565
cargo run -p crate-hierarchy-viz -- website/generated
5666
cargo run -p editor-message-tree -- website/generated
5767
58-
- name: 🔧 Install website npm dependencies
68+
- name: 🔧 Install website and frontend npm dependencies
5969
run: |
60-
cd website
70+
# The website is linted by the frontend's ESLint config and the tools it installs
71+
cd frontend
72+
npm ci
73+
cd ../website
6174
npm ci
6275
6376
- name: 📃 Generate node catalog documentation

‎.nix/default.nix‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ in
6161
graphite-bundle = (lib.call ./pkgs/graphite-bundle.nix) { };
6262
graphite-bundle-dev = (lib.call ./pkgs/graphite-bundle.nix) { graphite = graphite-dev; };
6363
graphite-flatpak-manifest = (lib.call ./pkgs/graphite-flatpak-manifest.nix) { };
64-
graphite-flatpak-manifest-dev = (lib.call ./pkgs/graphite-flatpak-manifest.nix) { graphite-bundle = graphite-bundle-dev; };
64+
graphite-flatpak-manifest-dev = (lib.call ./pkgs/graphite-flatpak-manifest.nix) {
65+
graphite-bundle = graphite-bundle-dev;
66+
};
6567
graphite-cef = lib.call ./pkgs/graphite-cef.nix;
6668

6769
# TODO: graphene-cli = lib.call ./pkgs/graphene-cli.nix;
@@ -70,8 +72,26 @@ in
7072

7173
devShells = withArgs (
7274
{ lib, ... }:
75+
let
76+
shell = lib.makeOverridable (lib.call ./dev.nix);
77+
in
7378
{
74-
default = lib.call ./dev.nix;
79+
default = shell {
80+
desktop = true;
81+
};
82+
full = shell {
83+
desktop = true;
84+
x11 = true;
85+
playwright = true;
86+
};
87+
minimal = shell { };
88+
x11 = shell {
89+
desktop = true;
90+
x11 = true;
91+
};
92+
playwright = shell {
93+
playwright = true;
94+
};
7595
}
7696
);
7797

‎.nix/deps/rust-gpu.nix‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ let
3131
}).buildRustPackage
3232
(finalAttrs: {
3333
pname = "rustc_codegen_spirv";
34-
version = "0.10.0-alpha.1";
35-
src = pkgs.fetchgit {
36-
url = "https://github.com/Rust-GPU/rust-gpu";
37-
rev = "389dfe784b5992b3443b8969fdae2f82c932c552";
38-
sha256 = "sha256-S3pOL7Mz4Z4vNS03qMks1XcztVfRLKcntPhih+S/7Yg=";
34+
version = "0.10.0";
35+
src = pkgs.fetchCrate {
36+
inherit (finalAttrs) pname version;
37+
sha256 = "sha256-QluNI2TdJI0j2CBOeAbB9DfOv+8LqzWk7siZyT1WWLU=";
3938
};
40-
cargoHash = "sha256-9dGb+RDYpJKaIhkMPkZAx1M1VGE3gMfCD2T84i1VtV8=";
39+
cargoHash = "sha256-vvviUccnip+j60Ml1vqLNJ49KyEF40VLUoV1TMALHMs=";
4140
cargoBuildFlags = [
4241
"-p"
4342
"rustc_codegen_spirv"

‎.nix/dev.nix‎

Lines changed: 75 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,90 @@
33
deps,
44
self,
55
system,
6+
lib,
67
...
78
}:
89

9-
let
10-
libs = [
11-
pkgs.wayland
12-
pkgs.vulkan-loader
13-
pkgs.libGL
14-
pkgs.openssl
15-
pkgs.libraw
16-
17-
# X11 Support
18-
pkgs.libxkbcommon
19-
pkgs.libXcursor
20-
pkgs.libxcb
21-
pkgs.libX11
22-
];
23-
in
24-
pkgs.mkShell (
25-
{
26-
packages = libs ++ [
27-
pkgs.pkg-config
10+
{
11+
desktop ? false,
12+
x11 ? false,
13+
playwright ? false,
14+
}:
2815

29-
pkgs.lld
30-
pkgs.nodejs
31-
pkgs.binaryen
32-
pkgs.wasm-bindgen-cli_0_2_121
33-
pkgs.cargo-about
16+
let
17+
features = [
18+
{
19+
packages = [
20+
pkgs.pkg-config
3421

35-
pkgs.rustc
36-
pkgs.cargo
37-
pkgs.rust-analyzer
38-
pkgs.clippy
39-
pkgs.rustfmt
22+
pkgs.lld
23+
pkgs.nodejs
24+
pkgs.binaryen
25+
pkgs.wasm-bindgen-cli_0_2_121
26+
pkgs.cargo-about
4027

41-
pkgs.git
28+
pkgs.rustc
29+
pkgs.cargo
30+
pkgs.rust-analyzer
31+
pkgs.clippy
32+
pkgs.rustfmt
4233

43-
pkgs.cargo-nextest
44-
pkgs.cargo-expand
34+
pkgs.git
4535

46-
# Linker
47-
pkgs.mold
36+
pkgs.cargo-nextest
37+
pkgs.cargo-expand
4838

49-
# Profiling tools
50-
pkgs.gnuplot
51-
pkgs.samply
52-
pkgs.cargo-flamegraph
39+
# Linker
40+
pkgs.mold
5341

54-
# Plotting tools
55-
pkgs.graphviz
56-
];
42+
# Profiling tools
43+
pkgs.gnuplot
44+
pkgs.samply
45+
pkgs.cargo-flamegraph
5746

58-
CEF_PATH = self.packages.${system}.graphite-cef;
59-
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath libs}:${self.packages.${system}.graphite-cef}";
60-
XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
47+
# Plotting tools
48+
pkgs.graphviz
49+
];
50+
}
51+
deps.rustGPU
52+
(lib.optionalAttrs desktop (
53+
{
54+
libs = [
55+
pkgs.wayland
56+
pkgs.vulkan-loader
57+
pkgs.libGL
58+
pkgs.libxkbcommon
59+
self.packages.${system}.graphite-cef
60+
];
61+
env = {
62+
CEF_PATH = "${self.packages.${system}.graphite-cef}/lib";
63+
XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
64+
};
65+
}
66+
))
67+
(lib.optionalAttrs x11 {
68+
libs = [
69+
pkgs.libXcursor
70+
pkgs.libxcb
71+
pkgs.libX11
72+
];
73+
})
74+
(lib.optionalAttrs playwright (
75+
assert pkgs.playwright-driver.version == (lib.importJSON ../tools/web-editor-driver/playwright/package-lock.json).packages."node_modules/playwright-core".version;
76+
{
77+
env = {
78+
PLAYWRIGHT_BROWSERS_PATH = pkgs.playwright-driver.browsers-chromium;
79+
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true";
80+
};
81+
}
82+
))
83+
];
6184

62-
}
63-
// deps.rustGPU.env
64-
)
85+
libs = lib.concatMap (feature: feature.libs or [ ]) features;
86+
in
87+
pkgs.mkShell {
88+
packages = libs ++ lib.concatMap (feature: feature.packages or [ ]) features;
89+
env = lib.mergeAttrsList (map (feature: feature.env or { }) features) // {
90+
LD_LIBRARY_PATH = lib.makeLibraryPath libs;
91+
};
92+
}

‎.nix/pkgs/graphite-cef.nix‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,20 @@ pkgs.cef-binary.overrideAttrs {
3030
postInstall = ''
3131
rm -r $out/* $out/.* || true
3232
strip ./Release/*.so*
33-
mv ./Release/* $out/
33+
mkdir $out/lib
34+
mv ./Release/* $out/lib/
3435
find "./Resources/locales" -maxdepth 1 -type f ! -name 'en-US.pak' -delete
35-
mv ./Resources/* $out/
36-
mv ./include $out/
36+
mv ./Resources/* $out/lib/
37+
mv ./include $out/lib/
3738
38-
cat ./CREDITS.html | ${pkgs.xz}/bin/xz -9 -e -c > $out/CREDITS.html.xz
39+
cat ./CREDITS.html | ${pkgs.xz}/bin/xz -9 -e -c > $out/lib/CREDITS.html.xz
3940
4041
echo '${
4142
builtins.toJSON {
4243
type = "minimal";
4344
name = builtins.baseNameOf url;
4445
sha1 = "";
4546
}
46-
}' > $out/archive.json
47+
}' > $out/lib/archive.json
4748
'';
4849
}

‎.nix/pkgs/graphite.nix‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ let
2020
pkgs.libGL
2121
pkgs.openssl
2222
pkgs.libraw
23+
self.packages.${system}.graphite-cef
2324
# X11 Support
2425
pkgs.libxkbcommon
2526
pkgs.libXcursor
@@ -50,7 +51,7 @@ let
5051
pkgs.pkg-config
5152
pkgs.lld
5253
];
53-
env.CEF_PATH = self.packages.${system}.graphite-cef;
54+
env.CEF_PATH = "${self.packages.${system}.graphite-cef}/lib";
5455
buildPhase =
5556
let
5657
profile = if dev then "dev" else "release";
@@ -99,7 +100,7 @@ deps.crane.lib.buildPackage (
99100
RASTER_NODES_SHADER_PATH = self.packages.${system}.graphite-raster-nodes-shaders;
100101
GRAPHITE_GIT_COMMIT_HASH = self.rev or "unknown";
101102
GRAPHITE_GIT_COMMIT_DATE = self.lastModified or "unknown";
102-
CEF_PATH = self.packages.${system}.graphite-cef;
103+
CEF_PATH = "${self.packages.${system}.graphite-cef}/lib";
103104
};
104105

105106
postPatch = ''
@@ -148,7 +149,7 @@ deps.crane.lib.buildPackage (
148149
remove-references-to -t "${common.cargoVendorDir}" $out/bin/graphite
149150
150151
patchelf \
151-
--set-rpath "${pkgs.lib.makeLibraryPath libs}:${self.packages.${system}.graphite-cef}" \
152+
--set-rpath "${pkgs.lib.makeLibraryPath libs}" \
152153
--add-needed libGL.so \
153154
--add-needed libEGL.so \
154155
$out/bin/graphite

0 commit comments

Comments
 (0)