alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
pkgs.photocraft-web: init at 0.1.1
author
lassulus
date
2 weeks ago
(Oct 6, 2026, 12:32 PM CEST)
commit
a2547b06
a2547b062e1fa9124d6415a4742f734c7bf39fe4
parent
0f6dcad9
0f6dcad97a2394c1449739e5b2b071a68ddf2147
+76
1 changed file
Expand all
Collapse all
Unified
Split
pkgs
photocraft-web
package.nix
+76
pkgs/photocraft-web/package.nix
View file
Reviewed
···
1
1
+
{
2
2
+
lib,
3
3
+
rustPlatform,
4
4
+
fetchFromGitHub,
5
5
+
fetchCrate,
6
6
+
buildWasmBindgenCli,
7
7
+
trunk,
8
8
+
binaryen,
9
9
+
llvmPackages,
10
10
+
}:
11
11
+
12
12
+
let
13
13
+
# trunk refuses to run a wasm-bindgen whose version differs from the one in
14
14
+
# Cargo.lock, and nixpkgs only ships up to 0.2.127.
15
15
+
wasm-bindgen-cli = buildWasmBindgenCli rec {
16
16
+
src = fetchCrate {
17
17
+
pname = "wasm-bindgen-cli";
18
18
+
version = "0.2.129";
19
19
+
hash = "sha256-pcecKQd7E8Opw6bkFoE569epUi7gh5qpQF1e5PJY6V8=";
20
20
+
};
21
21
+
22
22
+
cargoDeps = rustPlatform.fetchCargoVendor {
23
23
+
inherit src;
24
24
+
inherit (src) pname version;
25
25
+
hash = "sha256-vmUrWVU7kPJJxO5qIVeAkwQyWDELO1Z4Z5gitz2kco8=";
26
26
+
};
27
27
+
};
28
28
+
in
29
29
+
rustPlatform.buildRustPackage (finalAttrs: {
30
30
+
pname = "photocraft-web";
31
31
+
version = "0.1.1";
32
32
+
33
33
+
src = fetchFromGitHub {
34
34
+
owner = "storytold";
35
35
+
repo = "photocraft";
36
36
+
tag = "v${finalAttrs.version}";
37
37
+
hash = "sha256-lyhQ+kewBiZSNx/w/e6RO4dTKZmDD5hnsDSEKkKrtt0=";
38
38
+
};
39
39
+
40
40
+
cargoHash = "sha256-MLECpUx0J0RjxHXbhhR1WK8iajiNU+gJeZBsyZZwxg4=";
41
41
+
42
42
+
nativeBuildInputs = [
43
43
+
trunk
44
44
+
wasm-bindgen-cli
45
45
+
binaryen
46
46
+
llvmPackages.bintools-unwrapped
47
47
+
];
48
48
+
49
49
+
# Shown in Help › About (crates/engine/src/build_info.rs).
50
50
+
env.PHOTOCRAFT_BUILD_SHA = finalAttrs.src.tag;
51
51
+
52
52
+
buildPhase = ''
53
53
+
runHook preBuild
54
54
+
(cd apps/photocraft-web && HOME=$TMPDIR trunk build --offline --frozen --release)
55
55
+
runHook postBuild
56
56
+
'';
57
57
+
58
58
+
# The test suite targets the native workspace, not the wasm bundle.
59
59
+
doCheck = false;
60
60
+
61
61
+
installPhase = ''
62
62
+
runHook preInstall
63
63
+
cp -r dist/web $out
64
64
+
runHook postInstall
65
65
+
'';
66
66
+
67
67
+
meta = {
68
68
+
description = "PhotoCraft image editor compiled to WebAssembly, as a static site";
69
69
+
homepage = "https://getartcraft.com/apps/photocraft";
70
70
+
license = with lib.licenses; [
71
71
+
mit
72
72
+
asl20
73
73
+
];
74
74
+
platforms = lib.platforms.all;
75
75
+
};
76
76
+
})