Created
August 8, 2019 09:41
-
-
Save eyJhb/b44a6de738965a3e895f456be2683b50 to your computer and use it in GitHub Desktop.
Displaylink patch for NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/udev-installer.sh 2018-12-09 12:05:53.772318942 +0100 | |
+++ b/udev-installer.sh 2018-12-09 12:06:19.939947629 +0100 | |
@@ -24,12 +24,12 @@ systemd_start_stop_functions() | |
cat <<'EOF' | |
start_service() | |
{ | |
- systemctl start displaylink-driver | |
+ @systemd@/bin/systemctl start --no-block dlm | |
} | |
stop_service() | |
{ | |
- systemctl stop displaylink-driver | |
+ @systemd@/bin/systemctl stop dlm | |
} | |
EOF | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
{ | |
nixpkgs.overlays = [ | |
(self: super: { | |
xorg = super.xorg // { | |
xorgserver = super.xorg.xorgserver.overrideAttrs (old: { | |
name = "xorg-server-1.19.6"; | |
src = self.fetchurl{ | |
url = mirror://xorg/individual/xserver/xorg-server-1.19.6.tar.bz2; | |
sha256 = "15y13ihgkggmly5s07vzvpn35gzx1w0hrkbnlcvcy05h3lpm0cm7"; | |
}; | |
}); | |
}; | |
displaylink = super.displaylink.overrideAttrs (old: rec { | |
version = "5.1.26"; | |
name = "displaylink-${version}"; | |
src = super.requireFile rec { | |
name = "displaylink.zip"; | |
sha256 = "0vkjmqd33kn7vlvbz6alnlb8qvf8mar619cv65v5k05kv75vmh6q"; | |
message = "MISSING FILE!"; | |
}; | |
unpackPhase = lib.replaceStrings [old.version] [version] old.unpackPhase; | |
patches = [(self.substituteAll { | |
src = ./displaylink-udev-installer.patch; | |
inherit (pkgs) systemd; | |
})]; | |
}); | |
evdi = super.evdi.overrideAttrs (old: rec { | |
name = "evdi-${version}"; | |
version = "1.6.1"; | |
src = self.fetchFromGitHub { | |
owner = "DisplayLink"; | |
repo = "evdi"; | |
rev = "v${version}"; | |
sha256 = "0jy0ia5fsx54d2wv4d2jqnc8rc5x16781a3bcb857apc47zr387h"; | |
}; | |
}); | |
}) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment