Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions gpd/win-max-2/2023/bmi260/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:

with lib;

Expand Down Expand Up @@ -28,6 +28,9 @@ in

config = mkIf config.hardware.sensor.iio.bmi260.enable {
boot.extraModulePackages = [ bmi260 ];
boot.kernelModules = [ "bmi260_core" "bmi260_i2c" ];
boot.kernelModules = [
"bmi260_core"
"bmi260_i2c"
];
};
}
25 changes: 13 additions & 12 deletions gpd/win-max-2/2023/bmi260/package.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchurl
, kernel
{
lib,
stdenv,
fetchFromGitHub,
kernel,
}:

stdenv.mkDerivation (finalAttr: {
pname = "bmi260";
version = "0.0.2";
version = "1.0.0";

src = fetchFromGitHub {
owner = "hhd-dev";
repo = finalAttr.pname;
rev = "v${finalAttr.version}";
hash = "sha256-J0npD75QqOGY1QUoznBjQ+jX28gq5u6b0JZOseclwE8=";
hash = "sha256-EFous0pPpCuVoCsFz6/4NryQRSH9Jw9Qng+RY1hiX1c=";
};

hardeningDisable = [ "pic" ];

nativeBuildInputs = kernel.moduleBuildDependencies;

makeFlags = [
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
makeFlags = [ "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];

installPhase = ''
runHook preInstall
Expand All @@ -34,8 +32,11 @@ stdenv.mkDerivation (finalAttr: {

meta = with lib; {
homepage = "https://github.com/hhd-dev/bmi260";
description = "A kernel module driver for the Bosch BMI260 IMU";
license = with licenses; [ bsd3 gpl2Only ];
description = "A kernel driver for the Bosch BMI260 IMU";
license = with licenses; [
bsd3
gpl2Only
];
maintainers = with maintainers; [ Cryolitia ];
platforms = platforms.linux;
};
Expand Down