3'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='f0862a357810895dd8759331daeebf9ee5b22d49'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wojtek's customized Guix</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a class='active' href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=f0862a357810895dd8759331daeebf9ee5b22d49'>refs</a><a href='/guix/log/'>log</a><a href='/guix/tree/?id=f0862a357810895dd8759331daeebf9ee5b22d49'>tree</a><a href='/guix/commit/?id=f0862a357810895dd8759331daeebf9ee5b22d49'>commit</a><a href='/guix/diff/?id=f0862a357810895dd8759331daeebf9ee5b22d49'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/'>
<input type='hidden' name='id' value='f0862a357810895dd8759331daeebf9ee5b22d49'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div id='summary'><pre>
# GNU Guix --- Functional package management for GNU
# Copyright © 2018, 2019, 2020, 2022 Ludovic Courtès &lt;ludo@gnu.org&gt;
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see &lt;http://www.gnu.org/licenses/&gt;.

#
# Test &apos;guix build --with-branch&apos;.
#

guix build --version

# &apos;guix build --with-branch&apos; requires access to the network to clone the
# Git repository below.

if ! guile -c &apos;(getaddrinfo &quot;www.gnu.org&quot; &quot;80&quot; AI_NUMERICSERV)&apos; 2&gt; /dev/null
then
    # Skipping.
    exit 77
fi

orig_drv=&quot;`guix build guile-gcrypt -d`&quot;
latest_drv=&quot;`guix build guile-gcrypt --with-branch=guile-gcrypt=master -d`&quot;
test -n &quot;$latest_drv&quot;
test &quot;$orig_drv&quot; != &quot;$latest_drv&quot;

# FIXME: &apos;-S&apos; currently doesn&apos;t work with non-derivation source.
# checkout=&quot;`guix build guile-gcrypt --with-branch=guile-gcrypt=master -S`&quot;
checkout=&quot;`guix gc --references &quot;$latest_drv&quot; | grep guile-gcrypt | grep -v -E &apos;(-builder|\.drv)&apos;`&quot;
test -d &quot;$checkout&quot;
test -f &quot;$checkout/COPYING&quot;

orig_drv=&quot;`guix build guix -d`&quot;
latest_drv=&quot;`guix build guix --with-branch=guile-gcrypt=master -d`&quot;
guix gc -R &quot;$latest_drv&quot; | grep guile-gcrypt-git.master
test &quot;$orig_drv&quot; != &quot;$latest_drv&quot;

v0_1_0_drv=&quot;`guix build guix --with-commit=guile-gcrypt=9e3eacdec1d -d`&quot;
guix gc -R &quot;$v0_1_0_drv&quot; | grep guile-gcrypt-git.9e3eacd
test &quot;$v0_1_0_drv&quot; != &quot;$latest_drv&quot;
test &quot;$v0_1_0_drv&quot; != &quot;$orig_drv&quot;

v0_1_0_drv=&quot;`guix build guix --with-commit=guile-gcrypt=v0.1.0 -d`&quot;
guix gc -R &quot;$v0_1_0_drv&quot; | grep guile-gcrypt-0.1.0
guix gc -R &quot;$v0_1_0_drv&quot; | grep guile-gcrypt-9e3eacd
test &quot;$v0_1_0_drv&quot; != &quot;$latest_drv&quot;
test &quot;$v0_1_0_drv&quot; != &quot;$orig_drv&quot;

guix build guix --with-commit=guile-gcrypt=000 -d &amp;&amp; false

exit 0
</pre>
</div></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
