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" ]; + }; +}