Commit 75a7e0ed authored by Yureka's avatar Yureka
Browse files

gem-config: patch getconf path in prometheus-client-mmap

parent edc47cb9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -283,6 +283,15 @@ in
    meta.mainProgram = "rbprettier";
  };

  prometheus-client-mmap = attrs: {
    dontBuild = false;
    postPatch = let
      getconf = if stdenv.hostPlatform.isGnu then stdenv.cc.libc else getconf;
    in ''
      substituteInPlace lib/prometheus/client/page_size.rb --replace "getconf" "${lib.getBin getconf}/bin/getconf"
    '';
  };

  glib2 = attrs: {
    nativeBuildInputs = [ pkg-config ]
      ++ lib.optionals stdenv.isDarwin [ DarwinTools ];