From 240ef4262b6b3619238d24fae2de34270da6a72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 29 Aug 2023 18:21:46 +0200 Subject: [PATCH] fw-ectool: init at unstable-2022-12-03 --- pkgs/os-specific/linux/fw-ectool/default.nix | 41 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/os-specific/linux/fw-ectool/default.nix diff --git a/pkgs/os-specific/linux/fw-ectool/default.nix b/pkgs/os-specific/linux/fw-ectool/default.nix new file mode 100644 index 000000000000..a73cc1896ecd --- /dev/null +++ b/pkgs/os-specific/linux/fw-ectool/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, fetchFromGitHub +, pkg-config +, hostname +}: + +stdenv.mkDerivation { + pname = "fw-ectool"; + version = "unstable-2022-12-03"; + + src = fetchFromGitHub { + owner = "DHowett"; + repo = "fw-ectool"; + rev = "54c140399bbc3e6a3dce6c9f842727c4128367be"; + hash = "sha256-2teJFz4zcA+USpbVPXMEIHLdmMLem8ik7YrmrSxr/n0="; + }; + + nativeBuildInputs = [ + pkg-config + hostname + ]; + + buildPhase = '' + patchShebangs util + make out=out utils + ''; + + installPhase = '' + install -D out/util/ectool $out/bin/ectool + ''; + + meta = with lib; { + description = "EC-Tool adjusted for usage with framework embedded controller"; + homepage = "https://github.com/DHowett/framework-ec"; + license = licenses.bsd3; + maintainers = [ maintainers.mkg20001 ]; + platforms = platforms.linux; + mainProgram = "ectool"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ea2269aa8a6..1728a0f07ead 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4691,6 +4691,8 @@ with pkgs; cowsay = callPackage ../tools/misc/cowsay { }; + fw-ectool = callPackage ../os-specific/linux/fw-ectool { }; + czkawka = callPackage ../tools/misc/czkawka { inherit (darwin.apple_sdk.frameworks) Foundation; };