anchor.diff:        --prefix PYTHONPATH : "$PYTHONPATH" \
         --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
         --prefix XDG_DATA_DIRS : "$out/share:${hicolor_icon_theme}/share"
  +
  +    install -Dm644 {.,$out/share/doc/redshift}/redshift.conf.sample
     '';
   
     meta = with stdenv.lib; {
  
positive.code:     (mkFlag vidModeSupport "vidmode")
    ];
  
    preInstall = stdenv.lib.optionalString guiSupport ''
      substituteInPlace src/redshift-gtk/redshift-gtk \
        --replace "/usr/bin/env python3" "${python}/bin/${python.executable}"
  
negative.code: }:
  
  let
    version = "1.11";
    mkFlag = flag: name: if flag
      then "--enable-${name}"
      else "--disable-${name}";
  in
  stdenv.mkDerivation {
    name = "redshift-${version}";
    src = fetchurl {
      sha256 = "0ngkwj7rg8nfk806w0sg443w6wjr91xdc0zisqfm5h2i77wm1qqh";
      url = "https://github.com/jonls/redshift/releases/download/v${version}/redshift-${version}.tar.xz";
    };
  
    buildInputs = [ geoclue2 ]
      ++ stdenv.lib.optionals guiSupport [ hicolor_icon_theme gtk3 python
        pygobject3 pyxdg ]
      ++ stdenv.lib.optionals drmSupport [ libdrm ]
      ++ stdenv.lib.optionals randrSupport [ libxcb ]
      ++ stdenv.lib.optionals vidModeSupport [ libX11 libXxf86vm ];
  