Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ab328ab1b1fe
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7225ce8f4bf7
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 8, 2020

  1. linuxPackages.acpi-call: switch to nix-community fork

    This fixes also build against linux 5.6
    We also took the opportunity to cleanup the build.
    Mic92 committed Apr 8, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    Mic92 Jörg Thalheim
    Copy the full SHA
    7225ce8 View commit details
Showing with 16 additions and 27 deletions.
  1. +16 −27 pkgs/os-specific/linux/acpi-call/default.nix
43 changes: 16 additions & 27 deletions pkgs/os-specific/linux/acpi-call/default.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
{ stdenv, fetchgit, fetchpatch, kernel }:
{ stdenv, fetchFromGitHub, fetchpatch, kernel }:

stdenv.mkDerivation {
name = "acpi-call-${kernel.version}";
name = "acpi-call-2020-04-07-${kernel.version}";

src = fetchgit {
url = "git://github.com/mkottman/acpi_call.git";
rev = "ac67445bc75ec4fcf46ceb195fb84d74ad350d51";
sha256 = "0jl19irz9x9pxab2qp4z8c3jijv2m30zhmnzi6ygbrisqqlg4c75";
src = fetchFromGitHub {
owner = "nix-community";
repo = "acpi_call";
rev = "3d7c9fe5ed3fc5ed5bafd39d54b1fdc7a09ce710";
sha256 = "09kp8zl392h99wjwzqrdw2xcfnsc944hzmfwi8n1y7m2slpdybv3";
};

patches = [
(fetchpatch {
url = "https://github.com/mkottman/acpi_call/pull/67.patch";
sha256 = "0z07apvdl8nvl8iwfk1sl1iidfjyx12fc0345bmp2nq1537kpbri";
})
];

hardeningDisable = [ "pic" ];

nativeBuildInputs = kernel.moduleBuildDependencies;

preBuild = ''
sed -e 's/break/true/' -i examples/turn_off_gpu.sh
sed -e 's@/bin/bash@.bin/sh@' -i examples/turn_off_gpu.sh
sed -e "s@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@" -i Makefile
sed -e 's@acpi/acpi[.]h@linux/acpi.h@g' -i acpi_call.c
'';
makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];

installPhase = ''
mkdir -p $out/lib/modules/${kernel.modDirVersion}/misc
cp acpi_call.ko $out/lib/modules/${kernel.modDirVersion}/misc
mkdir -p $out/bin
cp examples/turn_off_gpu.sh $out/bin/test_discrete_video_off.sh
chmod a+x $out/bin/test_discrete_video_off.sh
install -D acpi_call.ko $out/lib/modules/${kernel.modDirVersion}/misc/acpi_call.ko
install -D -m755 examples/turn_off_gpu.sh $out/bin/test_discrete_video_off.sh
'';

meta = {
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
meta = with stdenv.lib; {
maintainers = with maintainers; [ raskin mic92 ];
inherit (src.meta) homepage;
platforms = platforms.linux;
description = "A module allowing arbitrary ACPI calls; use case: hybrid video";
};
}