2021-10-28 06:52:43 +00:00
|
|
|
{ lib, buildDotnetModule, fetchFromGitHub, dotnetCorePackages
|
|
|
|
, altcoinSupport ? false }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
buildDotnetModule rec {
|
2020-09-25 04:45:31 +00:00
|
|
|
pname = "btcpayserver";
|
2021-10-11 16:52:03 +00:00
|
|
|
version = "1.2.4";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-11 16:52:03 +00:00
|
|
|
sha256 = "sha256-vjNJ08twsJ036TTFF6srOGshDpP7ZwWCGN0XjrtFT/g=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
projectFile = "BTCPayServer/BTCPayServer.csproj";
|
|
|
|
nugetDeps = ./deps.nix;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_3_1;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_3_1;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
dotnetFlags = lib.optionals altcoinSupport [ "/p:Configuration=Altcoins-Release" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
# btcpayserver requires the publish directory as its working dir
|
|
|
|
# https://github.com/btcpayserver/btcpayserver/issues/1894
|
2021-10-28 06:52:43 +00:00
|
|
|
preInstall = ''
|
|
|
|
makeWrapperArgs+=(--run "cd $out/lib/btcpayserver")
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{BTCPayServer,btcpayserver}
|
|
|
|
'';
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Self-hosted, open-source cryptocurrency payment processor";
|
|
|
|
homepage = "https://btcpayserver.org";
|
|
|
|
maintainers = with maintainers; [ kcalvinalvin earvstedt ];
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|