monero-cli: fetch necessary submodules only
Instead of downloading a whole lot of submodules just to be discarded later (because we force system libraries) fetch the only one really needed manually.
This commit is contained in:
parent
210b580992
commit
c47379d5e1
@ -6,6 +6,23 @@
|
||||
, trezorSupport ? true, libusb1, protobuf, python3
|
||||
}:
|
||||
|
||||
let
|
||||
# submodules
|
||||
supercop = fetchFromGitHub {
|
||||
owner = "monero-project";
|
||||
repo = "supercop";
|
||||
rev = "633500ad8c8759995049ccd022107d1fa8a1bbc9";
|
||||
sha256 = "26UmESotSWnQ21VbAYEappLpkEMyl0jiuCaezRYd/sE=";
|
||||
};
|
||||
trezor-common = fetchFromGitHub {
|
||||
owner = "trezor";
|
||||
repo = "trezor-common";
|
||||
rev = "bff7fdfe436c727982cc553bdfb29a9021b423b0";
|
||||
sha256 = "VNypeEz9AV0ts8X3vINwYMOgO8VpNmyUPC4iY3OOuZI=";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "monero-cli";
|
||||
version = "0.18.1.2";
|
||||
@ -15,7 +32,6 @@ stdenv.mkDerivation rec {
|
||||
repo = "monero";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-yV1ysoesEcjL+JX6hkmcrBDmazOWBvYK6EjshxJzcAw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -23,8 +39,10 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# remove vendored libraries
|
||||
rm -r external/{miniupnp,randomx,rapidjson}
|
||||
# manually install submodules
|
||||
rmdir external/{supercop,trezor-common}
|
||||
ln -sf ${supercop} external/supercop
|
||||
ln -sf ${trezor-common} external/trezor-common
|
||||
# export patched source for monero-gui
|
||||
cp -r . $source
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user