diff --git a/extra/distro/arch/nightly/PKGBUILD b/extra/distro/arch/nightly/PKGBUILD
index a35dccc3065f145eabf9c0035732060d2a2d5ae1..0a79afd740c5ef2e33826d3d6e48d96af769e153 100644
--- a/extra/distro/arch/nightly/PKGBUILD
+++ b/extra/distro/arch/nightly/PKGBUILD
@@ -1,9 +1,9 @@
 # Maintainer: Tomas Pecka <peckato1 at fit dot cvut dot cz>
 
-pkgname=('algorithms-library-git' 'algorithms-library-gui-git')
+pkgname=('algorithms-library-nightly' 'algorithms-library-gui-nightly')
 pkgbase='automata-library'
 
-pkgver=0.0.0.r515.gc4bc905a4
+pkgver=0.0.0.r521.g362073025
 pkgrel=1
 
 pkgdesc='Theoretical computer science datastructures and algorithms implementation. The library provides graphical and console interface similar to bash with many classical algorithms manipulating automata, grammars, regular expressions, trees and strings.'
@@ -45,7 +45,7 @@ check() {
 	make test ARGS="--output-on-failure"
 }
 
-package_algorithms-library-git() {
+package_algorithms-library-nightly() {
 	depends=('tclap' 'libxml2' 'readline')
 	optdepends=('graphviz: Visualize data structures')
 	provides=('algorithms-library')
@@ -72,8 +72,8 @@ package_algorithms-library-git() {
 	popd
 }
 
-package_algorithms-library-gui-git() {
-	depends=('libxml2' 'qt5-base>=5.7' 'graphviz' 'jsoncpp' 'algorithms-library')
+package_algorithms-library-gui-nightly() {
+	depends=('libxml2' 'qt5-base>=5.7' 'graphviz' 'jsoncpp' "algorithms-library-nightly>=$pkgver" "algorithms-library-nightly<=$pkgver")
 	provides=('algorithms-library-gui')
 	conflicts=('algorithms-library-gui')
 
diff --git a/extra/distro/arch/release/PKGBUILD b/extra/distro/arch/release/PKGBUILD
index bf3853b06937a244c23a735c846df355f8110085..6d721cef21ff703675c499d03ee8db8dd4906058 100644
--- a/extra/distro/arch/release/PKGBUILD
+++ b/extra/distro/arch/release/PKGBUILD
@@ -68,7 +68,7 @@ package_algorithms-library() {
 }
 
 package_algorithms-library-gui() {
-	depends=('libxml2' 'qt5-base>=5.7' 'graphviz' 'jsoncpp' 'algorithms-library')
+	depends=('libxml2' 'qt5-base>=5.7' 'graphviz' 'jsoncpp' "algorithms-library>=$pkgver" "algorithms-library<=$pkgver")
 	provides=('algorithms-library-gui')
 	conflicts=('algorithms-library-gui')