blob: 30afe7807b7ef0ef15275aedd3fa83c55547976d (
plain) (
blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
{
lib,
openssl,
writeText,
git,
buildDotnetModule,
dotnetCorePackages,
fetchFromGitHub,
testers,
}:
let
nuget-config = writeText "nuget.config" ''
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
'';
in
buildDotnetModule (finalAttrs: {
pname = "recyclarr";
version = "7.2.4";
src = fetchFromGitHub {
owner = "recyclarr";
repo = "recyclarr";
rev = "v${finalAttrs.version}";
hash = "sha256-FFaGyMOXivorXVqCcYskEibnHnzhJ/AlxR46AtWFkI4=";
};
projectFile = "Recyclarr.sln";
nugetDeps = ./deps.nix;
prePatch = ''
substituteInPlace src/Recyclarr.Cli/Program.cs \
--replace-fail '$"v{GitVersionInformation.SemVer} ({GitVersionInformation.FullBuildMetaData})"' '"${finalAttrs.version}-nixpkgs"'
substituteInPlace src/Recyclarr.Cli/Console/Setup/ProgramInformationDisplayTask.cs \
--replace-fail 'GitVersionInformation.InformationalVersion' '"${finalAttrs.version}-nixpkgs"'
'';
patches = [ ./001-Git-Version.patch ];
enableParallelBuilding = false;
dotnetRestoreFlags = [ "--configfile=${nuget-config}" ];
doCheck = false;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
dotnet-test-sdk = dotnetCorePackages.sdk_8_0;
executables = [ "recyclarr" ];
makeWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
git
openssl
]
}"
];
passthru = {
updateScript = ./update.sh;
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
};
meta = {
description = "Automatically sync TRaSH guides to your Sonarr and Radarr instances";
homepage = "https://recyclarr.dev/";
changelog = "https://github.com/recyclarr/recyclarr/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
josephst
aldoborrero
];
mainProgram = "recyclarr";
sourceProvenance = with lib.sourceTypes; [ fromSource ];
};
})
|