depot/third_party/nixpkgs/pkgs/by-name/pu/pupdate/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

63 lines
1.4 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, buildDotnetModule
, dotnetCorePackages
, openssl
, zlib
, hostPlatform
, nix-update-script
}:
buildDotnetModule rec {
pname = "pupdate";
version = "3.11.0";
src = fetchFromGitHub {
owner = "mattpannella";
repo = "${pname}";
rev = "${version}";
hash = "sha256-SqEmpmjI0m6bJT43TLEmEciNEqR/ggQZqFLCm7oFSnY=";
};
buildInputs = [
stdenv.cc.cc.lib
zlib
openssl
];
# See https://github.com/NixOS/nixpkgs/pull/196648/commits/0fb17c04fe34ac45247d35a1e4e0521652d9c494
patches = [ ./add-runtime-identifier.patch ];
postPatch = ''
substituteInPlace pupdate.csproj \
--replace @RuntimeIdentifier@ "${dotnetCorePackages.systemToDotnetRid hostPlatform.system}"
'';
projectFile = "pupdate.csproj";
nugetDeps = ./deps.nix;
selfContainedBuild = true;
executables = [ "pupdate" ];
dotnetFlags = [
"-p:PackageRuntime=${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system} -p:TrimMode=partial"
];
dotnet-sdk = dotnetCorePackages.sdk_7_0;
dotnet-runtime = dotnetCorePackages.runtime_7_0;
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://github.com/mattpannella/pupdate";
description = "Pupdate - A thing for updating your Analogue Pocket";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ p-rintz ];
mainProgram = "pupdate";
};
}