Skip to content

Commit e61348b

Browse files
authored
Merge pull request #121 from tock/nix-support
Update default.nix to newer nix's and sync version
2 parents 53898d3 + cf79b05 commit e61348b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

default.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let
2020
];
2121

2222
propagatedBuildInputs = with pkgs; [
23-
segger-jlink libusb
23+
segger-jlink libusb1
2424
];
2525

2626
installPhase = ''
@@ -74,7 +74,9 @@ let
7474
});
7575
in pkgs.python3Packages.buildPythonPackage rec {
7676
pname = "tockloader";
77-
version = "1.10.0";
77+
version = let
78+
pattern = "^__version__ = ['\"]([^'\"]*)['\"]\n";
79+
in elemAt (match pattern (readFile ./tockloader/_version.py)) 0;
7880
name = "${pname}-${version}";
7981

8082
propagatedBuildInputs = with python3Packages; [
@@ -87,6 +89,7 @@ in pkgs.python3Packages.buildPythonPackage rec {
8789
questionary
8890
pycrypto
8991
siphash
92+
ecdsa
9093
] ++ (lib.optional withUnfreePkgs pynrfjprog);
9194

9295
src = ./.;

tockloader/tickv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def reset(self):
369369

370370
def _reset(self):
371371
db_len = len(self.storage_binary)
372-
self.storage_binary = bytearray(b"\xFF" * db_len)
372+
self.storage_binary = bytearray(b"\xff" * db_len)
373373

374374
# Add the known initialize key, value. I don't know what this key
375375
# is from, but it is the standard.

0 commit comments

Comments
 (0)