From 64d7e5cf06850f8240f229550641ce6ca0ea3c99 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 8 Jul 2024 12:34:33 +0800 Subject: [PATCH] flake.nix: nixfmt-rfc-style --- flake.nix | 64 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 433017f..9362d65 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,15 @@ { description = "Firmware for the Sinara 8451 Thermostat"; - inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05; - inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + inputs.mozilla-overlay = {url = github:mozilla/nixpkgs-mozilla; flake = false; }; - outputs = { self, nixpkgs, mozilla-overlay }: + outputs = + { + self, + nixpkgs, + mozilla-overlay, + }: let pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ (import mozilla-overlay) ]; }; rustManifest = pkgs.fetchurl { @@ -32,7 +37,7 @@ version = "0.0.0"; src = self; - cargoLock = { + cargoLock = { lockFile = ./Cargo.lock; outputHashes = { "stm32-eth-0.2.0" = "sha256-48RpZgagUqgVeKm7GXdk3Oo0v19ScF9Uby0nTFlve2o="; @@ -76,7 +81,10 @@ inherit pname version; hash = "sha256-WBCNhBHHBU4IQdi3ke6F4QH8KWubNZwOAd3jipj/Ks4="; }; - propagatedBuildInputs = with pkgs.python3Packages; [ numpy pyqt6 ]; + propagatedBuildInputs = with pkgs.python3Packages; [ + numpy + pyqt6 + ]; }; qtextras = pkgs.python3Packages.buildPythonPackage rec { @@ -88,7 +96,11 @@ hash = "sha256-d1ZotSlOI4surUy0H0N4xHoq94IRQvMHunwRH1uubFg="; }; 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 { @@ -100,7 +112,10 @@ hash = "sha256-jqj8X6H1N5mJQ4OrY5ANqRB0YJByqg/bNneEALWmH1A="; }; buildInputs = [ pkgs.python3Packages.poetry-core ]; - propagatedBuildInputs = [ pyqtgraph pkgs.python3Packages.numpy ]; + propagatedBuildInputs = [ + pyqtgraph + pkgs.python3Packages.numpy + ]; }; thermostat_gui = pkgs.python3Packages.buildPythonPackage { @@ -110,14 +125,23 @@ src = "${self}/pytec"; 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; postFixup = '' wrapQtApp "$out/bin/tec_qt" ''; }; - in { + in + { packages.x86_64-linux = { inherit thermostat thermostat_gui; default = thermostat; @@ -134,11 +158,23 @@ devShells.x86_64-linux.default = pkgs.mkShellNoCC { name = "thermostat-dev-shell"; - packages = with pkgs; [ - rust openocd dfu-util - ] ++ (with python3Packages; [ - numpy matplotlib pyqtgraph setuptools pyqt6 qasync pglive qtextras + packages = + with pkgs; + [ + rust + openocd + dfu-util + ] + ++ (with python3Packages; [ + numpy + matplotlib + pyqtgraph + setuptools + pyqt6 + qasync + pglive + qtextras ]); }; }; -} \ No newline at end of file +}