From 40f7b682943a284950042937ffa65fef63ace8ec Mon Sep 17 00:00:00 2001 From: Svenum <43136984+Svenum@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:16:38 +0200 Subject: [PATCH] Update branch to main branch (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding @Svenum as an assignee to nix-related issues (#43) * Fixing adding @Svenum as an assignee to nix-related issues (#44) (non contributors cannot be assigned to issues) * Reload will report if config couldn't be parsed and the service keeps running. (#46) Authored-by: Nina Alexandra Klama * Removing binary blobs from the project (#51) * removing binary blobs from the project. we now fetch the ectool from the gitlab artifacts and confirm the checksum. * remove bin references from README.md * extracting $TEMP_FOLDER from installEctool * Fix README spelling/grammer, fix "FrameWork" capitalization in service description (#52) * Review README spelling/grammar * Fix "FrameWork" capitalization in service * use ectool form nixpkgs * update flake * remove old deps * remove duplicated pkgs --------- Co-authored-by: LĂ©opold Hubert Co-authored-by: Nina Alexandra Klama Co-authored-by: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com> --- flake.lock | 6 +++--- flake.nix | 6 ------ nix/module.nix | 7 +++--- nix/packages/fw-ectool.nix | 43 ------------------------------------- nix/packages/fw-fanctrl.nix | 5 +++-- 5 files changed, 9 insertions(+), 58 deletions(-) delete mode 100644 nix/packages/fw-ectool.nix diff --git a/flake.lock b/flake.lock index 8de5f21..3f71c3e 100644 --- a/flake.lock +++ b/flake.lock @@ -18,11 +18,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1713564160, - "narHash": "sha256-YguPZpiejgzLEcO36/SZULjJQ55iWcjAmf3lYiyV1Fo=", + "lastModified": 1719234068, + "narHash": "sha256-1AjSIedDC/aERt24KsCUftLpVppW61S7awfjGe7bMio=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bc194f70731cc5d2b046a6c1b3b15f170f05999c", + "rev": "90bd1b26e23760742fdcb6152369919098f05417", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1c8816a..4f319cf 100644 --- a/flake.nix +++ b/flake.nix @@ -18,12 +18,6 @@ localSystem = "x86_64-linux"; }).pkgs.callPackage ./nix/packages/fw-fanctrl.nix {}; - packages.x86_64-linux.fw-ectool = ( - import nixpkgs { - currentSystem = "x86_64-linux"; - localSystem = "x86_64-linux"; - }).pkgs.callPackage ./nix/packages/fw-ectool.nix {}; - nixosModules.default = import ./nix/module.nix; }; } diff --git a/nix/module.nix b/nix/module.nix index 7aa53c9..9cd79ad 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -4,7 +4,6 @@ with lib; with lib.types; let cfg = config.programs.fw-fanctrl; - fw-ectool = pkgs.callPackage ./packages/fw-ectool.nix {}; fw-fanctrl = pkgs.callPackage ./packages/fw-fanctrl.nix {}; defaultConfig = builtins.fromJSON (builtins.readFile ../config.json); in @@ -84,9 +83,9 @@ in config = mkIf cfg.enable { # Install package - environment.systemPackages = [ + environment.systemPackages = with pkgs; [ fw-fanctrl - fw-ectool + ectool ]; # Create config @@ -102,7 +101,7 @@ in Type = "simple"; Restart = "always"; ExecStart = "${fw-fanctrl}/bin/fw-fanctrl --run --config /etc/fw-fanctrl/config.json --no-log"; - ExecStopPost = "${fw-ectool}/bin/ectool autofanctrl"; + ExecStopPost = "${pkgs.ectool}/bin/ectool autofanctrl"; }; enable = true; wantedBy = [ "multi-user.target" ]; diff --git a/nix/packages/fw-ectool.nix b/nix/packages/fw-ectool.nix deleted file mode 100644 index 1900116..0000000 --- a/nix/packages/fw-ectool.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - stdenv, - lib, - autoPatchelfHook, - libusb1, - libftdi1 -}: - -stdenv.mkDerivation { - version = "20-04-2024"; - name = "fw-ectool"; - src = ../../.; - - outputs = [ "out" ]; - - nativeBuildInputs = [ - autoPatchelfHook - ]; - - propagatedBuildInputs = [ - libusb1 - libftdi1 - ]; - - installPhase = '' - mkdir -p $out/bin - runHook preInstall - install -m755 ./bin/ectool $out/bin/ectool - ln -s $out/bin/ectool $out/bin/fw-ectool - chmod -R 755 $out/bin/* - ''; - - doCheck = false; - - meta = with lib; { - mainProgram = "ectool"; - homepage = "https://github.com/TamtamHero/fw-fanctrl"; - description = "fw-ectool customized for fw-fanctrl"; - platforms = with platforms; linux; - license = licenses.bsd3; - maintainers = with maintainers; [ "Svenum" ]; - }; -} diff --git a/nix/packages/fw-fanctrl.nix b/nix/packages/fw-fanctrl.nix index 0e207fa..50df35c 100644 --- a/nix/packages/fw-fanctrl.nix +++ b/nix/packages/fw-fanctrl.nix @@ -4,7 +4,8 @@ python3Packages, python3, bash, callPackage, -getopt +getopt, +ectool }: let @@ -45,7 +46,7 @@ python3Packages.buildPythonPackage rec{ ]; propagatedBuildInputs = [ - (callPackage ./fw-ectool.nix {}) + ectool ]; doCheck = false;