Co-Authored-By: Skyler Grey sky@a.starrysky.fyi
packetmix/packages/default.nix
packetmix/packages/default.nix
This file has not been changed.
packetmix/packages/kavita/change-webroot.diff
packetmix/packages/kavita/change-webroot.diff
This file has not been changed.
packetmix/packages/kavita/change-webroot.diff.license
packetmix/packages/kavita/change-webroot.diff.license
This file has not been changed.
+49
-40
packetmix/packages/kavita/default.nix
+49
-40
packetmix/packages/kavita/default.nix
···
7
config.packages.kavita = {
8
systems = [ "x86_64-linux" ];
9
package =
10
-
{ kavita, fetchFromGitHub, buildNpmPackage, buildDotnetModule, dotnetCorePackages, ... }:
11
-
kavita.overrideAttrs (final: prev: {
12
-
version = "0.8.8.3";
13
-
src = fetchFromGitHub {
14
-
owner = prev.src.owner;
15
-
repo = prev.src.repo;
16
-
rev = "v${final.version}";
17
-
hash = "sha256-Va3scgMxcLhqP+s7x/iDneCPZQCF0iOIQAfTJENcvOI=";
18
-
};
19
20
-
backend = buildDotnetModule {
21
-
pname = "kavita-backend";
22
-
inherit (final) version src;
23
24
-
patches = [
25
-
# The webroot is hardcoded as ./wwwroot
26
-
./change-webroot.diff
27
-
# NOTE: Upstream frequently removes old database migrations between versions.
28
-
# Currently no migration patches are needed for upgrades from NixOS 24.11 (v0.8.3.2).
29
-
# Future updates should check if migration restoration is needed for supported upgrade paths.
30
-
];
31
-
postPatch = ''
32
-
substituteInPlace API/Services/DirectoryService.cs --subst-var out
33
34
-
substituteInPlace API/Startup.cs API/Services/LocalizationService.cs API/Controllers/FallbackController.cs \
35
-
--subst-var-by webroot "${final.frontend}/lib/node_modules/kavita-webui/dist/browser"
36
-
'';
37
38
-
executables = [ "API" ];
39
40
-
projectFile = "API/API.csproj";
41
-
nugetDeps = ./nuget-deps.json;
42
-
dotnet-sdk = dotnetCorePackages.sdk_9_0;
43
-
dotnet-runtime = dotnetCorePackages.aspnetcore_9_0;
44
-
};
45
46
-
frontend = buildNpmPackage {
47
-
pname = "kavita-frontend";
48
-
inherit (final) version src;
49
50
-
sourceRoot = "${final.src.name}/UI/Web";
51
52
-
npmBuildScript = "prod";
53
-
npmFlags = [ "--legacy-peer-deps" ];
54
-
npmRebuildFlags = [ "--ignore-scripts" ]; # Prevent playwright from trying to install browsers
55
-
npmDepsHash = "sha256-SqW9qeg0CKfVKYsDXmVsnVNmcH7YkaXtXpPjIqGL0i0=";
56
-
};
57
-
});
58
};
59
}
···
7
config.packages.kavita = {
8
systems = [ "x86_64-linux" ];
9
package =
10
+
{
11
+
kavita,
12
+
fetchFromGitHub,
13
+
buildNpmPackage,
14
+
buildDotnetModule,
15
+
dotnetCorePackages,
16
+
...
17
+
}:
18
+
kavita.overrideAttrs (
19
+
final: prev: {
20
+
version = "0.8.8.3";
21
+
src = fetchFromGitHub {
22
+
owner = prev.src.owner;
23
+
repo = prev.src.repo;
24
+
rev = "v${final.version}";
25
+
hash = "sha256-Va3scgMxcLhqP+s7x/iDneCPZQCF0iOIQAfTJENcvOI=";
26
+
};
27
28
+
backend = buildDotnetModule {
29
+
pname = "kavita-backend";
30
+
inherit (final) version src;
31
32
+
patches = [
33
+
# The webroot is hardcoded as ./wwwroot
34
+
./change-webroot.diff
35
+
# NOTE: Upstream frequently removes old database migrations between versions.
36
+
# Currently no migration patches are needed for upgrades from NixOS 24.11 (v0.8.3.2).
37
+
# Future updates should check if migration restoration is needed for supported upgrade paths.
38
+
];
39
+
postPatch = ''
40
+
substituteInPlace API/Services/DirectoryService.cs --subst-var out
41
42
+
substituteInPlace API/Startup.cs API/Services/LocalizationService.cs API/Controllers/FallbackController.cs \
43
+
--subst-var-by webroot "${final.frontend}/lib/node_modules/kavita-webui/dist/browser"
44
+
'';
45
46
+
executables = [ "API" ];
47
48
+
projectFile = "API/API.csproj";
49
+
nugetDeps = ./nuget-deps.json;
50
+
dotnet-sdk = dotnetCorePackages.sdk_9_0;
51
+
dotnet-runtime = dotnetCorePackages.aspnetcore_9_0;
52
+
};
53
54
+
frontend = buildNpmPackage {
55
+
pname = "kavita-frontend";
56
+
inherit (final) version src;
57
58
+
sourceRoot = "${final.src.name}/UI/Web";
59
60
+
npmBuildScript = "prod";
61
+
npmFlags = [ "--legacy-peer-deps" ];
62
+
npmRebuildFlags = [ "--ignore-scripts" ]; # Prevent playwright from trying to install browsers
63
+
npmDepsHash = "sha256-SqW9qeg0CKfVKYsDXmVsnVNmcH7YkaXtXpPjIqGL0i0=";
64
+
};
65
+
}
66
+
);
67
};
68
}
packetmix/packages/kavita/nuget-deps.json
packetmix/packages/kavita/nuget-deps.json
This file has not been changed.
packetmix/packages/kavita/nuget-deps.json.license
packetmix/packages/kavita/nuget-deps.json.license
This file has not been changed.
packetmix/systems/teal/copyparty.nix
packetmix/systems/teal/copyparty.nix
This file has not been changed.
packetmix/systems/teal/kavita.nix
packetmix/systems/teal/kavita.nix
This file has not been changed.
History
7 rounds
3 comments
thecoded.prof
submitted
#6
expand 0 comments
pull request successfully merged
thecoded.prof
submitted
#5
expand 3 comments
oh goodness, that codeblock formatting looks real tangled on my screen...
will remove and re push tmrw sometime. Also yea, that's one heck of a code block
thecoded.prof
submitted
#4
expand 0 comments
thecoded.prof
submitted
#3
expand 0 comments
thecoded.prof
submitted
#2
expand 0 comments
thecoded.prof
submitted
#1
expand 0 comments
thecoded.prof
submitted
#0
I think this maybe wasn't doing anything in our testing, so we should drop it (from copyparty)
otherwise looks good