9 , writeShellApplication
16 # edids = linuxhw-edid-fetcher.override {
17 # displays.PG278Q_2014 = [ "PG278Q" "2560x1440" "2014" ];
20 # "${edids}/lib/firmware/edid/PG278Q_2014.bin";
21 stdenv.mkDerivation rec {
22 pname = "linuxhw-edid-fetcher";
23 version = "0-unstable-2023-05-08";
25 src = fetchFromGitHub {
28 rev = "98bc7d6e2c0eaad61346a8bf877b562fee16efc3";
29 hash = "sha256-+Vz5GU2gGv4QlKO4A6BlKSETxE5GAcehKZL7SEbglGE=";
32 fetch = lib.getExe (writeShellApplication {
33 name = "linuxhw-edid-fetch";
34 runtimeInputs = [ gawk coreutils unixtools.xxd curl gnutar ];
36 repo="''${repo:-"${src}"}"
37 ${builtins.readFile ./linuxhw-edid-fetch.sh}
41 configurePhase = lib.pipe displays [
42 (lib.mapAttrsToList (name: patterns: ''
43 "$fetch" ${lib.escapeShellArgs patterns} > "${name}.bin"
45 (builtins.concatStringsSep "\n")
50 ln -s "$fetch" "$out/bin/"
51 ${lib.optionalString (displays != { }) ''
52 install -D --mode=444 --target-directory="$out/lib/firmware/edid" *.bin
56 passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch=master" ]; };
59 description = "Fetcher for EDID binaries from Linux Hardware Project's EDID repository";
60 homepage = "https://github.com/linuxhw/EDID";
61 license = lib.licenses.cc-by-40;
62 maintainers = with lib.maintainers; [ nazarewk ];
63 platforms = lib.platforms.all;
64 mainProgram = "linuxhw-edid-fetch";