From c2245bb9345a690f6573d5fca7289204ebc72beb Mon Sep 17 00:00:00 2001 From: Svenum <43136984+Svenum@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:32:35 +0200 Subject: [PATCH] Add NixOS Flake (#26) * initial * update gitignore * update inputs * add fw-ectool dependencie * add module * fix tabs * fix package * fix typo * fix service * fix type * add options * fix service * fix build inputs * add Readme + add suspend script * remove unneeded }; * fix pkgs.writeShellScript * remvoe \ * try * add self * fix module * update package * fix package * use sleep script * add config options * fix typo * fix typo * add defaults * fix type * add prettyier * remove beautifyer * udpate readme * update installer script * add missing path * Update README.md Co-authored-by: Thomas Eizinger * Update flake.nix Co-authored-by: Thomas Eizinger * Update nix/module.nix Co-authored-by: Thomas Eizinger * add descriptions * fix uninstall * update readme * add description * remove requiremetns.txt + add github actions * update action * rename workflow test * fix service * try * try * Update README.md * Update README.md * chagne flake description * fix suspend script * fix script * fix path * fix install.sh * fix --no-sudo * add --no-sudo to other scripts * fix check * add option check * add missing " * Rename nix action --------- Co-authored-by: Thomas Eizinger --- .gitignore | 2 -- nix/packages/fw-ectool.nix | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 nix/packages/fw-ectool.nix diff --git a/.gitignore b/.gitignore index 87bf8bb..7bb0dc6 100644 --- a/.gitignore +++ b/.gitignore @@ -348,5 +348,3 @@ fabric.properties .idea/caches/build_file_checksums.ser .temp - -/result diff --git a/nix/packages/fw-ectool.nix b/nix/packages/fw-ectool.nix new file mode 100644 index 0000000..1900116 --- /dev/null +++ b/nix/packages/fw-ectool.nix @@ -0,0 +1,43 @@ +{ + 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" ]; + }; +}