init
This commit is contained in:
commit
9654e56fcd
3 changed files with 83 additions and 0 deletions
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753750875,
|
||||||
|
"narHash": "sha256-J1P0aQymehe8AHsID9wwoMjbaYrIB2eH5HftoXhF9xk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "871381d997e4a063f25a3994ce8a9ac595246610",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
16
flake.nix
Normal file
16
flake.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
outputs = { self, nixpkgs, ... }: let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
|
scan = base: lib.attrsets.mapAttrs' (name: _: {
|
||||||
|
name = lib.strings.removeSuffix ".nix" (builtins.baseNameOf name);
|
||||||
|
value = import "${base}/${name}";
|
||||||
|
}) (builtins.readDir base);
|
||||||
|
|
||||||
|
packages = let
|
||||||
|
packages = scan ./packages;
|
||||||
|
in system: pkgs: builtins.mapAttrs (_: fn: pkgs.callPackage fn {}) packages;
|
||||||
|
in {
|
||||||
|
packages = builtins.mapAttrs packages nixpkgs.legacyPackages;
|
||||||
|
};
|
||||||
|
}
|
||||||
42
packages/riotee-probe.nix
Normal file
42
packages/riotee-probe.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
let
|
||||||
|
version_hash."v1.1.0" = "sha256-W6qxZThRbwiuKpmavUBzCNs6E3nS2hpMSFHmga6wPTA=";
|
||||||
|
in {
|
||||||
|
lib,
|
||||||
|
version ? "v1.1.0",
|
||||||
|
python3,
|
||||||
|
python3Packages,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}: let
|
||||||
|
git = fetchFromGitHub {
|
||||||
|
owner = "NessieCircuits";
|
||||||
|
repo = "Riotee_ProbeSoftware";
|
||||||
|
rev = version;
|
||||||
|
hash = version_hash.${version} or "";
|
||||||
|
};
|
||||||
|
dependencies = with python3Packages; [
|
||||||
|
numpy
|
||||||
|
intelhex
|
||||||
|
click
|
||||||
|
pyserial
|
||||||
|
progress
|
||||||
|
pyocd
|
||||||
|
];
|
||||||
|
in python3Packages.buildPythonPackage {
|
||||||
|
pname = "riotee-probe";
|
||||||
|
version = version;
|
||||||
|
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
nativeBuildInputs = with python3Packages; [
|
||||||
|
flit-core
|
||||||
|
] ++ dependencies;
|
||||||
|
|
||||||
|
inherit dependencies;
|
||||||
|
|
||||||
|
src = "${git}/tool";
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
mkdir -p $out/lib/udev/rules.d
|
||||||
|
cp ${git}/52-riotee.rules $out/lib/udev/rules.d
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue