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-12-30 15:02:32 +00:00
|
|
|
version = "1.3.7";
|
2020-08-10 19:52:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-30 15:02:32 +00:00
|
|
|
sha256 = "sha256-W8WRw42hMNUaQZlfrl73REGIvLcj6Vso9Axx53ENkx0=";
|
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
|
|
|
'';
|
|
|
|
|
2022-01-11 23:21:04 +00:00
|
|
|
postFixup = ''
|
2021-10-19 17:02:53 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|