forked from M-Labs/thermostat
flake.nix: nixfmt-rfc-style
This commit is contained in:
parent
12a1dd4034
commit
c89f1eab17
69
flake.nix
69
flake.nix
@ -1,15 +1,23 @@
|
|||||||
{
|
{
|
||||||
description = "Firmware for the Sinara 8451 Thermostat";
|
description = "Firmware for the Sinara 8451 Thermostat";
|
||||||
|
|
||||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05;
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||||
inputs.rust-overlay = {
|
inputs.rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, rust-overlay }:
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
rust-overlay,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ (import rust-overlay) ]; };
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [ (import rust-overlay) ];
|
||||||
|
};
|
||||||
|
|
||||||
rust = pkgs.rust-bin.stable."1.66.0".default.override {
|
rust = pkgs.rust-bin.stable."1.66.0".default.override {
|
||||||
extensions = [ "rust-src" ];
|
extensions = [ "rust-src" ];
|
||||||
@ -25,7 +33,7 @@
|
|||||||
version = "0.0.0";
|
version = "0.0.0";
|
||||||
|
|
||||||
src = self;
|
src = self;
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
outputHashes = {
|
outputHashes = {
|
||||||
"stm32-eth-0.2.0" = "sha256-48RpZgagUqgVeKm7GXdk3Oo0v19ScF9Uby0nTFlve2o=";
|
"stm32-eth-0.2.0" = "sha256-48RpZgagUqgVeKm7GXdk3Oo0v19ScF9Uby0nTFlve2o=";
|
||||||
@ -69,7 +77,10 @@
|
|||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-WBCNhBHHBU4IQdi3ke6F4QH8KWubNZwOAd3jipj/Ks4=";
|
hash = "sha256-WBCNhBHHBU4IQdi3ke6F4QH8KWubNZwOAd3jipj/Ks4=";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [ numpy pyqt6 ];
|
propagatedBuildInputs = with pkgs.python3Packages; [
|
||||||
|
numpy
|
||||||
|
pyqt6
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
qtextras = pkgs.python3Packages.buildPythonPackage rec {
|
qtextras = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
@ -81,7 +92,11 @@
|
|||||||
hash = "sha256-d1ZotSlOI4surUy0H0N4xHoq94IRQvMHunwRH1uubFg=";
|
hash = "sha256-d1ZotSlOI4surUy0H0N4xHoq94IRQvMHunwRH1uubFg=";
|
||||||
};
|
};
|
||||||
buildInputs = [ pkgs.python3Packages.hatchling ];
|
buildInputs = [ pkgs.python3Packages.hatchling ];
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [ numpy pyqtgraph ruamel-yaml ];
|
propagatedBuildInputs = with pkgs.python3Packages; [
|
||||||
|
numpy
|
||||||
|
pyqtgraph
|
||||||
|
ruamel-yaml
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
pglive = pkgs.python3Packages.buildPythonPackage rec {
|
pglive = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
@ -93,7 +108,10 @@
|
|||||||
hash = "sha256-jqj8X6H1N5mJQ4OrY5ANqRB0YJByqg/bNneEALWmH1A=";
|
hash = "sha256-jqj8X6H1N5mJQ4OrY5ANqRB0YJByqg/bNneEALWmH1A=";
|
||||||
};
|
};
|
||||||
buildInputs = [ pkgs.python3Packages.poetry-core ];
|
buildInputs = [ pkgs.python3Packages.poetry-core ];
|
||||||
propagatedBuildInputs = [ pyqtgraph pkgs.python3Packages.numpy ];
|
propagatedBuildInputs = [
|
||||||
|
pyqtgraph
|
||||||
|
pkgs.python3Packages.numpy
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
thermostat_gui = pkgs.python3Packages.buildPythonPackage {
|
thermostat_gui = pkgs.python3Packages.buildPythonPackage {
|
||||||
@ -103,14 +121,23 @@
|
|||||||
src = "${self}/pytec";
|
src = "${self}/pytec";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.qt6.wrapQtAppsHook ];
|
nativeBuildInputs = [ pkgs.qt6.wrapQtAppsHook ];
|
||||||
propagatedBuildInputs = [ pkgs.qt6.qtbase ] ++ (with pkgs.python3Packages; [ pyqtgraph pyqt6 qasync pglive qtextras ]);
|
propagatedBuildInputs =
|
||||||
|
[ pkgs.qt6.qtbase ]
|
||||||
|
++ (with pkgs.python3Packages; [
|
||||||
|
pyqtgraph
|
||||||
|
pyqt6
|
||||||
|
qasync
|
||||||
|
pglive
|
||||||
|
qtextras
|
||||||
|
]);
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapQtApp "$out/bin/tec_qt"
|
wrapQtApp "$out/bin/tec_qt"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
packages.x86_64-linux = {
|
packages.x86_64-linux = {
|
||||||
inherit thermostat thermostat_gui;
|
inherit thermostat thermostat_gui;
|
||||||
default = thermostat;
|
default = thermostat;
|
||||||
@ -127,11 +154,23 @@
|
|||||||
|
|
||||||
devShells.x86_64-linux.default = pkgs.mkShellNoCC {
|
devShells.x86_64-linux.default = pkgs.mkShellNoCC {
|
||||||
name = "thermostat-dev-shell";
|
name = "thermostat-dev-shell";
|
||||||
packages = with pkgs; [
|
packages =
|
||||||
rust openocd dfu-util
|
with pkgs;
|
||||||
] ++ (with python3Packages; [
|
[
|
||||||
numpy matplotlib pyqtgraph setuptools pyqt6 qasync pglive qtextras
|
rust
|
||||||
|
openocd
|
||||||
|
dfu-util
|
||||||
|
]
|
||||||
|
++ (with python3Packages; [
|
||||||
|
numpy
|
||||||
|
matplotlib
|
||||||
|
pyqtgraph
|
||||||
|
setuptools
|
||||||
|
pyqt6
|
||||||
|
qasync
|
||||||
|
pglive
|
||||||
|
qtextras
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user