tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
btcpayserver: optional altcoin support
nixbitcoin
4 years ago
bf6cac3e
97adda34
+105
-7
6 changed files
expand all
collapse all
unified
split
pkgs
applications
blockchains
btcpayserver
default.nix
deps.nix
update.sh
nbxplorer
update.sh
util
create-deps.sh
update-common.sh
+3
-3
pkgs/applications/blockchains/btcpayserver/default.nix
···
1
1
{ lib, stdenv, fetchFromGitHub, fetchurl, linkFarmFromDrvs, makeWrapper,
2
2
-
dotnetPackages, dotnetCorePackages
2
2
+
dotnetPackages, dotnetCorePackages, altcoinSupport ? false
3
3
}:
4
4
5
5
let
···
34
34
nuget sources Add -Name tmpsrc -Source $TMP/nuget
35
35
nuget init ${linkFarmFromDrvs "deps" deps} $TMP/nuget
36
36
37
37
-
dotnet restore --source $TMP/nuget BTCPayServer/BTCPayServer.csproj
38
38
-
dotnet publish --no-restore --output $out/share/$pname -c Release BTCPayServer/BTCPayServer.csproj
37
37
+
dotnet restore --source $TMP/nuget ${lib.optionalString altcoinSupport ''/p:Configuration="Altcoins-Release"''} BTCPayServer/BTCPayServer.csproj
38
38
+
dotnet publish --no-restore --output $out/share/$pname ${lib.optionalString altcoinSupport "-c Altcoins-Release"} BTCPayServer/BTCPayServer.csproj
39
39
'';
40
40
41
41
# btcpayserver requires the publish directory as its working dir
+95
pkgs/applications/blockchains/btcpayserver/deps.nix
···
85
85
sha256 = "0ksmby0lzgsxkv0xfzr840262kcqra9vds91mcx0rf20blksfvsk";
86
86
})
87
87
(fetchNuGet {
88
88
+
name = "Common.Logging.Core";
89
89
+
version = "3.4.1";
90
90
+
sha256 = "06h80c7l12nh6gnkzskcs4w8741xhprv72vf88f33ilzfy37h5jy";
91
91
+
})
92
92
+
(fetchNuGet {
88
93
name = "CsvHelper";
89
94
version = "15.0.5";
90
95
sha256 = "01y8bhsnxghn3flz0pr11vj6wjrpmia8rpdrsp7kjfc1zmhqlgma";
···
761
766
})
762
767
(fetchNuGet {
763
768
name = "NBitcoin";
769
769
+
version = "5.0.33";
770
770
+
sha256 = "030q609b9lhapq4wfl1w3impjw5m40kz2rg1s9jn3bn8yjfmsi4a";
771
771
+
})
772
772
+
(fetchNuGet {
773
773
+
name = "NBitcoin";
764
774
version = "5.0.4";
765
775
sha256 = "04iafda61izzxb691brk72qs01m5dadqb4970nw5ayck6275s71i";
766
776
})
···
795
805
sha256 = "1asri2wsjq3ljf2p4r4x52ba9cirh8ccc5ysxpnv4cvladkdazbi";
796
806
})
797
807
(fetchNuGet {
808
808
+
name = "Nethereum.ABI";
809
809
+
version = "3.8.0";
810
810
+
sha256 = "10saq2qsqqgsf9d5cjji4lay74ydwkvkqgnns6gxikqicci8yx5c";
811
811
+
})
812
812
+
(fetchNuGet {
813
813
+
name = "Nethereum.Accounts";
814
814
+
version = "3.8.0";
815
815
+
sha256 = "03dq4l1gsd6r2hah5flas8d8pfys7hh5srd279kiidaaxrp8fv2m";
816
816
+
})
817
817
+
(fetchNuGet {
818
818
+
name = "Nethereum.BlockchainProcessing";
819
819
+
version = "3.8.0";
820
820
+
sha256 = "0sz6710a3rvzbj1ghx8dx9adfpsaydw8129c5nj2bqvvh6shi4ax";
821
821
+
})
822
822
+
(fetchNuGet {
823
823
+
name = "Nethereum.Contracts";
824
824
+
version = "3.8.0";
825
825
+
sha256 = "0989as81dqz4j0h8b5a9f5hnd4lrjdj851cfc4j5h6hd633a13f8";
826
826
+
})
827
827
+
(fetchNuGet {
828
828
+
name = "Nethereum.HdWallet";
829
829
+
version = "3.8.0";
830
830
+
sha256 = "0dy1bcm0gsp137286q3bx5q9gyd8lymrdmnh1ip3sszs5j31l9k2";
831
831
+
})
832
832
+
(fetchNuGet {
833
833
+
name = "Nethereum.Hex";
834
834
+
version = "3.8.0";
835
835
+
sha256 = "0sbi982jnfs39sp7w85wf8lb51mijpwr9mpsmws08zrm90n93kb6";
836
836
+
})
837
837
+
(fetchNuGet {
838
838
+
name = "Nethereum.JsonRpc.Client";
839
839
+
version = "3.8.0";
840
840
+
sha256 = "0gmdvsxhs398cj14f16r3dl8yv52iaxr9c9214k2ra28r14gfd1l";
841
841
+
})
842
842
+
(fetchNuGet {
843
843
+
name = "Nethereum.JsonRpc.RpcClient";
844
844
+
version = "3.8.0";
845
845
+
sha256 = "05k5f0dfcx4afbkc1w7cfnz514i7840j2haxyzsxkp8818yvfg0a";
846
846
+
})
847
847
+
(fetchNuGet {
848
848
+
name = "Nethereum.KeyStore";
849
849
+
version = "3.8.0";
850
850
+
sha256 = "05pj95vcfznlk4saq9dw19377gd1sqgmjcg5h92b5rzpgm9v811s";
851
851
+
})
852
852
+
(fetchNuGet {
853
853
+
name = "Nethereum.Model";
854
854
+
version = "3.8.0";
855
855
+
sha256 = "1qfhzqirj9bi49zb6rdcy7w5bm9jyv3a79q7crmgpq3qx4lmz5yh";
856
856
+
})
857
857
+
(fetchNuGet {
858
858
+
name = "Nethereum.RLP";
859
859
+
version = "3.8.0";
860
860
+
sha256 = "16142ag09h95394ip0ffkci09hchxh2i5xaw2rq46qcr8xd3kiym";
861
861
+
})
862
862
+
(fetchNuGet {
863
863
+
name = "Nethereum.RPC";
864
864
+
version = "3.8.0";
865
865
+
sha256 = "1m2p10dds1k0r3gci25lh6cxl9z7ciw18g6wwa4yqi1hsw7n59vb";
866
866
+
})
867
867
+
(fetchNuGet {
868
868
+
name = "Nethereum.Signer";
869
869
+
version = "3.8.0";
870
870
+
sha256 = "175acfqjqacc5zwh2kmrfnwd15jm3fjpv0xlgpyqry52mqxd9khf";
871
871
+
})
872
872
+
(fetchNuGet {
873
873
+
name = "Nethereum.StandardTokenEIP20";
874
874
+
version = "3.8.0";
875
875
+
sha256 = "0xqb32x5b9y9r380frhj52i1lxsfs92nfgcpmys3shjxz6fnwf6g";
876
876
+
})
877
877
+
(fetchNuGet {
878
878
+
name = "Nethereum.Util";
879
879
+
version = "3.8.0";
880
880
+
sha256 = "1ig1zkzpglq2q465n4c0ckv8w9gca9cfxz1qnrdhap0f1z90jyg8";
881
881
+
})
882
882
+
(fetchNuGet {
883
883
+
name = "Nethereum.Web3";
884
884
+
version = "3.8.0";
885
885
+
sha256 = "0n18chc9h1cxqp01kncik9lqfgiqrzl2zr8jgzbb05drlf6k0f3i";
886
886
+
})
887
887
+
(fetchNuGet {
798
888
name = "NETStandard.Library";
799
889
version = "1.6.1";
800
890
sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8";
···
913
1003
name = "Pomelo.JsonObject";
914
1004
version = "2.2.1";
915
1005
sha256 = "1w6s9wjbsyvq8cnqknkdzm9chnv0g5gcsrq5i94zp6br9vg7c627";
1006
1006
+
})
1007
1007
+
(fetchNuGet {
1008
1008
+
name = "Portable.BouncyCastle";
1009
1009
+
version = "1.8.2";
1010
1010
+
sha256 = "0xqc8q40lr4r7ahsmzpa1q0jagp12abb6rsj80p37q34hsv5284q";
916
1011
})
917
1012
(fetchNuGet {
918
1013
name = "QRCoder";
+2
-1
pkgs/applications/blockchains/btcpayserver/update.sh
···
8
8
../nbxplorer/update.sh
9
9
echo
10
10
echo "Updating btcpayserver"
11
11
-
../nbxplorer/util/update-common.sh btcpayserver deps.nix
11
11
+
# Include Razor SDK packages in deps.nix
12
12
+
../nbxplorer/util/update-common.sh btcpayserver deps.nix '"/p:Configuration="Altcoins-Release" /p:RazorCompileOnBuild=false'
+1
-1
pkgs/applications/blockchains/nbxplorer/update.sh
···
3
3
4
4
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
5
5
6
6
-
getVersionFromTags=1 "$scriptDir"/util/update-common.sh nbxplorer "$scriptDir"/deps.nix
6
6
+
getVersionFromTags=1 "$scriptDir"/util/update-common.sh nbxplorer "$scriptDir"/deps.nix ''
+2
-1
pkgs/applications/blockchains/nbxplorer/util/create-deps.sh
···
7
7
8
8
pkgSrc=$1
9
9
depsFile=$(realpath "$2")
10
10
+
customFlags=$3
10
11
11
12
sln=$(cd "$pkgSrc"; find * -maxdepth 0 -name '*.sln' | head -1)
12
13
[[ $sln ]] || { echo "No .sln file in $pkgSrc" ; exit 1; }
···
20
21
mkdir home
21
22
echo "Running dotnet restore for $sln"
22
23
HOME=home DOTNET_CLI_TELEMETRY_OPTOUT=1 \
23
23
-
dotnet restore -v normal --no-cache "$sln" > restore_log
24
24
+
dotnet restore $customFlags -v normal --no-cache "$sln" > restore_log
24
25
25
26
echo "{ fetchNuGet }: [" > "$depsFile"
26
27
while read pkgSpec; do
+2
-1
pkgs/applications/blockchains/nbxplorer/util/update-common.sh
···
8
8
9
9
pkgName=$1
10
10
depsFile=$2
11
11
+
customFlags=$3
11
12
12
13
: ${getVersionFromTags:=}
13
14
: ${refetch:=}
···
71
72
72
73
# Create deps file
73
74
storeSrc="$(nix-build "$nixpkgs" -A $pkgName.src --no-out-link)"
74
74
-
. "$scriptDir"/create-deps.sh "$storeSrc" "$depsFile"
75
75
+
. "$scriptDir"/create-deps.sh "$storeSrc" "$depsFile" "$customFlags"