working version

This commit is contained in:
2023-08-29 10:35:21 +03:00
commit f62863c18b
2 changed files with 136 additions and 0 deletions

77
flake.lock generated Normal file
View File

@@ -0,0 +1,77 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1692799911,
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1693183237,
"narHash": "sha256-c7OtyBkZ/vZE/WosBpRGRtkbWZjDHGJP7fg1FyB9Dsc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ea5234e7073d5f44728c499192544a84244bf35a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"solo1-cli-src": "solo1-cli-src"
}
},
"solo1-cli-src": {
"flake": false,
"locked": {
"lastModified": 1647996694,
"narHash": "sha256-03laC28h85cRS8uS5G4h3QAaFt4/gWi4lqIaFsxQyE4=",
"owner": "solokeys",
"repo": "solo1-cli",
"rev": "5b0fde3ee3d48e48a3acb83c6f21ae7f0abcffc6",
"type": "github"
},
"original": {
"owner": "solokeys",
"repo": "solo1-cli",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

59
flake.nix Normal file
View File

@@ -0,0 +1,59 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
solo1-cli-src = {
url = "github:solokeys/solo1-cli";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, solo1-cli-src, ... }:
flake-utils.lib.eachSystem [
"x86_64-linux" "i686-linux" "aarch64-linux"
] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
#python-pkgs = pkgs.python38Packages;
python-pkgs = pkgs.python3Packages;
solo1-cli = python-pkgs.buildPythonApplication {
name = "solo1-cli";
format = "flit";
propagatedBuildInputs = with python-pkgs; [
click
cryptography
ecdsa
fido2
intelhex
pyserial
pyusb
requests
black
flake8
#flit_core
#flit
ipython
isort
];
src = solo1-cli-src;
postPatch = ''
#substituteInPlace solo/devices/base.py --replace 'CTAP1' 'Ctap1'
substituteInPlace solo/devices/solo_v1.py --replace 'CTAP1' 'Ctap1'
substituteInPlace solo/devices/base.py --replace 'CTAP2' 'Ctap2'
substituteInPlace solo/devices/solo_v1.py --replace 'CTAP2' 'Ctap2'
'';
#enableParallelBuilding = true;
};
in
{
packages.default = solo1-cli;
packages.solo1-cli = solo1-cli;
}
);
}