anchor.diff:  { stdenv
  +, lib
   , fetchFromGitHub
   , curl
   , json_c
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "google-compute-engine-oslogin";
    version = "1.5.3";
    # from packages/google-compute-engine-oslogin/packaging/debian/changelog
  
    src = fetchFromGitHub {
      owner = "GoogleCloudPlatform";
      repo = "compute-image-packages";
      rev = "20190522";
      sha256 = "16jbbrnz49g843h813r408dbvfa2hicf8canxwbfxr2kzhv7ycmm";
    };
    sourceRoot = "source/packages/google-compute-engine-oslogin";
  
    postPatch = ''
      # change sudoers dir from /var/google-sudoers.d to /run/google-sudoers.d (managed through systemd-tmpfiles)
      substituteInPlace pam_module/pam_oslogin_admin.cc --replace /var/google-sudoers.d /run/google-sudoers.d
      # fix "User foo not allowed because shell /bin/bash does not exist"
      substituteInPlace compat.h --replace /bin/bash ${bashInteractive}/bin/bash
    '';
  
    buildInputs = [ curl.dev pam ];
  
negative.code:   NIX_CFLAGS_COMPILE="-I${json_c.dev}/include/json-c";
    NIX_CFLAGS_LINK="-L${json_c}/lib";
  
    makeFlags = [
      "VERSION=${version}"
      "DESTDIR=${placeholder "out"}"
      "PREFIX=/"
      "BINDIR=/bin"
      "LIBDIR=/lib"
      "PAMDIR=/lib"
      "MANDIR=/share/man"
    ];
  
    enableParallelBuilding = true;
  
  