diff options
| author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2021-08-19 14:36:20 -0700 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-08-20 16:25:24 +0000 |
| commit | 3e55f1df9d5d156dbcaa37fe452d7c765d41981d (patch) | |
| tree | 1def747ee492f255dddfec4cf6211e5007c58901 | |
| parent | onlykey: npm install ignore scripts instead of hacking nw urlbase (diff) | |
| download | nixpkgs-origin/backport-134838-to-release-21.05.tar.gz | |
onlykey: parse the version from package.jsonorigin/backport-134838-to-release-21.05
(cherry picked from commit 7c27d012ae4d9906c601098c61f444fbe326c04a)
| -rw-r--r-- | pkgs/tools/security/onlykey/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/security/onlykey/default.nix b/pkgs/tools/security/onlykey/default.nix index 2ac033ba24b1..4cad7e513acd 100644 --- a/pkgs/tools/security/onlykey/default.nix +++ b/pkgs/tools/security/onlykey/default.nix @@ -9,8 +9,18 @@ }: 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. - 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. onlykey = self."${onlykeyPkg}"; |
