From eb0f101b8aa0b704e103164699350fd3914c298c Mon Sep 17 00:00:00 2001 From: Kyle Hendricks Date: Sat, 1 Apr 2023 20:30:12 -0400 Subject: [PATCH] gasket: init at 1.0-18 Added this driver as it's needed to use the Google Coral EdgeTPU. --- pkgs/os-specific/linux/gasket/default.nix | 35 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/os-specific/linux/gasket/default.nix diff --git a/pkgs/os-specific/linux/gasket/default.nix b/pkgs/os-specific/linux/gasket/default.nix new file mode 100644 index 000000000000..1f9d60ad7b60 --- /dev/null +++ b/pkgs/os-specific/linux/gasket/default.nix @@ -0,0 +1,35 @@ +{ stdenv, lib, fetchFromGitHub, kernel }: + +stdenv.mkDerivation rec { + pname = "gasket"; + version = "1.0-18"; + + src = fetchFromGitHub { + owner = "google"; + repo = "gasket-driver"; + rev = "97aeba584efd18983850c36dcf7384b0185284b3"; + sha256 = "pJwrrI7jVKFts4+bl2xmPIAD01VKFta2SRuElerQnTo="; + }; + + makeFlags = [ + "-C" + "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "M=$(PWD)" + ]; + buildFlags = [ "modules" ]; + + installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; + installTargets = [ "modules_install" ]; + + sourceRoot = "source/src"; + hardeningDisable = [ "pic" "format" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + meta = with lib; { + description = "The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems."; + homepage = "https://github.com/google/gasket-driver"; + license = licenses.gpl2; + maintainers = [ lib.maintainers.kylehendricks ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3181f644ef6..cda6915853e7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26204,6 +26204,10 @@ with pkgs; fwts = callPackage ../os-specific/linux/fwts { }; + gasket = callPackage ../os-specific/linux/gasket { + inherit (linuxPackages) kernel; + }; + gobi_loader = callPackage ../os-specific/linux/gobi_loader { }; libossp_uuid = callPackage ../development/libraries/libossp-uuid { };