This commit is contained in:
Artturin 2024-10-01 21:41:35 +03:00
parent f912451e32
commit 48fa521896
5 changed files with 91 additions and 37 deletions

View file

@ -5,7 +5,9 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
}; };
outputs = { self, nixpkgs }: let outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
kernel = pkgs.linux_latest; kernel = pkgs.linux_latest;
@ -13,10 +15,18 @@
sfpi = import ./pkgs/sfpi { inherit pkgs; }; sfpi = import ./pkgs/sfpi { inherit pkgs; };
luwen = import ./pkgs/luwen { inherit pkgs; }; luwen = import ./pkgs/luwen { inherit pkgs; };
common = import ./pkgs/common { inherit pkgs; }; common = import ./pkgs/common { inherit pkgs; };
flash = import ./pkgs/flash { inherit pkgs; pyluwen = luwen.pyluwen_0_1; }; flash = import ./pkgs/flash {
smi = import ./pkgs/smi { inherit pkgs; pyluwen = luwen.pyluwen; tools-common = common; }; inherit pkgs;
pyluwen = luwen.pyluwen_0_1;
};
smi = import ./pkgs/smi {
inherit pkgs;
pyluwen = luwen.pyluwen;
tools-common = common;
};
umd = import ./pkgs/umd { inherit pkgs; }; umd = import ./pkgs/umd { inherit pkgs; };
in { in
{
packages.${system} = { packages.${system} = {
kmd = kmd.kmd; kmd = kmd.kmd;
udev-rules = kmd.udev-rules; udev-rules = kmd.udev-rules;

View file

@ -17,7 +17,16 @@ buildPythonPackage rec {
format = "pyproject"; format = "pyproject";
propagatedBuildInputs = [ setuptools distro elasticsearch psutil pyyaml rich textual requests ]; propagatedBuildInputs = [
setuptools
distro
elasticsearch
psutil
pyyaml
rich
textual
requests
];
pythonImportsCheck = [ pythonImportsCheck = [
"tt_tools_common" "tt_tools_common"

View file

@ -17,5 +17,10 @@ buildPythonPackage rec {
# patches = [ ./pyproject.patch ./log.patch ]; # patches = [ ./pyproject.patch ./log.patch ];
propagatedBuildInputs = [ setuptools pyyaml pyluwen tabulate ]; #requests textual black distro elasticsearch jsons pydantic psutil pyyaml pyluwen importlib-resources pkgs.pre-commit tools-common ]; propagatedBuildInputs = [
setuptools
pyyaml
pyluwen
tabulate
]; # requests textual black distro elasticsearch jsons pydantic psutil pyyaml pyluwen importlib-resources pkgs.pre-commit tools-common ];
} }

View file

@ -1,4 +1,8 @@
{ pkgs, pyluwen, tools-common }: {
pkgs,
pyluwen,
tools-common,
}:
with pkgs.python3Packages; with pkgs.python3Packages;
@ -15,7 +19,25 @@ buildPythonPackage rec {
format = "pyproject"; format = "pyproject";
patches = [ ./pyproject.patch ./log.patch ]; patches = [
./pyproject.patch
./log.patch
];
propagatedBuildInputs = [ setuptools requests textual black distro elasticsearch jsons pydantic psutil pyyaml pyluwen importlib-resources pkgs.pre-commit tools-common ]; propagatedBuildInputs = [
setuptools
requests
textual
black
distro
elasticsearch
jsons
pydantic
psutil
pyyaml
pyluwen
importlib-resources
pkgs.pre-commit
tools-common
];
} }

View file

@ -11,14 +11,22 @@ pkgs.stdenv.mkDerivation {
hash = "sha256-jMxhhFWnCjNZZvFiTCeuEHvxvE0+IoaP4NJkr/CDLy8="; hash = "sha256-jMxhhFWnCjNZZvFiTCeuEHvxvE0+IoaP4NJkr/CDLy8=";
}; };
patches = [ ./fmt_mystery.patch ./missing_headers.patch ]; patches = [
./fmt_mystery.patch
./missing_headers.patch
];
makeFlags = [ makeFlags = [
"DEVICE_CXX=${pkgs.stdenv.cc.targetPrefix}c++" "DEVICE_CXX=${pkgs.stdenv.cc.targetPrefix}c++"
"ARCH_NAME=grayskull" "ARCH_NAME=grayskull"
]; ];
buildInputs = with pkgs; [ libyamlcpp boost fmt hwloc ]; buildInputs = with pkgs; [
libyamlcpp
boost
fmt
hwloc
];
installPhase = '' installPhase = ''
mkdir $out mkdir $out