{ stdenv, papi, }: if stdenv.hostPlatform == stdenv.buildPlatform then papi else papi.overrideAttrs (old: { configureFlags = (old.configureFlags or [ ]) ++ [ "--enable-perf_event_uncore=no" "--with-ffsll" "--with-tls=__thread" "--with-virtualtimer=clock_thread_cputime_id" "--with-walltimer=clock_realtime_hr" ]; })