python312Packages.lottie: 0.7.0 -> 0.7.1 (#361686)
[NixPkgs.git] / pkgs / os-specific / linux / gasket / default.nix
blob65516be7dcd17f6ea22824610a31281751f52da7
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   fetchpatch2,
6   kernel
7 }:
9 stdenv.mkDerivation rec {
10   pname = "gasket";
11   version = "1.0-18-unstable-2024-04-25";
13   src = fetchFromGitHub {
14     owner = "google";
15     repo = "gasket-driver";
16     rev = "5815ee3908a46a415aac616ac7b9aedcb98a504c";
17     sha256 = "O17+msok1fY5tdX1DvqYVw6plkUDF25i8sqwd6mxYf8=";
18   };
20   patches = [
21     (fetchpatch2 {
22       # https://github.com/google/gasket-driver/issues/36
23       # https://github.com/google/gasket-driver/pull/35
24       name = "linux-6.12-compat.patch";
25       url = "https://github.com/google/gasket-driver/commit/4b2a1464f3b619daaf0f6c664c954a42c4b7ce00.patch";
26       hash = "sha256-UOoOSEnpUMa4QXWVFpGFxBoF5szXaLEfcWtfKatO5XY=";
27     })
28   ];
30   postPatch = ''
31     cd src
32   '';
34   makeFlags = kernel.makeFlags ++ [
35     "-C"
36     "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
37     "M=$(PWD)"
38   ];
39   buildFlags = [ "modules" ];
41   installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
42   installTargets = [ "modules_install" ];
44   hardeningDisable = [ "pic" "format" ];
45   nativeBuildInputs = kernel.moduleBuildDependencies;
47   meta = with lib; {
48     description = "Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems";
49     homepage = "https://github.com/google/gasket-driver";
50     license = licenses.gpl2Only;
51     maintainers = [ lib.maintainers.kylehendricks ];
52     platforms = platforms.linux;
53     broken = versionOlder kernel.version "5.15";
54   };