28 scheme-bytestructures,
36 storeDir ? "/gnu/store",
40 stdenv.mkDerivation rec {
45 url = "mirror://gnu/guix/guix-${version}.tar.gz";
46 hash = "sha256-Q8dpy/Yy7wVEmsH6SMG6FSwzSUxqvH5HE3u6eyFJ+KQ=";
51 name = "CVE-2024-27297_1.patch";
52 url = "https://git.savannah.gnu.org/cgit/guix.git/patch/?id=8f4ffb3fae133bb21d7991e97c2f19a7108b1143";
53 hash = "sha256-xKo1h2uckC2pYHt+memekagfL6dWcF8gOnTOOW/wJUU=";
56 name = "CVE-2024-27297_2.patch";
57 url = "https://git.savannah.gnu.org/cgit/guix.git/patch/?id=ff1251de0bc327ec478fc66a562430fbf35aef42";
58 hash = "sha256-f4KWDVrvO/oI+4SCUHU5GandkGtHrlaM1BWygM/Qlao=";
60 # manual port of build user takeover remediation commit
61 # see https://guix.gnu.org/en/blog/2024/build-user-takeover-vulnerability
62 ./guix-build-user-takeover-fix.patch
66 sed nix/local.mk -i -E \
67 -e "s|^sysvinitservicedir = .*$|sysvinitservicedir = $out/etc/init.d|" \
68 -e "s|^openrcservicedir = .*$|openrcservicedir = $out/etc/openrc|"
107 propagatedBuildInputs = [
122 scheme-bytestructures
126 "--with-store-dir=${storeDir}"
127 "--localstatedir=${stateDir}"
128 "--sysconfdir=${confDir}"
129 "--with-bash-completion-dir=$(out)/etc/bash_completion.d"
132 enableParallelBuilding = true;
135 for f in $out/bin/*; do
137 --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
138 --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
143 inherit (nixosTests) guix;
147 description = "Functional package manager with a Scheme interface";
149 GNU Guix is a purely functional package manager for the GNU system, and a distribution thereof.
150 In addition to standard package management features, Guix supports
151 transactional upgrades and roll-backs, unprivileged package management,
152 per-user profiles, and garbage collection.
153 It provides Guile Scheme APIs, including high-level embedded
154 domain-specific languages (EDSLs), to describe how packages are built
156 A user-land free software distribution for GNU/Linux comes as part of
158 Guix is based on the Nix package manager.
160 homepage = "http://www.gnu.org/software/guix";
161 changelog = "https://git.savannah.gnu.org/cgit/guix.git/plain/NEWS?h=v${version}";
162 license = licenses.gpl3Plus;
163 mainProgram = "guix";
164 maintainers = with maintainers; [
168 platforms = platforms.linux;