Update `TODO'.
[jackhill/guix/guix.git] / TODO
CommitLineData
6b8875c8
LC
1-*- mode: org; coding: utf-8; -*-
2
c0b3c89f 3Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
6b8875c8
LC
4
5 Copying and distribution of this file, with or without modification,
6 are permitted in any medium without royalty provided the copyright
7 notice and this notice are preserved.
8
9* integrate needed Nix code
10
11Guix uses Nix’s daemon (‘nix-worker’, later renamed to ‘nix-daemon’) to
12actually perform builds, scheduling, substitution of pre-built binaries,
13and GC-related tasks. The daemon mainly uses ‘libstore’ from Nix.
14Integrating it in Guix itself will make Guix self-contained, thereby
15simplifying our users’ lives.
16
a9128eac
LC
17** Remove dependency on OpenSSL
18
19The ‘openssl’ command-line tool is used in libstore to sign store paths
20to be exported, and to check such signatures. The signing keys are
21usually in /etc/nix/signing-key.{pub,sec}. They are a PKCS#8-encoded
22X.509 SubjectPublicKeyInfo. These can be decoded with the [[http://lists.gnu.org/archive/html/help-gnutls/2012-12/msg00012.html][C API of
23GnuTLS]], but not yet with its Guile bindings. There’s also
24‘gnutls_privkey_sign_data’ to sign, and related functions.
25
c0b3c89f
LC
26** Add a binary cache substituter
27
28Like scripts/download-from-binary-cache.pl in Nix, but written in
29Scheme. Substituters allow pre-built binaries to be downloaded when
30they are available from a trusted source.
31
c7e4a72a
LC
32** MAYBE Add a substituter that uses the GNUnet DHT
33
34Would be neat if binaries could be pushed to and pulled from the GNUnet
35DHT. Guix users would sign their binaries, and define which binaries
36they trust.
37
c0b3c89f
LC
38** Add a remote build hook
39
40Like scripts/build-remote.pl in Nix.
41
6b8875c8
LC
42* infrastructure
43
44** have a Hydra instance build Guix packages
45
46[[http://nixos.org/hydra/][Hydra]] is a continuous integration tool based on Nix. It now has
47[[https://github.com/NixOS/hydra/commit/f27ae1d5663680400cb99cfb898970f34d8d21be][Guile/Guix support]], which allows “build recipes” written in Guile using
48Guix to be used directly on Hydra.
49
50For a start, we may use the instance at hydra.nixos.org, generously
51provided by TU Delft. However, in the future, we may want to setup our
52own instance at gnu.org.
53
5fc5c2f3
LC
54* add guix-pull
55
56A tool that fetches the latest code from [[http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz][cgit]], builds a derivation that
57unpacks it, copies only .scm files (this excludes guix/config.in) and
58compiles it, and then links to it from ~/.local/guix/latest . Change
59guix-build and guix-package to have that directory first in their load
60path.
61
c7e4a72a
LC
62* user interface
63** Add a package.el (Emacs) back-end
64
65Unfortunately package.el is monolithic, so most likely we’d have to
66write a new one based on it, as opposed to actually using it.
67
6b8875c8
LC
68* extend <origin>
69** add OpenPGP signatures:
70
71 (origin
72 (method http-fetch)
73 (uri "http://.../foo.tgz")
74 (signature-uri (string-append uri ".sig"))
75 (signer-openpgp-fingerprint "..."))
76
77** allow <origin> to be a derivation/package or a file
78
79* extend <package>
80
81** add support for ‘search-paths’
82
83This should be passed to the build system, to extend package-specific
84search path environment variables–like ‘GUILE_LOAD_PATH’, ‘PERL5LIB’,
85etc.
86
87** add a ‘user-environment-hook’
88
89This should specify builder code to be run when building a user
90environment with ‘guix-package’. For instance, Texinfo’s hook would
91create a new ‘dir’.
92
3036a01f
LC
93** add ‘patches’ there
94
95** extend ‘propagated-build-inputs’ with support for multiple outputs
96
97#+BEGIN_SRC scheme
98 (outputs '("out" "include"))
99 (propagated-build-inputs
100 `(((("i1" ,p1 "o1")
101 ("i2" ,p2))
102 => "include")
103 ("i3" ,p3)))
104#+END_SRC
105
29767aae
LC
106* synchronize package descriptions with the [[http://directory.fsf.org][FSD]] and/or the Womb
107
108Meta-data for GNU packages, including descriptions and synopses, can be
109dumped from the FSD:
110http://directory.fsf.org/wiki?title=GNU/Export&action=purge .
111We could periodically synchronize with that.
112
113The [[./guix/gnu-maintenance.scm][Womb]] also contains synopses for all the GNU packages.
114
6b8875c8
LC
115* support cross-compilation
116
117Implement ‘package-cross-derivation’, and add the corresponding code in
118‘gnu-build-system’. Then, actually bootstrap a cross-compilation
119environment–e.g., a cross-GNU environment.
120
c7e4a72a
LC
121* add a guildhall build system
122
123The Guildhall is Guile’s packaging system. It should be easy to add a
124‘guildhall-build-system’ that does the right thing based on guildhall
125recipes.
126
6b8875c8
LC
127* gnu-build-system: produce a ‘debug’ derivation
128
129Set a .gnu_debuglink in the main derivations to point to the sibling
130file name (only the basename, to not retain a dependency on the ‘debug’
131derivation.)
132
133For /nix/store/xyz-foobar/bin/foo, we should have
134/nix/store/abc-foobar-debug/lib/nix/store/xyz-foobar/bin/foo.debug (info
135"(gdb) Separate Debug Files").
136
137Users should have a default GDB setting with ~/.guix-profile/lib/debug
138as their ‘debug-file-directory’.
139
140* build-expression->derivation: define `%system' in the builder
141
142Would allow build expressions to have system-dependent code, like
143`glibc-dynamic-linker'.
144
145* add ‘allowed-references’ in <package>
146
147[[file:~/src/nix/src/libstore/build.cc::if%20(drv.env.find("allowedReferences")%20!%3D%20drv.env.end())%20{][See how Nix implements that internally]].
148
6b8875c8
LC
149* union
150
151Support sophisticated collision handling when building a union: check
152whether the colliding files are identical, honor per-package priorities,
153etc.
154
155* guix-package
156
6b8875c8
LC
157** add ‘--list-generations’, and ‘--delete-generations’
158** add ‘--upgrade’
6b8875c8
LC
159** add ‘--search’
160
161* guix build utils
162** Add equivalent to "rm -rf"
163** Add equivalent to Nixpkgs's ‘wrapProgram’
29767aae
LC
164** Change ‘patch-shebang’ to DTRT for /usr/bin/env
165
166I.e., replace “#!/usr/bin/env perl” by “#!/nix/store/…/bin/perl”.
167
168** MAYBE Change ‘ld-wrapper’ to add RPATH for libs passed by file name
169
170** MAYBE Add equivalent to chrpath, possibly using [[https://gitorious.org/guile-dlhacks/guile-dlhacks/][guile-dlhacks]]
6b8875c8 171
29767aae 172** MAYBE Add a hash-rewriting thing for deep dependency replacement without rebuild
c7e4a72a
LC
173
174See [[https://github.com/NixOS/nixpkgs/commit/d1662d715514e6ef9d3dc29f132f1b3d8e608a18][Shea Levy's `replace-dependency' in Nixpkgs]].
175
6b8875c8
LC
176* distro
177** choose a name! (Jinn?)
178** port to new GNU/Linux platforms, notably ‘mipsel64-linux’
179** port to GNU/Hurd, aka. ‘i686-gnu’
180
181Problems include that current glibc releases do not build on GNU/Hurd.
182In addition, there haven’t been stable releases of GNU Mach, MiG, and
183Hurd, which would be a pre-condition.
184
185** make a bootable GNU/Linux-Libre distro, with OS configuration EDSL
186
187Similar in spirit to /etc/nixos/configuration.nix.