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;