summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authornixbitcoin <nixbitcoin@i2pmail.org>2021-07-13 09:19:21 +0000
committernixbitcoin <nixbitcoin@i2pmail.org>2021-07-16 09:44:51 +0000
commitbf6cac3e7a94de1a5dc0da81899ec489780210a7 (patch)
tree096c939c9cd632f7a690de877e06d5e68ca5ccf5 /pkgs
parent97adda34b165d575ef70c92bcdb5e12597605c31 (diff)
downloadnixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar.gz
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar.bz2
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar.lz
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar.xz
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.tar.zst
nixpkgs-bf6cac3e7a94de1a5dc0da81899ec489780210a7.zip
btcpayserver: optional altcoin support
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/blockchains/btcpayserver/default.nix6
-rw-r--r--pkgs/applications/blockchains/btcpayserver/deps.nix95
-rwxr-xr-xpkgs/applications/blockchains/btcpayserver/update.sh3
-rwxr-xr-xpkgs/applications/blockchains/nbxplorer/update.sh2
-rwxr-xr-xpkgs/applications/blockchains/nbxplorer/util/create-deps.sh3
-rwxr-xr-xpkgs/applications/blockchains/nbxplorer/util/update-common.sh3
6 files changed, 105 insertions, 7 deletions
diff --git a/pkgs/applications/blockchains/btcpayserver/default.nix b/pkgs/applications/blockchains/btcpayserver/default.nix
index d942ac768a8..ba029aedeeb 100644
--- a/pkgs/applications/blockchains/btcpayserver/default.nix
+++ b/pkgs/applications/blockchains/btcpayserver/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, fetchurl, linkFarmFromDrvs, makeWrapper,
-  dotnetPackages, dotnetCorePackages
+  dotnetPackages, dotnetCorePackages, altcoinSupport ? false
 }:
 
 let
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
     nuget sources Add -Name tmpsrc -Source $TMP/nuget
     nuget init ${linkFarmFromDrvs "deps" deps} $TMP/nuget
 
-    dotnet restore --source $TMP/nuget BTCPayServer/BTCPayServer.csproj
-    dotnet publish --no-restore --output $out/share/$pname -c Release BTCPayServer/BTCPayServer.csproj
+    dotnet restore --source $TMP/nuget ${lib.optionalString altcoinSupport ''/p:Configuration="Altcoins-Release"''} BTCPayServer/BTCPayServer.csproj
+    dotnet publish --no-restore --output $out/share/$pname ${lib.optionalString altcoinSupport "-c Altcoins-Release"} BTCPayServer/BTCPayServer.csproj
   '';
 
   # btcpayserver requires the publish directory as its working dir
diff --git a/pkgs/applications/blockchains/btcpayserver/deps.nix b/pkgs/applications/blockchains/btcpayserver/deps.nix
index 20b97972107..8884dc2fe14 100644
--- a/pkgs/applications/blockchains/btcpayserver/deps.nix
+++ b/pkgs/applications/blockchains/btcpayserver/deps.nix
@@ -85,6 +85,11 @@
     sha256 = "0ksmby0lzgsxkv0xfzr840262kcqra9vds91mcx0rf20blksfvsk";
   })
   (fetchNuGet {
+    name = "Common.Logging.Core";
+    version = "3.4.1";
+    sha256 = "06h80c7l12nh6gnkzskcs4w8741xhprv72vf88f33ilzfy37h5jy";
+  })
+  (fetchNuGet {
     name = "CsvHelper";
     version = "15.0.5";
     sha256 = "01y8bhsnxghn3flz0pr11vj6wjrpmia8rpdrsp7kjfc1zmhqlgma";
@@ -761,6 +766,11 @@
   })
   (fetchNuGet {
     name = "NBitcoin";
+    version = "5.0.33";
+    sha256 = "030q609b9lhapq4wfl1w3impjw5m40kz2rg1s9jn3bn8yjfmsi4a";
+  })
+  (fetchNuGet {
+    name = "NBitcoin";
     version = "5.0.4";
     sha256 = "04iafda61izzxb691brk72qs01m5dadqb4970nw5ayck6275s71i";
   })
@@ -795,6 +805,86 @@
     sha256 = "1asri2wsjq3ljf2p4r4x52ba9cirh8ccc5ysxpnv4cvladkdazbi";
   })
   (fetchNuGet {
+    name = "Nethereum.ABI";
+    version = "3.8.0";
+    sha256 = "10saq2qsqqgsf9d5cjji4lay74ydwkvkqgnns6gxikqicci8yx5c";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Accounts";
+    version = "3.8.0";
+    sha256 = "03dq4l1gsd6r2hah5flas8d8pfys7hh5srd279kiidaaxrp8fv2m";
+  })
+  (fetchNuGet {
+    name = "Nethereum.BlockchainProcessing";
+    version = "3.8.0";
+    sha256 = "0sz6710a3rvzbj1ghx8dx9adfpsaydw8129c5nj2bqvvh6shi4ax";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Contracts";
+    version = "3.8.0";
+    sha256 = "0989as81dqz4j0h8b5a9f5hnd4lrjdj851cfc4j5h6hd633a13f8";
+  })
+  (fetchNuGet {
+    name = "Nethereum.HdWallet";
+    version = "3.8.0";
+    sha256 = "0dy1bcm0gsp137286q3bx5q9gyd8lymrdmnh1ip3sszs5j31l9k2";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Hex";
+    version = "3.8.0";
+    sha256 = "0sbi982jnfs39sp7w85wf8lb51mijpwr9mpsmws08zrm90n93kb6";
+  })
+  (fetchNuGet {
+    name = "Nethereum.JsonRpc.Client";
+    version = "3.8.0";
+    sha256 = "0gmdvsxhs398cj14f16r3dl8yv52iaxr9c9214k2ra28r14gfd1l";
+  })
+  (fetchNuGet {
+    name = "Nethereum.JsonRpc.RpcClient";
+    version = "3.8.0";
+    sha256 = "05k5f0dfcx4afbkc1w7cfnz514i7840j2haxyzsxkp8818yvfg0a";
+  })
+  (fetchNuGet {
+    name = "Nethereum.KeyStore";
+    version = "3.8.0";
+    sha256 = "05pj95vcfznlk4saq9dw19377gd1sqgmjcg5h92b5rzpgm9v811s";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Model";
+    version = "3.8.0";
+    sha256 = "1qfhzqirj9bi49zb6rdcy7w5bm9jyv3a79q7crmgpq3qx4lmz5yh";
+  })
+  (fetchNuGet {
+    name = "Nethereum.RLP";
+    version = "3.8.0";
+    sha256 = "16142ag09h95394ip0ffkci09hchxh2i5xaw2rq46qcr8xd3kiym";
+  })
+  (fetchNuGet {
+    name = "Nethereum.RPC";
+    version = "3.8.0";
+    sha256 = "1m2p10dds1k0r3gci25lh6cxl9z7ciw18g6wwa4yqi1hsw7n59vb";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Signer";
+    version = "3.8.0";
+    sha256 = "175acfqjqacc5zwh2kmrfnwd15jm3fjpv0xlgpyqry52mqxd9khf";
+  })
+  (fetchNuGet {
+    name = "Nethereum.StandardTokenEIP20";
+    version = "3.8.0";
+    sha256 = "0xqb32x5b9y9r380frhj52i1lxsfs92nfgcpmys3shjxz6fnwf6g";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Util";
+    version = "3.8.0";
+    sha256 = "1ig1zkzpglq2q465n4c0ckv8w9gca9cfxz1qnrdhap0f1z90jyg8";
+  })
+  (fetchNuGet {
+    name = "Nethereum.Web3";
+    version = "3.8.0";
+    sha256 = "0n18chc9h1cxqp01kncik9lqfgiqrzl2zr8jgzbb05drlf6k0f3i";
+  })
+  (fetchNuGet {
     name = "NETStandard.Library";
     version = "1.6.1";
     sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8";
@@ -915,6 +1005,11 @@
     sha256 = "1w6s9wjbsyvq8cnqknkdzm9chnv0g5gcsrq5i94zp6br9vg7c627";
   })
   (fetchNuGet {
+    name = "Portable.BouncyCastle";
+    version = "1.8.2";
+    sha256 = "0xqc8q40lr4r7ahsmzpa1q0jagp12abb6rsj80p37q34hsv5284q";
+  })
+  (fetchNuGet {
     name = "QRCoder";
     version = "1.4.1";
     sha256 = "1xgwhpqrm4ycnj8nk4ibxfwkmkiwc5i15l1za3ci5alghlpcb6ch";
diff --git a/pkgs/applications/blockchains/btcpayserver/update.sh b/pkgs/applications/blockchains/btcpayserver/update.sh
index 9debe6780f2..082911b42a3 100755
--- a/pkgs/applications/blockchains/btcpayserver/update.sh
+++ b/pkgs/applications/blockchains/btcpayserver/update.sh
@@ -8,4 +8,5 @@ echo "Updating nbxplorer"
 ../nbxplorer/update.sh
 echo
 echo "Updating btcpayserver"
-../nbxplorer/util/update-common.sh btcpayserver deps.nix
+# Include Razor SDK packages in deps.nix
+../nbxplorer/util/update-common.sh btcpayserver deps.nix '"/p:Configuration="Altcoins-Release" /p:RazorCompileOnBuild=false'
diff --git a/pkgs/applications/blockchains/nbxplorer/update.sh b/pkgs/applications/blockchains/nbxplorer/update.sh
index 5db2723ef8e..caab20c928f 100755
--- a/pkgs/applications/blockchains/nbxplorer/update.sh
+++ b/pkgs/applications/blockchains/nbxplorer/update.sh
@@ -3,4 +3,4 @@ set -euo pipefail
 
 scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
 
-getVersionFromTags=1 "$scriptDir"/util/update-common.sh nbxplorer "$scriptDir"/deps.nix
+getVersionFromTags=1 "$scriptDir"/util/update-common.sh nbxplorer "$scriptDir"/deps.nix ''
diff --git a/pkgs/applications/blockchains/nbxplorer/util/create-deps.sh b/pkgs/applications/blockchains/nbxplorer/util/create-deps.sh
index 14b1687dfff..fb10446142e 100755
--- a/pkgs/applications/blockchains/nbxplorer/util/create-deps.sh
+++ b/pkgs/applications/blockchains/nbxplorer/util/create-deps.sh
@@ -7,6 +7,7 @@ set -euo pipefail
 
 pkgSrc=$1
 depsFile=$(realpath "$2")
+customFlags=$3
 
 sln=$(cd "$pkgSrc"; find * -maxdepth 0 -name '*.sln' | head -1)
 [[ $sln ]] || { echo "No .sln file in $pkgSrc" ; exit 1; }
@@ -20,7 +21,7 @@ pushd "$tmpdir" > /dev/null
 mkdir home
 echo "Running dotnet restore for $sln"
 HOME=home DOTNET_CLI_TELEMETRY_OPTOUT=1 \
-  dotnet restore -v normal --no-cache "$sln" > restore_log
+  dotnet restore $customFlags -v normal --no-cache "$sln" > restore_log
 
 echo "{ fetchNuGet }: [" > "$depsFile"
 while read pkgSpec; do
diff --git a/pkgs/applications/blockchains/nbxplorer/util/update-common.sh b/pkgs/applications/blockchains/nbxplorer/util/update-common.sh
index 7a9262bf483..a9912b8b368 100755
--- a/pkgs/applications/blockchains/nbxplorer/util/update-common.sh
+++ b/pkgs/applications/blockchains/nbxplorer/util/update-common.sh
@@ -8,6 +8,7 @@ set -euo pipefail
 
 pkgName=$1
 depsFile=$2
+customFlags=$3
 
 : ${getVersionFromTags:=}
 : ${refetch:=}
@@ -71,4 +72,4 @@ echo
 
 # Create deps file
 storeSrc="$(nix-build "$nixpkgs" -A $pkgName.src --no-out-link)"
-. "$scriptDir"/create-deps.sh "$storeSrc" "$depsFile"
+. "$scriptDir"/create-deps.sh "$storeSrc" "$depsFile" "$customFlags"