2023-04-29 16:46:19 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gasket";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.0-18-unstable-2023-09-05";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "gasket-driver";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "09385d485812088e04a98a6e1227bf92663e0b59";
|
|
|
|
sha256 = "fcnqCBh04e+w8g079JyuyY2RPu34M+/X+Q8ObE+42i4=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2023-04-29 16:46:19 +00:00
|
|
|
"-C"
|
|
|
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"M=$(PWD)"
|
|
|
|
];
|
|
|
|
buildFlags = [ "modules" ];
|
|
|
|
|
|
|
|
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2023-04-29 16:46:19 +00:00
|
|
|
hardeningDisable = [ "pic" "format" ];
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems";
|
2023-04-29 16:46:19 +00:00
|
|
|
homepage = "https://github.com/google/gasket-driver";
|
2024-06-24 18:47:55 +00:00
|
|
|
license = licenses.gpl2Only;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = [ lib.maintainers.kylehendricks ];
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
broken = versionOlder kernel.version "5.15";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
}
|