Skip to content

Commit

Permalink
[DDW-596] updated yarn2nix to use for loop to prevent breaking window…
Browse files Browse the repository at this point in the history
…s builds
  • Loading branch information
mchappell committed Jan 18, 2022
1 parent 330cbd9 commit 6461e31
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions yarn2nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,14 @@ yarn2nix.mkYarnPackage {
popd
rm -rf $out/resources/app/{installers,launcher-config.yaml,gulpfile.js,home}
function copy_to_modules_folder() {
cp -rv $node_modules/${1} $out/${2}
}
mkdir -pv $out/resources/app/node_modules
cp -rv $node_modules/{\@babel,\@protobufjs,regenerator-runtime,node-fetch,\@trezor,runtypes,parse-uri,randombytes,safe-buffer,bip66,pushdata-bitcoin,bitcoin-ops,typeforce,varuint-bitcoin,create-hash,blake2b,nanoassert,blake2b-wasm,bs58check,bs58,base-x,create-hmac,wif,ms,keccak,semver, semver-compare,long,define-properties,object-keys,has,function-bind,es-abstract,has-symbols,json-stable-stringify,tiny-worker,cashaddrjs,big-integer,inherits,bchaddrjs,cross-fetch,trezor-connect,js-chain-libs-node,bignumber.js,call-bind,get-intrinsic,base64-js,ieee754,cbor-web,util-deprecate,bech32,blake-hash,tiny-secp256k1,bn.js,elliptic,minimalistic-assert,minimalistic-crypto-utils,brorand,hash.js,hmac-drbg,int64-buffer,object.values,bytebuffer,protobufjs} $out/resources/app/node_modules
for module in \@babel \@protobufjs regenerator-runtime node-fetch \@trezor runtypes parse-uri randombytes safe-buffer bip66 pushdata-bitcoin bitcoin-ops typeforce varuint-bitcoin create-hash blake2b nanoassert blake2b-wasm bs58check bs58 base-x create-hmac wif ms keccak semver semver-compare long define-properties object-keys has function-bind es-abstract has-symbols json-stable-stringify tiny-worker cashaddrjs big-integer inherits bchaddrjs cross-fetch trezor-connect js-chain-libs-node bignumber.js call-bind get-intrinsic base64-js ieee754 cbor-web util-deprecate bech32 blake-hash tiny-secp256k1 bn.js elliptic minimalistic-assert minimalistic-crypto-utils brorand hash.js hmac-drbg int64-buffer object.values bytebuffer protobufjs; do
copy_to_modules_folder $module resources/app/node_modules
done
cd $out/resources/app/
unzip ${./nix/windows-usb-libs.zip}
Expand Down Expand Up @@ -167,8 +173,8 @@ yarn2nix.mkYarnPackage {
ln -sv $out/share/daedalus/renderer/assets $out/share/fonts/daedalus
mkdir -pv $out/share/daedalus/node_modules
for module in \@babel \@protobufjs regenerator-runtime node-fetch \@trezor runtypes parse-uri randombytes safe-buffer bip66 pushdata-bitcoin bitcoin-ops typeforce varuint-bitcoin create-hash blake2b nanoassert blake2b-wasm bs58check bs58 base-x create-hmac wif ms keccak semver-compare long define-properties object-keys has function-bind es-abstract has-symbols json-stable-stringify tiny-worker cashaddrjs big-integer inherits bchaddrjs cross-fetch trezor-connect js-chain-libs-node bignumber.js call-bind get-intrinsic base64-js ieee754 cbor-web util-deprecate bech32 blake-hash tiny-secp256k1 bn.js elliptic minimalistic-assert minimalistic-crypto-utils brorand hash.js hmac-drbg int64-buffer object.values bytebuffer protobufjs
cp -rv $node_modules/$module $out/share/daedalus/node_modules/
for module in \@babel \@protobufjs regenerator-runtime node-fetch \@trezor runtypes parse-uri randombytes safe-buffer bip66 pushdata-bitcoin bitcoin-ops typeforce varuint-bitcoin create-hash blake2b nanoassert blake2b-wasm bs58check bs58 base-x create-hmac wif ms keccak semver-compare long define-properties object-keys has function-bind es-abstract has-symbols json-stable-stringify tiny-worker cashaddrjs big-integer inherits bchaddrjs cross-fetch trezor-connect js-chain-libs-node bignumber.js call-bind get-intrinsic base64-js ieee754 cbor-web util-deprecate bech32 blake-hash tiny-secp256k1 bn.js elliptic minimalistic-assert minimalistic-crypto-utils brorand hash.js hmac-drbg int64-buffer object.values bytebuffer protobufjs; do
copy_to_modules_folder $module share/daedalus/node_modules
done
find $out $NIX_BUILD_TOP -name '*.node'
Expand Down

0 comments on commit 6461e31

Please sign in to comment.