diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index f30417b86446..b6c018693e5e 100644 --- a/pkgs/development/tools/mold/default.nix +++ b/pkgs/development/tools/mold/default.nix @@ -17,22 +17,33 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "rui314"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-i4+MOEZWt+Qb05HgXcGR0uDuMoOAyMhVeLPQwnGiEw8="; }; - nativeBuildInputs = [ cmake ninja ]; + nativeBuildInputs = [ + cmake + ninja + ]; - buildInputs = [ openssl zlib ] - ++ lib.optionals (!stdenv.isDarwin) [ mimalloc ]; + buildInputs = [ + openssl + zlib + ] ++ lib.optionals (!stdenv.isDarwin) [ + mimalloc + ]; postPatch = '' sed -i CMakeLists.txt -e '/.*set(DEST\ .*/d' ''; - cmakeFlags = [ "-DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON" ]; + cmakeFlags = [ + "-DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON" + ]; - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-faligned-allocation" ]; + NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + "-faligned-allocation" + ]; passthru.tests.version = testers.testVersion { package = mold; }; @@ -45,6 +56,7 @@ stdenv.mkDerivation rec { rapid debug-edit-rebuild cycles. ''; homepage = "https://github.com/rui314/mold"; + changelog = "https://github.com/rui314/mold/releases/tag/v${version}"; license = licenses.agpl3Plus; maintainers = with maintainers; [ azahi nitsky ]; platforms = platforms.unix;