2023-04-29 16:46:19 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gasket";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.0-18-unstable-2024-04-25";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "gasket-driver";
|
2024-07-31 10:19:44 +00:00
|
|
|
rev = "5815ee3908a46a415aac616ac7b9aedcb98a504c";
|
|
|
|
sha256 = "O17+msok1fY5tdX1DvqYVw6plkUDF25i8sqwd6mxYf8=";
|
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
|
|
|
};
|
|
|
|
}
|