anchor.diff:    '';
   
     postInstall = ''
  -    install	-D utils/flame-chart-json $out/bin/flame-chart-json
  +    install -D utils/flame-chart-json $out/bin/flame-chart-json
     '';
   
     doCheck = true;
     # reproduces the logic of their test script, but without downloading pytest
     # from the internet with pip
  -  checkPhase = with stdenv.lib; concatMapStringsSep "\n" (python: ''
  -    set -x
  -    PYMAJORVERSION=${head (strings.stringToCharacters python.version)} \
  -      PATH=${makeBinPath [ coreutils ]}\
  -      PYTHONPATH= \
  -      ${python.pkgs.pytest}/bin/pytest tests/
  -    set +x
  -  '') (filter (x: x!=null) buildInputs);
  +  checkPhase = let inherit (stdenv) lib; in
  +    lib.concatMapStringsSep "\n" (python: ''
  +      set -x
  +      PYMAJORVERSION=${lib.substring 0 1 python.version} \
  +        PATH=${lib.makeBinPath [ coreutils ]}\
  +        PYTHONPATH= \
  +        ${python.pkgs.pytest}/bin/pytest tests/
  +      set +x
  +    '') (lib.filter (x: x != null) buildInputs);
   
     meta = with stdenv.lib; {
       description = "A ptracing profiler for Python ";
       longDescription = ''
  -      Pyflame is a high performance profiling tool that generates flame graphs for
  -      Python. Pyflame uses the Linux ptrace(2) system call to collect profiling
  -      information. It can take snapshots of the Python call stack without
  -      explicit instrumentation, meaning you can profile a program without
  -      modifying its source code.
  +      Pyflame is a high performance profiling tool that generates flame graphs
  +      for Python. Pyflame uses the Linux ptrace(2) system call to collect
  +      profiling information. It can take snapshots of the Python call stack
  +      without explicit instrumentation, meaning you can profile a program
  +      without modifying its source code.
       '';
       homepage = https://github.com/uber/pyflame;
       license = licenses.asl20;
  
positive.code:     sha256 = "0hz1ryimh0w8zyxx4y8chcn54d6b02spflj5k9rcg26an2chkg2w";
    };
  
    nativeBuildInputs = [ autoreconfHook pkgconfig ];
    buildInputs = [ python36 python2 python35 ];
  
    postPatch = ''
      patchShebangs .
  
negative.code: { stdenv, autoreconfHook, coreutils, fetchFromGitHub, fetchpatch, pkgconfig
  # pyflame needs one python version per ABI
  # are currently supported
  # * 2.6 or 2.7 for 2.x ABI
  # * 3.4 or 3.5 for 3.{4,5} ABI
  # * 3.6        for 3.6 ABI
  # * 3.7        for 3.7+ ABI
  # to disable support for an ABI, make the corresponding argument null
  , python2, python35, python36, python37, python3
  }:
  stdenv.mkDerivation rec {
    pname = "pyflame";
  