Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on GitHub to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: <!-- The current version can be found easily with the same process as above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: weekly.2021.51 desired version: weekly.2022.19 maintainers: Could some sort of auto-updater be in for this?
Current PR regarding this is
I saw that PR, but for some of my projects I need the latest version as it has some features I need. Thought I'd make an issue. What about auto-updating, btw?
I'm not sure, superficially I think it would be okay though. vlang is rather fast-moving, and that's both a good reason to auto-update, and a bad reason as there may be breaking changes regarding packaging it.
Yeah, good point. I still think that auto-updating is just a good idea so that issues like this don't have to be created.

Discussion:
stdenv.mkDerivation rec { pname = "vlang"; <del> version = "weekly.2021.51"; </del> <ins> version = "weekly.2022.19"; </ins> src = fetchFromGitHub { owner = "vlang"; repo = "v"; rev = version; <del> sha256 = "1jvq3fxckl2jidiigkvclacjxbg5k38268mck7bl1ky1yspgfrnq"; </del> <ins> sha256 = "1bl91j3ip3i84jq3wg03sflllxv38sv4dc072r302rl2g9f4dbg6"; </ins> }; <ins> # Required for bootstrap. </ins> vc = fetchFromGitHub { owner = "vlang"; repo = "vc"; <del> rev = "c8ed2cd82b247e94c33217dba35c420cfc02fef3"; sha256 = "1acgx1qp480jmsv1xvqy1zf7iyy90mvg9x1m1b0zrwx09wz4y1cq"; </del> <ins> rev = "a298ad7069f6333ef8ab59a616654fc74e04c847"; sha256 = "168cgq6451hcgsxzyd8vq11g01642bs5kkwxqh6rz3rnc86ajic0"; </ins> }; <ins> # Required for vdoc. markdown = fetchFromGitHub { owner = "vlang"; repo = "markdown"; rev = "bbbd324a361e404ce0682fc00666df3a7877b398"; sha256 = "0cawzizr3rjz81blpvxvxrcvcdai1adj66885ss390444qq1fnv7"; }; # vcreate_test.v requires git, so we must disable it. patches = [ ./disable_vcreate_test.patch ]; </ins> propagatedBuildInputs = [ glfw freetype openssl ] ++ lib.optional stdenv.hostPlatform.isUnix upx;

makeFlags = [ "local=1" "VC=${vc}" <del> # vlang seems to want to write to $HOME/.vmodules , so lets give # it a writable HOME "HOME=$TMPDIR" </del> ]; <ins> prePatch = '' export HOME=$(mktemp -d) cp cmd/tools/vcreate_test.v $HOME/vcreate_test.v ''; </ins> installPhase = '' runHook preInstall mkdir -p $out/{bin,lib,share} cp -r examples $out/share cp -r {cmd,vlib,thirdparty} $out/lib <del> mv v $out/lib </del> <ins> cp v $out/lib </ins> ln -s $out/lib/v $out/bin/v wrapProgram $out/bin/v --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]} <ins> mkdir -p $HOME/.vmodules; ln -sf ${markdown} $HOME/.vmodules/markdown $out/lib/v -v build-tools $out/lib/v -v $out/lib/cmd/tools/vdoc $out/lib/v -v $out/lib/cmd/tools/vast $out/lib/v -v $out/lib/cmd/tools/vvet # Return the pre-patch vcreate_test.v now that we no longer need the alteration. cp $HOME/vcreate_test.v $out/lib/cmd/tools/vcreate_test.v </ins> runHook postInstall '';

<ins> diff --git a/cmd/tools/vcreate_test.v b/cmd/tools/vcreate_test.v index 3d07f4773..de8a202df 100644 --- a/cmd/tools/vcreate_test.v +++ b/cmd/tools/vcreate_test.v @@ -2,127 +2,6 @@ import os const test_path = 'vcreate_test' -fn init_and_check() ? { -	os.execute_or_exit('${os.quoted_path(@VEXE)} init') - -	assert os.read_file('vcreate_test.v') ? == [ -		'module mainn', -		'fn main() {', -		"	println('Hello World!')", -		'}', -		'', -	].join_lines() - -	assert os.read_file('v.mod') ? == [ -		'Module {', -		"	name: 'vcreate_test'", -		"	description: ''", -		"	version: ''", -		"	license: ''", -		'	dependencies: []', -		'}', -		'', -	].join_lines() - -	assert os.read_file('.gitignore') ? == [ -		'# Binaries for programs and plugins', -		'main', -		'vcreate_test', -		'*.exe', -		'*.exe~', -		'*.so', -		'*.dylib', -		'*.dll', -		'vls.log', -		'', -	].join_lines() - -	assert os.read_file('.gitattributes') ? == [ -		'*.v linguist-language=V text=auto eol=lf', -		'*.vv linguist-language=V text=auto eol=lf', -		'*.vsh linguist-language=V text=auto eol=lf', -		'**/v.mod linguist-language=V text=auto eol=lf', -		'', -	].join_lines() - -	assert os.read_file('.editorconfig') ? == [ -		'[*]', -		'charset = utf-8', -		'end_of_line = lf', -		'insert_final_newline = true', -		'trim_trailing_whitespace = true', -		'', -		'[*.v]', -		'indent_style = tab', -		'indent_size = 4', -		'', -	].join_lines() -} - fn test_v_init() ? { -	dir := os.join_path(os.temp_dir(), test_path) -	os.rmdir_all(dir) or {} -	os.mkdir(dir) or {} -	defer { -		os.rmdir_all(dir) or {} -	} -	os.chdir(dir) ? - -	init_and_check() ? -} - -fn test_v_init_in_git_dir() ? { -	dir := os.join_path(os.temp_dir(), test_path) -	os.rmdir_all(dir) or {} -	os.mkdir(dir) or {} -	defer { -		os.rmdir_all(dir) or {} -	} -	os.chdir(dir) ? -	os.execute_or_exit('git init .') -	init_and_check() ? -} - -fn test_v_init_no_overwrite_gitignore() ? { -	dir := os.join_path(os.temp_dir(), test_path) -	os.rmdir_all(dir) or {} -	os.mkdir(dir) or {} -	os.write_file('$dir/.gitignore', 'blah') ? -	defer { -		os.rmdir_all(dir) or {} -	} -	os.chdir(dir) ? - -	os.execute_or_exit('${os.quoted_path(@VEXE)} init') - -	assert os.read_file('.gitignore') ? == 'blah' -} - -fn test_v_init_no_overwrite_gitattributes_and_editorconfig() ? { -	git_attributes_content := '*.v linguist-language=V text=auto eol=lf' -	editor_config_content := '[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.v] -indent_style = tab -indent_size = 4 -' - -	dir := os.join_path(os.temp_dir(), test_path) -	os.rmdir_all(dir) or {} -	os.mkdir(dir) or {} -	os.write_file('$dir/.gitattributes', git_attributes_content) ? -	os.write_file('$dir/.editorconfig', editor_config_content) ? -	defer { -		os.rmdir_all(dir) or {} -	} -	os.chdir(dir) ? - -	os.execute_or_exit('${os.quoted_path(@VEXE)} init') - -	assert os.read_file('.gitattributes') ? == git_attributes_content -	assert os.read_file('.editorconfig') ? == editor_config_content +	println('vcreate_test disabled') } </ins>