···1919 };
20202121 unpackCmd = ''
2222- tar -xf $curSrc contents.tar.gz
2222+ tar -xf $curSrc contents.tar.gz CHECKSUM metadata.config
2323 mkdir contents
2424 tar -C contents -xzf contents.tar.gz
2525+ mv metadata.config contents/hex_metadata.config
2626+2727+ # To make the extracted hex tarballs appear legitimate to mix, we need to
2828+ # make sure they contain not just the contents of contents.tar.gz but also
2929+ # a .hex file with some lock metadata.
3030+ # We use an old version of .hex file per hex's mix_task_test.exs since it
3131+ # is just plain-text instead of an encoded format.
3232+ # See: https://github.com/hexpm/hex/blob/main/test/hex/mix_task_test.exs#L410
3333+ echo -n "${pkg},${version},$(cat CHECKSUM | tr '[:upper:]' '[:lower:]'),hexpm" > contents/.hex
2534 '';
26352736 installPhase = ''
···11-{ lib, stdenv, fetchFromGitHub, cmake }:
11+{ lib, stdenv, fetchFromGitHub, cmake, gitUpdater }:
2233stdenv.mkDerivation rec {
44 pname = "platform-folders";
···1616 cmakeFlags = [
1717 "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
1818 ];
1919+2020+ passthru.updateScript = gitUpdater { };
19212022 meta = with lib; {
2123 description = "A C++ library to look for standard platform directories so that you do not need to write platform-specific code";