anchor.diff:  
     postUnpack = ''
       sed -i -e "s@getopt@$(type -p getopt)@g" -e "s@sed@$(type -p sed)@g" ${pname}-${version}/scripts/fakeroot.in
  -  '';
  -
  -  postConfigure = let
  -    # additional patch from brew, but needs to be applied to a generated file
  -    patch-wraptmpf = fetchpatch {
  -      name = "fakeroot-patch-wraptmpf-h.patch";
  -      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=766649;filename=fakeroot-patch-wraptmpf-h.patch;msg=20";
  -      sha256 = "1jhsi4bv6nnnjb4vmmmbhndqg719ckg860hgw98bli8m05zwbx6a";
  -    };
  -  in lib.optional stdenv.isDarwin ''
  -    make wraptmpf.h
  -    patch -p1 < ${patch-wraptmpf}
     '';
   
     passthru = {
  
positive.code:     maintainers = with lib.maintainers; [viric];
      platforms = lib.platforms.unix;
    };
  
  }
  
negative.code: { lib
  , stdenv
  , fetchurl
  , fetchpatch
  , getopt
  , libcap
  , gnused
  , nixosTests
  }:
  
  stdenv.mkDerivation rec {
    version = "1.27";
    pname = "fakeroot";
  
    src = fetchurl {
      url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.gz";
      sha256 = "1p5d3jq6l1pzk96agkf05dck7dbgvldx5sg2d4h7d8h230nyni9w";
    };
  
    patches = lib.optionals stdenv.isLinux [
      ./einval.patch
      (fetchpatch {
        name = "also-wrap-stat-library-call.patch";
        url = "https://sources.debian.org/data/main/f/fakeroot/1.27-1/debian/patches/also-wrap-stat-library-call.patch";
        sha256 = "0p7lq6m31k3rqsnjbi06a8ykdqa3cp4y5ngsjyk3q1269gx59x8b";
      })
    ];
  
  