nixpkgs/pkgs/applications/blockchains/btcpayserver/default.nix
2024-02-08 21:45:42 +01:00

38 lines
1 KiB
Nix

{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, altcoinSupport ? false }:
buildDotnetModule rec {
pname = "btcpayserver";
version = "1.12.5";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-qlqwIVk8NzfFZlzShfm3nTZWovObWLIKiNGAOCN8i7Y=";
};
projectFile = "BTCPayServer/BTCPayServer.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
buildType = if altcoinSupport then "Altcoins-Release" else "Release";
# macOS has a case-insensitive filesystem, so these two can be the same file
postFixup = ''
mv $out/bin/{BTCPayServer,btcpayserver} || :
'';
meta = with lib; {
description = "Self-hosted, open-source cryptocurrency payment processor";
homepage = "https://btcpayserver.org";
maintainers = with maintainers; [ kcalvinalvin erikarvstedt ];
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
};
}