2024-02-07 01:22:34 +00:00
|
|
|
{ pkgs
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildDotnetModule
|
|
|
|
, dotnetCorePackages
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, hostPlatform
|
|
|
|
, nix-update-script
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDotnetModule rec {
|
2024-02-07 01:22:34 +00:00
|
|
|
pname = "pupdate";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.10.3";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattpannella";
|
|
|
|
repo = "${pname}";
|
|
|
|
rev = "${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-xaoOfylDf8KBGjS5RxPH156PRfEBFk+sRZ4QTCMSQbY=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
zlib
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
# See https://github.com/NixOS/nixpkgs/pull/196648/commits/0fb17c04fe34ac45247d35a1e4e0521652d9c494
|
|
|
|
patches = [ ./add-runtime-identifier.patch ];
|
|
|
|
postPatch = ''
|
2024-02-07 01:22:34 +00:00
|
|
|
substituteInPlace pupdate.csproj \
|
2024-01-02 11:29:13 +00:00
|
|
|
--replace @RuntimeIdentifier@ "${dotnetCorePackages.systemToDotnetRid hostPlatform.system}"
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
projectFile = "pupdate.csproj";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
|
|
|
|
selfContainedBuild = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
executables = [ "pupdate" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
dotnetFlags = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"-p:PackageRuntime=${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system} -p:TrimMode=partial"
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.runtime_7_0;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
2024-02-07 01:22:34 +00:00
|
|
|
homepage = "https://github.com/mattpannella/pupdate";
|
|
|
|
description = "Pupdate - A thing for updating your Analogue Pocket ";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ p-rintz ];
|
2024-02-07 01:22:34 +00:00
|
|
|
mainProgram = "pupdate";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|