2021-10-19 17:02:53 +01:00
|
|
|
{ lib, buildDotnetModule, fetchFromGitHub, dotnetCorePackages
|
|
|
|
, altcoinSupport ? false }:
|
2020-08-10 19:52:53 +01:00
|
|
|
|
2021-10-19 17:02:53 +01:00
|
|
|
buildDotnetModule rec {
|
2020-08-10 19:52:53 +01:00
|
|
|
pname = "btcpayserver";
|
2021-11-22 14:30:56 +00:00
|
|
|
version = "1.3.6";
|
2020-08-10 19:52:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-22 14:30:56 +00:00
|
|
|
sha256 = "sha256-8SWbbdPx/cC7EWTkSbB/YqR13jaL76fFIjHPGL4rFyk=";
|
2020-08-10 19:52:53 +01:00
|
|
|
};
|
|
|
|
|
2021-10-19 17:02:53 +01:00
|
|
|
projectFile = "BTCPayServer/BTCPayServer.csproj";
|
|
|
|
nugetDeps = ./deps.nix;
|
2020-08-10 19:52:53 +01:00
|
|
|
|
2021-10-19 17:02:53 +01:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_3_1;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_3_1;
|
2020-08-10 19:52:53 +01:00
|
|
|
|
2021-10-19 17:02:53 +01:00
|
|
|
dotnetFlags = lib.optionals altcoinSupport [ "/p:Configuration=Altcoins-Release" ];
|
2020-08-10 19:52:53 +01:00
|
|
|
|
2020-11-19 21:35:07 +00:00
|
|
|
# btcpayserver requires the publish directory as its working dir
|
|
|
|
# https://github.com/btcpayserver/btcpayserver/issues/1894
|
2021-10-19 17:02:53 +01:00
|
|
|
preInstall = ''
|
|
|
|
makeWrapperArgs+=(--run "cd $out/lib/btcpayserver")
|
2020-08-10 19:52:53 +01:00
|
|
|
'';
|
|
|
|
|
2021-10-19 17:02:53 +01:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{BTCPayServer,btcpayserver}
|
|
|
|
'';
|
2020-08-10 19:52:53 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Self-hosted, open-source cryptocurrency payment processor";
|
|
|
|
homepage = "https://btcpayserver.org";
|
|
|
|
maintainers = with maintainers; [ kcalvinalvin earvstedt ];
|
2021-10-19 17:02:53 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2020-08-10 19:52:53 +01:00
|
|
|
};
|
|
|
|
}
|