projects/guix·blob v0.1 · refs

165 lines · 5.6 KiB

1-*- mode: org; coding: utf-8; -*-
2
3Copyright © 2012, 2013 Ludovic Courtès <[email protected]>
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
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
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
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
38** Add a remote build hook
39
40Like scripts/build-remote.pl in Nix.
41
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
54* user interface
55** Add a package.el (Emacs) back-end
56
57Unfortunately package.el is monolithic, so most likely we’d have to
58write a new one based on it, as opposed to actually using it.
59
60* extend <origin>
61** add OpenPGP signatures:
62
63 (origin
64 (method http-fetch)
65 (uri "http://.../foo.tgz")
66 (signature-uri (string-append uri ".sig"))
67 (signer-openpgp-fingerprint "..."))
68
69** allow <origin> to be a derivation/package or a file
70
71* extend <package>
72
73** add support for ‘search-paths’
74
75This should be passed to the build system, to extend package-specific
76search path environment variables–like ‘GUILE_LOAD_PATH’, ‘PERL5LIB’,
77etc.
78
79** add a ‘user-environment-hook’
80
81This should specify builder code to be run when building a user
82environment with ‘guix-package’. For instance, Texinfo’s hook would
83create a new ‘dir’.
84
85** add ‘patches’ there
86
87** extend ‘propagated-build-inputs’ with support for multiple outputs
88
89#+BEGIN_SRC scheme
90 (outputs '("out" "include"))
91 (propagated-build-inputs
92 `(((("i1" ,p1 "o1")
93 ("i2" ,p2))
94 => "include")
95 ("i3" ,p3)))
96#+END_SRC
97
98* support cross-compilation
99
100Implement ‘package-cross-derivation’, and add the corresponding code in
101‘gnu-build-system’. Then, actually bootstrap a cross-compilation
102environment–e.g., a cross-GNU environment.
103
104* add a guildhall build system
105
106The Guildhall is Guile’s packaging system. It should be easy to add a
107‘guildhall-build-system’ that does the right thing based on guildhall
108recipes.
109
110* gnu-build-system: produce a ‘debug’ derivation
111
112Set a .gnu_debuglink in the main derivations to point to the sibling
113file name (only the basename, to not retain a dependency on the ‘debug’
114derivation.)
115
116For /nix/store/xyz-foobar/bin/foo, we should have
117/nix/store/abc-foobar-debug/lib/nix/store/xyz-foobar/bin/foo.debug (info
118"(gdb) Separate Debug Files").
119
120Users should have a default GDB setting with ~/.guix-profile/lib/debug
121as their ‘debug-file-directory’.
122
123* build-expression->derivation: define `%system' in the builder
124
125Would allow build expressions to have system-dependent code, like
126`glibc-dynamic-linker'.
127
128* add ‘allowed-references’ in <package>
129
130[[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]].
131
132* union
133
134Support sophisticated collision handling when building a union: check
135whether the colliding files are identical, honor per-package priorities,
136etc.
137
138* guix-package
139
140** add ‘--roll-back’
141** add ‘--list-generations’, and ‘--delete-generations’
142** add ‘--upgrade’
143** add ‘--search’
144
145* guix build utils
146** Add equivalent to "rm -rf"
147** Add equivalent to Nixpkgs's ‘wrapProgram’
148** Add equivalent to chrpath, possibly using [[https://gitorious.org/guile-dlhacks/guile-dlhacks/][guile-dlhacks]]
149
150** Add a hash-rewriting thing for deep dependency replacement without rebuild
151
152See [[https://github.com/NixOS/nixpkgs/commit/d1662d715514e6ef9d3dc29f132f1b3d8e608a18][Shea Levy's `replace-dependency' in Nixpkgs]].
153
154* distro
155** choose a name! (Jinn?)
156** port to new GNU/Linux platforms, notably ‘mipsel64-linux’
157** port to GNU/Hurd, aka. ‘i686-gnu’
158
159Problems include that current glibc releases do not build on GNU/Hurd.
160In addition, there haven’t been stable releases of GNU Mach, MiG, and
161Hurd, which would be a pre-condition.
162
163** make a bootable GNU/Linux-Libre distro, with OS configuration EDSL
164
165Similar in spirit to /etc/nixos/configuration.nix.