diff --git a/pkgs/os-specific/linux/system76-acpi/default.nix b/pkgs/os-specific/linux/system76-acpi/default.nix index 299129a7f025..40c8fb09165a 100644 --- a/pkgs/os-specific/linux/system76-acpi/default.nix +++ b/pkgs/os-specific/linux/system76-acpi/default.nix @@ -4,20 +4,17 @@ fetchFromGitHub, kernel, }: -let +stdenv.mkDerivation (finalAttrs: { + name = "system76-acpi-module-${finalAttrs.version}-${kernel.version}"; version = "1.0.2"; - sha256 = "1i7zjn5cdv9h00fgjg46b8yrz4d3dqvfr25g3f13967ycy58m48h"; -in -stdenv.mkDerivation { - name = "system76-acpi-module-${version}-${kernel.version}"; passthru.moduleName = "system76_acpi"; src = fetchFromGitHub { owner = "pop-os"; repo = "system76-acpi-dkms"; - rev = version; - inherit sha256; + tag = finalAttrs.version; + hash = "sha256-EJGKimf+mDSCG6+I7DZuo5GfPVqGPPkcADDtxoqV/8Q="; }; hardeningDisable = [ "pic" ]; @@ -29,14 +26,21 @@ stdenv.mkDerivation { ]; installPhase = '' + runHook preInstall + install -D system76_acpi.ko $out/lib/modules/${kernel.modDirVersion}/misc/system76_acpi.ko mkdir -p $out/lib/udev/hwdb.d mv lib/udev/hwdb.d/* $out/lib/udev/hwdb.d + + runHook postInstall ''; - meta = with lib; { + # GCC 14 makes this an error by default, remove when fixed upstream + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + + meta = { maintainers = with lib.maintainers; [ ahoneybun ]; - license = [ licenses.gpl2Only ]; + license = [ lib.licenses.gpl2Only ]; platforms = [ "i686-linux" "x86_64-linux" @@ -48,4 +52,4 @@ stdenv.mkDerivation { This provides the system76_acpi in-tree driver for systems missing it. ''; }; -} +})