onlykey: parse the version from package.json
(cherry picked from commit 7c27d012ae4d9906c601098c61f444fbe326c04a)
This commit is contained in:
parent
e9bc98c9cb
commit
3e55f1df9d
@ -9,8 +9,18 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# parse the version from package.json
|
||||||
|
version =
|
||||||
|
let
|
||||||
|
packageJson = builtins.fromJSON (builtins.readFile ./package.json);
|
||||||
|
splits = builtins.split "^.*#v(.*)$" (builtins.getAttr "onlykey" (builtins.head packageJson));
|
||||||
|
matches = builtins.elemAt splits 1;
|
||||||
|
elem = builtins.head matches;
|
||||||
|
in
|
||||||
|
elem;
|
||||||
|
|
||||||
# this must be updated anytime this package is updated.
|
# this must be updated anytime this package is updated.
|
||||||
onlykeyPkg = "onlykey-git://github.com/trustcrypto/OnlyKey-App.git#v5.3.3";
|
onlykeyPkg = "onlykey-git://github.com/trustcrypto/OnlyKey-App.git#v${version}";
|
||||||
|
|
||||||
# define a shortcut to get to onlykey.
|
# define a shortcut to get to onlykey.
|
||||||
onlykey = self."${onlykeyPkg}";
|
onlykey = self."${onlykeyPkg}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user