11{
22 lib ,
33 stdenv ,
4- fetchurl ,
5- fetchpatch ,
6- fetchDebianPatch ,
4+ fetchgit ,
5+ graphviz ,
6+ gettext ,
77 autoreconfHook ,
88 disarchive ,
99 git ,
2727 pkg-config ,
2828 po4a ,
2929 scheme-bytestructures ,
30+ slirp4netns ,
3031 texinfo ,
3132 bzip2 ,
3233 libgcrypt ,
3738 storeDir ? "/gnu/store" ,
3839 confDir ? "/etc" ,
3940} :
40-
41+ let
42+ rev = "30a5d140aa5a789a362749d057754783fea83dde" ;
43+ in
4144stdenv . mkDerivation rec {
4245 pname = "guix" ;
43- version = "1.4.0" ;
46+ version = "1.4.0-unstable-2025-06-24 " ;
4447
45- src = fetchurl {
46- url = "mirror://gnu/guix/guix-${ version } .tar.gz" ;
47- hash = "sha256-Q8dpy/Yy7wVEmsH6SMG6FSwzSUxqvH5HE3u6eyFJ+KQ=" ;
48+ src = fetchgit {
49+ url = "https://codeberg.org/guix/guix.git" ;
50+ inherit rev ;
51+ hash = "sha256-QsOYApnwA2hb1keSv6p3EpMT09xCs9uyoSeIdXzftF0=" ;
4852 } ;
4953
5054 patches = [
51- ( fetchpatch {
52- name = "CVE-2024-27297_1.patch" ;
53- url = "https://git.savannah.gnu.org/cgit/guix.git/patch/?id=8f4ffb3fae133bb21d7991e97c2f19a7108b1143" ;
54- hash = "sha256-xKo1h2uckC2pYHt+memekagfL6dWcF8gOnTOOW/wJUU=" ;
55- } )
56- ( fetchpatch {
57- name = "CVE-2024-27297_2.patch" ;
58- url = "https://git.savannah.gnu.org/cgit/guix.git/patch/?id=ff1251de0bc327ec478fc66a562430fbf35aef42" ;
59- hash = "sha256-f4KWDVrvO/oI+4SCUHU5GandkGtHrlaM1BWygM/Qlao=" ;
60- } )
61- # see https://guix.gnu.org/en/blog/2024/build-user-takeover-vulnerability
62- ( fetchDebianPatch {
63- inherit pname version ;
64- debianRevision = "8" ;
65- patch = "security/0101-daemon-Sanitize-failed-build-outputs-prior-to-exposi.patch" ;
66- hash = "sha256-cbra/+K8+xHUJrCKRgzJCuhMBpzCSjgjosKAkJx7QIo=" ;
67- } )
68- ( fetchDebianPatch {
69- inherit pname version ;
70- debianRevision = "8" ;
71- patch = "security/0102-daemon-Sanitize-successful-build-outputs-prior-to-ex.patch" ;
72- hash = "sha256-mOnlYtpIuYL+kDvSNuXuoDLJP03AA9aI2ALhap+0NOM=" ;
73- } )
74- ( fetchpatch {
75- name = "fix-guile-ssh-detection.patch" ;
76- url = "https://git.savannah.gnu.org/cgit/guix.git/patch/?id=b8a45bd0473ab2ba9b96b7ef429a557ece9bf06c" ;
77- hash = "sha256-oYkgM694qPK8kqgxatkr4fj/GL73ozTNQADNyDeU6WY=" ;
78- } )
55+ ./missing-cstdint-include.patch
7956 ] ;
8057
8158 postPatch = ''
@@ -90,6 +67,8 @@ stdenv.mkDerivation rec {
9067 autoreconfHook
9168 disarchive
9269 git
70+ graphviz
71+ gettext
9372 glibcLocales
9473 guile
9574 guile-avahi
@@ -110,6 +89,7 @@ stdenv.mkDerivation rec {
11089 pkg-config
11190 po4a
11291 scheme-bytestructures
92+ slirp4netns
11393 texinfo
11494 ] ;
11595
@@ -136,6 +116,7 @@ stdenv.mkDerivation rec {
136116 guile-zlib
137117 guile-zstd
138118 scheme-bytestructures
119+ slirp4netns
139120 ] ;
140121
141122 configureFlags = [
@@ -145,6 +126,11 @@ stdenv.mkDerivation rec {
145126 "--with-bash-completion-dir=$(out)/etc/bash_completion.d"
146127 ] ;
147128
129+ preAutoreconf = ''
130+ echo ${ version } > .tarball-version
131+ ./bootstrap
132+ '' ;
133+
148134 enableParallelBuilding = true ;
149135
150136 postInstall = ''
@@ -174,8 +160,8 @@ stdenv.mkDerivation rec {
174160 Guix.
175161 Guix is based on the Nix package manager.
176162 '' ;
177- homepage = "http ://www .gnu.org/software/guix " ;
178- changelog = "https://git.savannah.gnu. org/cgit /guix.git/plain/NEWS?h=v ${ version } " ;
163+ homepage = "https ://guix .gnu.org/" ;
164+ changelog = "https://codeberg. org/guix /guix/raw/commit/ ${ rev } /NEWS " ;
179165 license = lib . licenses . gpl3Plus ;
180166 mainProgram = "guix" ;
181167 maintainers = with lib . maintainers ; [
0 commit comments