-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpackage.nix
53 lines (47 loc) · 1.42 KB
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib, fetchFromGitHub, dotnetCorePackages, buildDotnetModule, yq }:
buildDotnetModule rec {
pname = "jellyfin-plugin-sso";
version = "3.5.2.3";
src = fetchFromGitHub {
owner = "9p4";
repo = pname;
rev = "v${version}";
hash = "sha256-PkehIQlWTWeD/0t5UmxwmqBXPcPk5vMZ031zSdA35fo=";
};
projectFile = "SSO-Auth/SSO-Auth.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetBuildFlags = [ "--no-self-contained" ];
nativeBuildInputs = [ yq ];
yqScript = ''
{
guid: .guid,
name: .name,
description: .description,
overview: .overview,
owner: .owner,
category: .category,
targetAbi: .targetAbi,
changelog: .changelog,
timestamp: "2000-01-01T00:00:00Z",
version: "${version}",
imageUrl: .imageUrl
}
'';
fixupPhase = ''
artifacts=("IdentityModel.OidcClient.dll" "IdentityModel.dll" "SSO-Auth.dll" "SSO-Auth.pdb")
for artifact in "''${artifacts[@]}"; do
mv $out/lib/jellyfin-plugin-sso/$artifact $out
done
rm -rf $out/lib
yq "$yqScript" build.yaml > $out/meta.json
'';
meta = with lib; {
description = "SSO plugin for Jellyfin";
homepage = "https://github.com/9p4/jellyfin-plugin-sso";
license = licenses.gpl3Only;
maintainers = with lib.maintainers; [ lf- ];
platforms = dotnet-runtime.meta.platforms;
};
}