1{
2 lib,
3 fetchFromGitHub,
4 php83,
5 nixosTests,
6 dataDir ? "/var/lib/bookstack",
7}:
8
9php83.buildComposerProject2 (finalAttrs: {
10 pname = "bookstack";
11 version = "25.07";
12
13 src = fetchFromGitHub {
14 owner = "bookstackapp";
15 repo = "bookstack";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-NlG5b/uiXplvV4opL6+SMDh4UhHAhN1wuGX7eyEnTew=";
18 };
19
20 vendorHash = "sha256-8wnNHFo+faut7qqHHy9/jvcUfLFD45uapBFGP4xAYFs=";
21
22 passthru = {
23 phpPackage = php83;
24 tests = nixosTests.bookstack;
25 };
26
27 postInstall = ''
28 chmod -R u+w $out/share
29 mv $out/share/php/bookstack/* $out
30 rm -R $out/share $out/storage $out/bootstrap/cache $out/public/uploads $out/themes
31 ln -s ${dataDir}/storage $out/storage
32 ln -s ${dataDir}/cache $out/bootstrap/cache
33 ln -s ${dataDir}/public/uploads $out/public/uploads
34 ln -s ${dataDir}/themes $out/themes
35 '';
36
37 meta = {
38 description = "Platform to create documentation/wiki content built with PHP & Laravel";
39 longDescription = ''
40 A platform for storing and organising information and documentation.
41 Details for BookStack can be found on the official website at https://www.bookstackapp.com/.
42 '';
43 homepage = "https://www.bookstackapp.com/";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [
46 ymarkus
47 savyajha
48 ];
49 platforms = lib.platforms.linux;
50 };
51})