-
Notifications
You must be signed in to change notification settings - Fork 1
/
sharp-drm.nix
36 lines (29 loc) · 999 Bytes
/
sharp-drm.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ pkgs, kernel }:
# https://github.com/ardangelo/sharp-drm-driver
pkgs.stdenv.mkDerivation rec {
pname = "sharp-drm";
version = "0.0.1-${kernel.version}";
src = pkgs.fetchFromGitHub {
owner = "ardangelo";
repo = "sharp-drm-driver";
rev = "8bdc22653f0555b286c014dbb95bc8064f9693c4";
sha256 = "sha256-eRj74G3SNwHgMqF9KYfCGLfaf2g+EZSdpIdnKW+FPwI=";
};
hardeningDisable = [ "pic" "format" ];
buildInputs = [ pkgs.nukeReferences ];
nativeBuildInputs = kernel.moduleBuildDependencies;
# Required to build kernel modules with `make`.
LINUX_DIR = "${kernel.dev}/lib/modules/${kernel.version}/build";
installPhase = ''
runHook preInstall
# Install built modules
mkdir -p $out/lib/modules/${kernel.version}/misc
for x in $(find . -name '*.ko'); do
nuke-refs $x
cp $x $out/lib/modules/${kernel.version}/misc/
done
# Copy DTS to output, so we can include in firmware.
cp ./sharp-drm.dts $out
runHook postInstall
'';
}