diff --git a/pkgs/by-name/xm/xmake/package.nix b/pkgs/by-name/xm/xmake/package.nix index f641be01c91f..ba55f2a309f3 100644 --- a/pkgs/by-name/xm/xmake/package.nix +++ b/pkgs/by-name/xm/xmake/package.nix @@ -1,28 +1,40 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, nix-update-script, + versionCheckHook, }: -stdenv.mkDerivation rec { + +stdenv.mkDerivation (finalAttrs: { pname = "xmake"; - version = "2.9.9"; - src = fetchurl { - url = "https://github.com/xmake-io/xmake/releases/download/v${version}/xmake-v${version}.tar.gz"; - hash = "sha256-6SUFuDvJd2KG6ucZ1YvOp/8ld6/hLLXMsnnIHn28cC0="; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "xmake-io"; + repo = "xmake"; + tag = "v${finalAttrs.version}"; + hash = "sha256-JY94DaSZ12pRrcCPxoPaECRA8rMK6/fNNyr/F8Htu8A="; + fetchSubmodules = true; }; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + passthru = { updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { + changelog = "https://github.com/xmake-io/xmake/releases/tag/v${finalAttrs.version}"; description = "Cross-platform build utility based on Lua"; homepage = "https://xmake.io"; - license = licenses.asl20; - maintainers = with maintainers; [ + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ rewine rennsax ]; + mainProgram = "xmake"; }; -} +})