blob: dc00f3b4a181ed8c2e23232b7809da84f9d98a2e (
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
|
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
, stdenv ? pkgs.stdenv
, lib ? pkgs.lib
, fetchFromGitHub ? pkgs.fetchFromGitHub
, buildDotnetModule ? pkgs.buildDotnetModule
, dotnetCorePackages ? pkgs.dotnetCorePackages
, openssl ? pkgs.openssl
, zlib ? pkgs.zlib
, hostPlatform ? stdenv.hostPlatform
}:
buildDotnetModule rec {
pname = "pocket-updater-utility";
version = "2.36.2";
src = fetchFromGitHub {
owner = "mattpannella";
repo = "${pname}";
rev = "${version}";
hash = "sha256-W+7qN898+GbbvPgITXaRoFNuNL/2K8isbraQFWxRXuk=";
};
buildInputs = [
stdenv.cc.cc.lib
zlib
openssl
];
# See https://github.com/NixOS/nixpkgs/pull/196648/commits/0fb17c04fe34ac45247d35a1e4e0521652d9c494
patches = [ ./add-runtime-identifier.patch ];
postPatch = ''
substituteInPlace pocket_updater.csproj \
--replace @RuntimeIdentifier@ "${dotnetCorePackages.systemToDotnetRid hostPlatform.system}"
'';
projectFile = "pocket_updater.csproj";
nugetDeps = ./deps.nix;
selfContainedBuild = true;
executables = [ "pocket_updater" ];
dotnetFlags = [
"-p:PackageRuntime=${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system}"
];
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.runtime_6_0;
passthru = {
updateScript = ./update.sh;
};
meta = with lib; {
homepage = "https://github.com/mattpannella/pocket-updater-utility";
description = "Analogue Pocket Updater Utility";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ p-rintz ];
mainProgram = "pocket_updater";
};
}
|