displaylink: add missing phase hooks

This commit is contained in:
Pol Dellaiera 2024-01-31 18:00:28 +01:00
parent 859ee774e1
commit 1551a2e3e2
No known key found for this signature in database
GPG key ID: D476DFE9C67467CA

View file

@ -41,12 +41,15 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ unzip makeWrapper ];
unpackPhase = ''
runHook preUnpack
unzip $src
chmod +x displaylink-driver-${finalAttrs.version}.run
./displaylink-driver-${finalAttrs.version}.run --target . --noexec --nodiskspace
runHook postUnpack
'';
installPhase = ''
runHook preInstall
install -Dt $out/lib/displaylink *.spkg
install -Dm755 ${bins}/DisplayLinkManager $out/bin/DisplayLinkManager
mkdir -p $out/lib/udev/rules.d $out/share
@ -60,6 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
# We introduce a dependency on the source file so that it need not be redownloaded everytime
echo $src >> "$out/share/workspace_dependencies.pin"
runHook postInstall
'';
dontStrip = true;