Commit graph

12883 commits

Author SHA1 Message Date
Vincent Ambo
b23609fb69 Add ac-nrepl to packages 2013-08-19 00:46:54 +02:00
Vincent Ambo
32fdafedcc Global autocomplete mode 2013-08-19 00:46:15 +02:00
Vincent Ambo
15f83cc78f * Fixed eshell pwd function
* Minor changes
2013-08-17 20:43:05 +02:00
Eelco Dolstra
46222bbc43 Typo 2013-08-14 22:32:49 +02:00
Shea Levy
58204a3c39 corepkgs/nar.nix: Prefer local builds
nar.nix's builder depends on coreutils and nix itself being in $PATH.
Unfortunately, there's no good way to ensure that these packages exist
in the same place on the remote machine: The local machine may have nix
installed in /usr, and the remote machine in /usr/local, but the
generated nar.sh builder will refer to /usr and thus fail on the remote
machine. This ensures that nar.sh is run on the same machine that
instantiates it.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-08-14 22:32:41 +02:00
Vincent Ambo
996c5867e6 Highlight DEBUG 2013-08-08 00:54:35 +02:00
Eelco Dolstra
3fb7ae0586 Respect MINSIGSTKSZ when allocating an alternative stack
http://hydra.nixos.org/build/5663577
2013-08-07 15:44:19 +00:00
Eelco Dolstra
161a2ccf7a Fix build on non-Linux
http://hydra.nixos.org/build/5662914
2013-08-07 17:26:41 +02:00
Eelco Dolstra
a583a2bc59 Run the daemon worker on the same CPU as the client
On a system with multiple CPUs, running Nix operations through the
daemon is significantly slower than "direct" mode:

$ NIX_REMOTE= nix-instantiate '<nixos>' -A system
real    0m0.974s
user    0m0.875s
sys     0m0.088s

$ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system
real    0m2.118s
user    0m1.463s
sys     0m0.218s

The main reason seems to be that the client and the worker get moved
to a different CPU after every call to the worker.  This patch adds a
hack to lock them to the same CPU.  With this, the overhead of going
through the daemon is very small:

$ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system
real    0m1.074s
user    0m0.809s
sys     0m0.098s
2013-08-07 14:02:04 +02:00
Vincent Ambo
494cda1ac0 Require a final newline on both visiting and saving a file 2013-08-07 00:58:14 +02:00
Vincent Ambo
503600091e * Providing all init files, loading them with require
* Moved load-file-if-exists to init-functions
* Added init-misc.el for random things that don't fit anywhere else
* Never any tabs, ever. Go away!

Bindings:
* quit Emacs -> C-x r q ("real quit")
* delete-frame -> C-x C-c
* make-frame -> C-x C-n
2013-08-07 00:49:20 +02:00
Vincent Ambo
43a99dea3a * moved switch-window and iy-go-to-char to package.el installs
* changed 'custom-clone-git and 'custom-download-script to place things in special folders
* added those folders and some other things to .gitignore
* changed binding for iy-go-to-char to C-c f
2013-08-06 23:46:26 +02:00
Eelco Dolstra
263d668222 Set the default GCC optimisation level to -O3 2013-08-06 14:21:46 +02:00
Eelco Dolstra
fd7d979c79 Remove obsolete reference to ATerms 2013-08-06 14:15:11 +02:00
Vincent Ambo
52d2182fa2 Switched M-j to ace-jump-word-mode, hopping to a character is very rarely my requirement. 2013-08-06 13:27:26 +02:00
Vincent Ambo
9ae4bc6a27 Made custom-clone-git asynchronous 2013-08-06 13:12:24 +02:00
Vincent Ambo
262abd3ead This was an invalid hook being added. 2013-08-06 11:16:15 +02:00
Vincent Ambo
152faa5421 Removed tumblesocks from packages, I'll load it locally 2013-08-05 16:47:40 +02:00
Vincent Ambo
2d27485f36 * Global undo-tree (again)
* several config things copied from @magnars
2013-08-05 16:18:56 +02:00
Vincent Ambo
edb2ca67d3 Rename irc.el to init-irc.el 2013-08-05 15:37:43 +02:00
Vincent Ambo
1ba56be2ee Only load irc.el and init-local if they exist 2013-08-05 15:34:46 +02:00
Vincent Ambo
9112881277 * Gitignore some more files
* Install tumblesocks
2013-08-05 15:28:47 +02:00
Vincent Ambo
97af8f3631 Removed mail config, ignored local files and IRC config 2013-08-05 15:23:18 +02:00
Vincent Ambo
e320f14263 * removed dotfiles stuff, this is emacs.d only 2013-08-05 15:17:23 +02:00
Vincent Ambo
46b80c00fd emacs: Added some functions from @magnars, replaced standard goto-line with his version 2013-08-05 11:54:38 +02:00
Vincent Ambo
006043d82e emacs: Added flx (glorious!), removed some unused settings and functions 2013-08-03 15:36:05 +02:00
Eelco Dolstra
46ffcce0c3 In the profiler output, show function names (if available) 2013-08-02 18:29:23 +00:00
Eelco Dolstra
8e74c0bfd1 Let the ordering operators also work on strings
E.g. ‘"foo" < "bar"’ now works.
2013-08-02 18:53:02 +02:00
Eelco Dolstra
3d77b28eac Add comparison operators ‘<’, ‘<=’, ‘>’ and ‘>=’ 2013-08-02 18:39:40 +02:00
Eelco Dolstra
47701677e8 Add integer ‘-’, ‘*’ and ‘/’ operators 2013-08-02 16:03:02 +00:00
Eelco Dolstra
5d147e125c Add a unary integer negation operator
This allows saying "-1" instead of "builtins.sub 0 1".
2013-08-02 15:43:31 +00:00
Eelco Dolstra
159e621d1a Overload the ‘+’ operator to support integer addition 2013-08-02 15:21:17 +00:00
Vincent Ambo
580f642d40 emacs: Function to toggle native/non-native fullscreen on OS X 2013-08-01 11:31:13 +02:00
Eelco Dolstra
511455965e nix-shell: Don't disable Automake dependency tracking
Nixpkgs' stdenv disables dependency tracking by default.  That makes
sense for one-time builds, but in an interactive environment we expect
repeated "make" invocations to do the right thing.
2013-07-31 13:17:50 +02:00
Eelco Dolstra
7df4ef983e Test the delayed with a bit more 2013-07-31 13:12:35 +02:00
Eelco Dolstra
0a470fc345 Make Env smaller
Commit 20866a7031 added a ‘withAttrs’
field to Env, which is annoying because it makes every Env structure
bigger and we allocate millions of them.  E.g. NixOS evaluation took
18 MiB more.  So this commit squeezes ‘withAttrs’ into values[0].
Probably should use a union...
2013-07-31 12:44:21 +02:00
Eelco Dolstra
8ae6d55db1 Don't use NULL 2013-07-31 12:11:14 +02:00
Shea Levy
e068f49f7d Avoid thunks when a fromWith var can be looked up without evaluation
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-31 11:48:39 +02:00
Shea Levy
20866a7031 Delay evaulation of with attrs until a variable lookup needs them
Evaluation of attribute sets is strict in the attribute names, which
means immediate evaluation of `with` attribute sets rules out some
potentially interesting use cases (e.g. where the attribute names of one
set depend in some way on another but we want to bring those names into
scope for some values in the second set).

The major example of this is overridable self-referential package sets
(e.g. all-packages.nix). With immediate `with` evaluation, the only
options for such sets are to either make them non-recursive and
explicitly use the name of the overridden set in non-overridden one
every time you want to reference another package, or make the set
recursive and use the `__overrides` hack. As shown in the test case that
comes with this commit, though, delayed `with` evaluation allows a nicer
third alternative.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-31 11:48:39 +02:00
Eelco Dolstra
70e68e0ec6 Detect stack overflows
Previously, if the Nix evaluator gets a stack overflow due to a deep
or infinite recursion in the Nix expression, the user gets an
unhelpful message ("Segmentation fault") that doesn't indicate that
the problem is in the user's code rather than Nix itself.  Now it
prints:

  error: stack overflow (possible infinite recursion)

This only works on x86_64-linux and i686-linux.

Fixes #35.
2013-07-30 23:37:10 +02:00
Shea Levy
e87d1a63bd killUser: Don't let the child kill itself on Apple
The kill(2) in Apple's libc follows POSIX semantics, which means that
kill(-1, SIGKILL) will kill the calling process too. Since nix has no
way to distinguish between the process successfully killing everything
and the process being killed by a rogue builder in that case, it can't
safely conclude that killUser was successful.

Luckily, the actual kill syscall takes a parameter that determines
whether POSIX semantics are followed, so we can call that syscall
directly and avoid the issue on Apple.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-30 21:25:16 +02:00
Vincent Ambo
459f0433e6 emacs: Minor fixes 2013-07-30 16:19:58 +02:00
Vincent Ambo
cae07c88fd emacs: Disabled EShell banner message, amended PATH
fish: Amended PATH
2013-07-29 18:44:02 +02:00
Vincent Ambo
cdffc846bb Emacs: Various changes:
- Moved Haskell-mode configuration to customize
- Disabled Paredit in non-lisp buffers (or more explicitly: Enabled it
  in Elisp and Clojure buffers)
- Removed some custom items that I don't use anymore (e.g. Jabber-mode
  because I switched to bitlbee with rcirc)
- New packages: hi2 (Haskell indent mode revamped), browse-kill-ring
- Always enable undo-tree-mode and recentf-mode
- Keep all auto-save files in /tmp
2013-07-29 00:53:08 +02:00
Vincent Ambo
488a5c4956 Emacs: Enabling some more visual commands in EShell, set EShell config directory to ~/.config/eshell (similar to the fish dir) 2013-07-28 18:02:36 +02:00
Vincent Ambo
2f88133858 emacs: Added init-local.el loading for machine-local configuration, removed jabber (using bitlbee instead) 2013-07-25 20:22:57 +02:00
Florian Friesdorf
7cf539c728 buildenv: remove special treatment of python files
buildPythonPackage does not leave easy_install.pth and site.py
anymore. A python package that leaves these files is broken. An
exception to this is setuptoolsSite which packages setuptools'
site.py. To include it into a buildenv, this patch is even needed, not
just cosmetic.
2013-07-23 20:13:43 +02:00
Vincent Ambo
2e9b4cf111 emacs: Fixed EShell path 2013-07-22 11:43:48 +02:00
Vincent Ambo
818b2eb2d5 emacs: Eshell prompt regexp 2013-07-22 02:26:51 +02:00
Vincent Ambo
817ebc39e4 emacs: Added Jabber config 2013-07-21 15:23:35 +02:00