diff options
Diffstat (limited to 'pkgs/by-name/pu')
-rw-r--r-- | pkgs/by-name/pu/pupdate/add-runtime-identifier.patch | 24 | ||||
-rw-r--r-- | pkgs/by-name/pu/pupdate/deps.nix | 10 | ||||
-rw-r--r-- | pkgs/by-name/pu/pupdate/package.nix | 64 |
3 files changed, 98 insertions, 0 deletions
diff --git a/pkgs/by-name/pu/pupdate/add-runtime-identifier.patch b/pkgs/by-name/pu/pupdate/add-runtime-identifier.patch new file mode 100644 index 0000000000000..c70aaad58966b --- /dev/null +++ b/pkgs/by-name/pu/pupdate/add-runtime-identifier.patch @@ -0,0 +1,24 @@ +From f56083d95304752c45cc569fe42c3b0d7a2430bd Mon Sep 17 00:00:00 2001 +From: Philipp Rintz <git@rintz.net> +Date: Wed, 24 Jan 2024 22:11:50 +0100 +Subject: [PATCH] uncommited + +--- + pupdate.csproj | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pupdate.csproj b/pupdate.csproj +index a6f59a8..0563137 100644 +--- a/pupdate.csproj ++++ b/pupdate.csproj +@@ -12,6 +12,7 @@ + <Authors>Matt Pannella</Authors> + <Product>Pupdate</Product> + <RepositoryUrl>https://github.com/mattpannella/pocket-updater-utility</RepositoryUrl> ++ <RuntimeIdentifier>@RuntimeIdentifier@</RuntimeIdentifier> + </PropertyGroup> + <ItemGroup> + <PackageReference Include="CommandLineParser" Version="2.9.1" /> +-- +2.40.1 + diff --git a/pkgs/by-name/pu/pupdate/deps.nix b/pkgs/by-name/pu/pupdate/deps.nix new file mode 100644 index 0000000000000..eea7ea49accbd --- /dev/null +++ b/pkgs/by-name/pu/pupdate/deps.nix @@ -0,0 +1,10 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: [ + (fetchNuGet { pname = "CommandLineParser"; version = "2.9.1"; sha256 = "1sldkj8lakggn4hnyabjj1fppqh50fkdrr1k99d4gswpbk5kv582"; }) + (fetchNuGet { pname = "ConsoleMenu-simple"; version = "2.6.1"; sha256 = "1vbi77schslq3nsardm4v8mrk0zi0phczwm2np1bl9z7c84h5cym"; }) + (fetchNuGet { pname = "Crc32.NET"; version = "1.2.0"; sha256 = "0qaj3192k1vfji87zf50rhydn5mrzyzybrs2k4v7ap29k8i0vi5h"; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) + (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.0"; sha256 = "1bc4ba8ahgk15m8k4nd7x406nhi0kwqzbgjk2dmw52ss553xz7iy"; }) +] diff --git a/pkgs/by-name/pu/pupdate/package.nix b/pkgs/by-name/pu/pupdate/package.nix new file mode 100644 index 0000000000000..00e61e9f01401 --- /dev/null +++ b/pkgs/by-name/pu/pupdate/package.nix @@ -0,0 +1,64 @@ +{ pkgs +, stdenv +, lib +, fetchFromGitHub +, buildDotnetModule +, dotnetCorePackages +, openssl +, zlib +, hostPlatform +, nix-update-script +}: + +buildDotnetModule rec { + pname = "pupdate"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "mattpannella"; + repo = "${pname}"; + rev = "${version}"; + hash = "sha256-Lr3orYOSzFQCLduBhp2MtGbgiKtFB1CgP/iMMySSvEk="; + }; + + 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}" + ]; + + dotnet-sdk = dotnetCorePackages.sdk_6_0; + dotnet-runtime = dotnetCorePackages.runtime_6_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"; + }; +} |