anchor.diff:    #   we use $LD_LIBRARY_PATH instead.
     buildPhase = ''
       patchShebangs .
  -    mkdir -p "$out"
  -    sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.libPrefix}/site-packages\"|" -i SConstruct
  +    sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonPackages.python.libPrefix}/site-packages\"|" -i SConstruct
       scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \
           systemd=yes udevdir="$out/lib/udev" chrpath=no
     '';
  -
  -  doCheck = false;
   
     checkPhase = ''
       export LD_LIBRARY_PATH="$PWD"
  
positive.code: 
    # TODO: the udev rules file and the hotplug script need fixes to work on NixOS
    installPhase = ''
      scons install
      mkdir -p "$out/lib/udev/rules.d"
      scons udev-install
    '';
  
    postInstall = "wrapPythonPrograms";
  
    meta = with stdenv.lib; {
      description = "GPS service daemon";
  
negative.code:     homepage = http://catb.org/gpsd/;
      license = "BSD-style";
      platforms = platforms.linux;
      maintainers = with maintainers; [ bjornfor rasendubi ];
    };
  }
  