nixpkgs/pkgs/applications/blockchains/btcpayserver/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-19 16:02:53 +00:00
{ lib, buildDotnetModule, fetchFromGitHub, dotnetCorePackages
, altcoinSupport ? false }:
2020-08-10 18:52:53 +00:00
2021-10-19 16:02:53 +00:00
buildDotnetModule rec {
2020-08-10 18:52:53 +00:00
pname = "btcpayserver";
2021-11-05 10:31:44 +00:00
version = "1.3.3";
2020-08-10 18:52:53 +00:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
2021-11-05 10:31:44 +00:00
sha256 = "sha256-IBdQlVZx7Bt4y7B7FvHJihHUWO15a89hs+SGwcobDqY=";
2020-08-10 18:52:53 +00:00
};
2021-10-19 16:02:53 +00:00
projectFile = "BTCPayServer/BTCPayServer.csproj";
nugetDeps = ./deps.nix;
2020-08-10 18:52:53 +00:00
2021-10-19 16:02:53 +00:00
dotnet-sdk = dotnetCorePackages.sdk_3_1;
dotnet-runtime = dotnetCorePackages.aspnetcore_3_1;
2020-08-10 18:52:53 +00:00
2021-10-19 16:02:53 +00:00
dotnetFlags = lib.optionals altcoinSupport [ "/p:Configuration=Altcoins-Release" ];
2020-08-10 18:52:53 +00: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 16:02:53 +00:00
preInstall = ''
makeWrapperArgs+=(--run "cd $out/lib/btcpayserver")
2020-08-10 18:52:53 +00:00
'';
2021-10-19 16:02:53 +00:00
postInstall = ''
mv $out/bin/{BTCPayServer,btcpayserver}
'';
2020-08-10 18:52:53 +00:00
meta = with lib; {
description = "Self-hosted, open-source cryptocurrency payment processor";
homepage = "https://btcpayserver.org";
maintainers = with maintainers; [ kcalvinalvin earvstedt ];
2021-10-19 16:02:53 +00:00
license = licenses.mit;
platforms = platforms.linux;
2020-08-10 18:52:53 +00:00
};
}