diff --git a/cros-ectool.nix b/cros-ectool.nix new file mode 100644 index 00000000..ac0cf1aa --- /dev/null +++ b/cros-ectool.nix @@ -0,0 +1,25 @@ +{ stdenv, pkgs, lib }: + +pkgs.stdenv.mkDerivation rec { + name = "cros-ectool"; + nativeBuildInputs = with pkgs; [ cmake ninja pkg-config libusb1 libftdi1 ]; + src = pkgs.fetchFromGitLab { + domain = "gitlab.howett.net"; + owner = "DHowett"; + repo = "ectool"; + rev = "39d64fb0e79e874cfe9877af69158fc2520b1a80"; + hash = lib.fakeHash; + }; + installPhase = '' + mkdir -p $out/bin + cp src/ectool $out/bin/ectool + ''; + meta = with lib; { + description = "ectool for ChromeOS devices"; + homepage = "https://gitlab.howett.net/DHowett/ectool"; + license = licenses.bsd3; + maintainers = with maintainers; [ ChocolateLoverRaj ]; + platforms = platforms.linux; + mainProgram = "ectool"; + }; +} diff --git a/flake.nix b/flake.nix index 915a4437..d3cad791 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ gtk-doc gdb valgrind + (pkgs.callPackage ./cros-ectool.nix { }) # Add libfprint with an override (pkgs.libfprint.overrideAttrs (oldAttrs: {