2025-04-11 13:02:12 +02:00

45 lines
1.1 KiB
Nix

{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
altcoinSupport ? false,
}:
buildDotnetModule rec {
pname = "btcpayserver";
version = "2.1.0";
src = fetchFromGitHub {
owner = "btcpayserver";
repo = "btcpayserver";
tag = "v${version}";
sha256 = "sha256-vojRe64STkCKNn/es5+TyBAXvSBXkjjGLbykuKTEa5k=";
};
projectFile = "BTCPayServer/BTCPayServer.csproj";
nugetDeps = ./deps.json;
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";
changelog = "https://github.com/btcpayserver/btcpayserver/blob/v${version}/Changelog.md";
maintainers = with maintainers; [
kcalvinalvin
erikarvstedt
];
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
};
}