3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

750 commits

Author SHA1 Message Date
Graham Christensen 4edb31882c
nixpkgs docs: Clarify zipAttrsWithNames's docs 2018-10-12 16:54:33 -04:00
Graham Christensen 3b3bde463b
nixpkgs docs: document zipAttrsWithNames 2018-10-12 16:06:12 -04:00
Graham Christensen e0c6981d19
nixpkgs docs: document optionalAttrs 2018-10-12 16:06:12 -04:00
Graham Christensen c547c3fe82
nixpkgs docs: document toDerivation 2018-10-12 16:06:12 -04:00
Graham Christensen f85a4ba9c3
nixpkgs docs: document isDerivation 2018-10-12 16:06:11 -04:00
Graham Christensen ef05e1057b
nixpkgs docs: document genAttrs 2018-10-12 16:06:11 -04:00
Graham Christensen d664b8f5e3
nixpkgs docs: document mapAttrsRecursiveCond 2018-10-12 16:06:11 -04:00
Graham Christensen e7549b96ad
nixpkgs docs: finish up mapAttrsRecursive 2018-10-12 16:06:11 -04:00
Benjamin Hipple 1bcdf27c48 Update with code review feedback; add example python application 2018-10-12 10:06:25 +02:00
Benjamin Hipple c0af13f1c8 python: update documentation
This touches up a handful of places in the python documentation to try to make
the current best-practices more obvious. In particular, I often find the
function signatures (what to pass, what not to pass) confusing and have added
them to the docs.

Also updated the metas to be more consistent with the most frequently used
modern style.
2018-10-12 10:06:25 +02:00
Graham Christensen 5daee73ce4
Generate links to function definitions
Hydra passes the full revision in to the input, which we pass through.

If we don't get this ,we try to get it from other sources, or default to
master which should have the definition in a close-ish location.

All published docs should have theURL resolve properly, only local
hackers will have the link break.
2018-10-05 11:20:46 -04:00
Graham Christensen f835f77e02
nixpkgs: Start documenting library functions in XML
Covers assert functions and about half of the attrsets functions.

Some internal consistency around IDs could be improved.
2018-10-05 10:06:08 -04:00
Graham Christensen f2b3bbe44e
Merge pull request #47688 from grahamc/doc-breakout-functions
nixpkgs docs: breakout functions
2018-10-03 21:52:48 -04:00
Graham Christensen c07ba7c856
nixpkgs docs: Reformat 2018-10-02 15:59:59 -04:00
Graham Christensen 444e04b985
nixpkgs docs: Rebuild manual-full if nested XML docs change 2018-10-02 15:59:00 -04:00
Graham Christensen c3125498fd
shell functions: rewrite as xml 2018-10-02 14:16:27 -04:00
Graham Christensen 507a63c885
nixpkgs docs: move shell section to its own file 2018-10-02 14:13:42 -04:00
Graham Christensen 8bf342ffb8
nixpkgs docs: move dockertool to its own file 2018-10-02 14:13:12 -04:00
Graham Christensen 0856d5c4ad
nixpkgs docs: move fhs-environments to its own file 2018-10-02 14:08:36 -04:00
Graham Christensen 3ac79c89b7
nixpkgs docs: move debug to its own file 2018-10-02 14:07:06 -04:00
Graham Christensen 9ae39b3553
nixpkgs docs: move generators to its own file 2018-10-02 14:03:59 -04:00
Graham Christensen f200a322c4
nixpkgs docs: move overrides to its own file 2018-10-02 13:52:21 -04:00
Jörg Thalheim bc0d87a4f1
Merge pull request #47455 from nyanloutre/steamPackages.steam-udev
steamPackages.steam: add udev rules and update to 1.0.0.56
2018-10-02 00:55:41 +01:00
lewo 56b4db9710
Merge pull request #47411 from graham-at-target/multi-layered-images-crafted
Multi-Layered Docker Images
2018-10-01 09:48:24 +02:00
nyanloutre d859a66351
nixos/steam-hardware: update documentation 2018-09-30 11:27:47 +02:00
Graham Christensen d1e46df24b fixup: drop comment about config behaving differently from buildImage 2018-09-27 08:14:04 -04:00
Graham Christensen 4fe9006190 dockerTools.buildLayeredImage: init
Create a many-layered Docker Image.

Implements much less than buildImage:

 - Doesn't support specific uids/gids
 - Doesn't support runninng commands after building
 - Doesn't require qemu
 - Doesn't create mutable copies of the files in the path
 - Doesn't support parent images

If you want those feature, I recommend using buildLayeredImage as an
input to buildImage.

Notably, it does support:

 - Caching low level, common paths based on a graph traversial
   algorithm, see referencesByPopularity in
   0a80233487993256e811f566b1c80a40394c03d6
 - Configurable number of layers. If you're not using AUFS or not
   extending the image, you can specify a larger number of layers at
   build time:

       pkgs.dockerTools.buildLayeredImage {
         name = "hello";
         maxLayers = 128;
         config.Cmd = [ "${pkgs.gitFull}/bin/git" ];
       };

 - Parallelized creation of the layers, improving build speed.
 - The contents of the image includes the closure of the configuration,
   so you don't have to specify paths in contents and config.

   With buildImage, paths referred to by the config were not included
   automatically in the image. Thus, if you wanted to call Git, you
   had to specify it twice:

       pkgs.dockerTools.buildImage {
         name = "hello";
         contents = [ pkgs.gitFull ];
         config.Cmd = [ "${pkgs.gitFull}/bin/git" ];
       };

   buildLayeredImage on the other hand includes the runtime closure of
   the config when calculating the contents of the image:

       pkgs.dockerTools.buildImage {
         name = "hello";
         config.Cmd = [ "${pkgs.gitFull}/bin/git" ];
       };

Minor Problems

 - If any of the store paths change, every layer will be rebuilt in
   the nix-build. However, beacuse the layers are bit-for-bit
   reproducable, when these images are loaded in to Docker they will
   match existing layers and not be imported or uploaded twice.

Common Questions

 - Aren't Docker layers ordered?

   No. People who have used a Dockerfile before assume Docker's
   Layers are inherently ordered. However, this is not true -- Docker
   layers are content-addressable and are not explicitly layered until
   they are composed in to an Image.

 - What happens if I have more than maxLayers of store paths?

   The first (maxLayers-2) most "popular" paths will have their own
   individual layers, then layer #(maxLayers-1) will contain all the
   remaining "unpopular" paths, and finally layer #(maxLayers) will
   contain the Image configuration.
2018-09-26 17:54:14 -04:00
John Ericson 22ce614112
Merge pull request #47238 from obsidiansystems/overrideScope-order
lib: Deprecate `overrideScope` in lieu of `overrideScope'` taking arguments in the conventional order
2018-09-24 18:04:18 -04:00
John Ericson b9dce11712 lib: Make overrideScope' which takes arguments in the conventional order
The `overrideScope` bound by `makeScope` (via special `callPackage`)
took an override in the form `super: self { … }`. But this is
dangerously close to the `self: super { … }` form used by *everything*
else, even other definitions of `overrideScope`! Since that
implementation did not even share any code either until I changed it
recently in 3cf43547f4, this inconsistency
is almost certainly an oversight and not intentional.

Unfortunately, just as the inconstency is hard to debug if one just
assumes the conventional order, any sudden fix would break existing
overrides in the same hard-to-debug way. So instead of changing the
definition a new `overrideScope'` with the conventional order is added,
and old `overrideScope` deprecated with a warning saying to use
`overrideScope'` instead. That will hopefully get people to stop using
`overrideScope`, freeing our hand to change or remove it in the future.
2018-09-24 17:50:11 -04:00
John Ericson e39a73cc55 doc: Don't mention top-level {build, host, target}Platform
For technical reasons, we cannot easily add a warning to top-level
definitions, so 2a6e4ae49a and
e51f736076 reverted the deprecation. But
we can still remove mention of the would-be deprecated definitions to
steer people towards using the preferred alternatives.
2018-09-23 13:25:44 -04:00
Graham Christensen 7736337916
Clarfy the binary reproducibility problems of created=now with dockerTools.buildImage. 2018-09-20 20:23:04 -04:00
John Children aec67d299c doc/stdenv: libaries -> libraries (#47011)
This commit corrects a minor typo in the stdenv portion of the
documentation for the nix language.
2018-09-20 18:45:54 +01:00
Graham Christensen a32d7e0c74 dockerTools.buildImage: support impure dates
Because dates are an impurity, by default buildImage will use a static
date of one second past the UNIX Epoch. This can be a bit frustrating
when listing docker images in the CLI:

    $ docker image list
    REPOSITORY   TAG      IMAGE ID       CREATED        SIZE
    hello        latest   08c791c7846e   48 years ago   25.2MB

If you want to trade the purity for a better user experience, you can
set created to now.

    pkgs.dockerTools.buildImage {
      name = "hello";
      tag = "latest";
      created = "now";
      contents = pkgs.hello;

      config.Cmd = [ "/bin/hello" ];
    }

and now the Docker CLI will display a reasonable date and sort the
images as expected:

    $ docker image list
    REPOSITORY   TAG      IMAGE ID       CREATED              SIZE
    hello        latest   de2bf4786de6   About a minute ago   25.2MB
2018-09-20 18:26:02 +02:00
Jörg Thalheim 1552f2ef68 doc/vim: remove some vim-plug redundancy 2018-09-20 08:20:11 +01:00
Roman Volosatovs c1d8b1e266
doc: Add section about vim-plug 2018-09-20 09:05:33 +02:00
Maximilian Bosch dee2dab7c6
ibus-engines.typing-booster: init at 2.1.1
This package providesa completion input method for faster typing.
See https://mike-fabian.github.io/ibus-typing-booster

Detailed instructions how to activate this IBus engine on your desktop
can be found in the upstream docs: https://mike-fabian.github.io/ibus-typing-booster/documentation.html

A simple VM with the Gnome3 desktop and activated `ibus' looks like
this:

```nix
{
  emojipicker = { pkgs, ... }: {
    services.xserver = {
      enable = true;
      desktopManager.gnome3.enable = true;
      desktopManager.xterm.enable = false;
    };
    users.extraUsers.vm = {
      password = "vm";
      isNormalUser = true;
    };
    i18n.inputMethod.ibus.engines = [
      pkgs.ibus-engines.typing-booster
    ];
    i18n.inputMethod.enabled = "ibus";
    virtualisation.memorySize = 2048;
  };
}
```

Fixes #38721
2018-09-19 21:27:10 +02:00
worldofpeace 6dae5de436
rust.section.md: remove nixcrate reference
nixcrate is deprecated
2018-09-15 18:38:26 +00:00
Sarah Brofeldt 2a6e4ae49a Revert "top-level: Deprecate top-level {build,host,target}Platform"
This reverts commit e51f736076.
2018-09-11 13:25:50 +02:00
Jörg Thalheim 953199fd82 vim-plugins: rewrite updater
A new python script has been added to replace the aged viml-based
updater. The new updater has the following advantages:

- use rss feeds to check for updates quicker
- parallel downloads & better caching
- uses proper override mechanism instead of text substitution
- update generated files in-place instead of having to insert updated plugins manually

Automatically reading `dependencies` from the plugins directory has been
not re-implemented.
This has been mostly been used by Mark Weber's plugins, which seem to
no longer receive regular updates.
This could be implemented in future as required.
2018-09-09 11:22:43 +01:00
Jörg Thalheim 97acac9a81 doc/vim: improve plugin documentation 2018-09-09 09:45:45 +01:00
Timo Kaufmann e326c0156d
Merge pull request #45728 from Ma27/nixos/weechat-module
nixos/weechat: add module
2018-09-07 17:19:46 +02:00
Maximilian Bosch a8efe61412
weechat: 2.1 -> 2.2; improve package configuration
This aims to make the `weechat` package even more configurable. It
allows to specify scripts and commands using the `configure` function
inside a `weechat.override` expression.

The package can be configured like this:

```
with import <nixpkgs> { };
weechat.override {
  plugins = { availablePlugins, ... }: {
    plugins = builtins.attrValues availablePlugins;

    init = ''
      /set foo bar
      /server add freenode chat.freenode.org
    '';

    scripts = [ "/path/to/script.py" ];
  };
}
```

All commands are passed to `weechat --run-command "/set foo bar;/server ..."`.

The `plugins' attribute is not necessarily required anymore, if it's
sufficient to add `init' commands, the `plugins' will be
`builtins.attrValues availablePlugins' by default.

Additionally the result contains `weechat` and `weechat-headless`
(introduced in WeeChat 2.1) now.
2018-09-07 13:10:43 +02:00
John Ericson 0af9072e74
Merge pull request #46059 from obsidiansystems/deprecate-top-level-platform-aliases
top-level: Deprecate top-level `{build,host,target}Platform`
2018-09-06 07:52:17 -04:00
John Ericson e51f736076 top-level: Deprecate top-level {build,host,target}Platform
I don't know when we can/should remove them, but this at least gets
people to stop using them. The preferred alternatives also date back to
17.09 so writing forward-compatable code without extra conditions is
easy.

Beginning with these as they are the least controversial.
2018-09-05 11:53:51 -04:00
Eelco Dolstra eac06ed070
Manual: Random indentation fixes 2018-09-03 17:13:46 +02:00
Graham Christensen 03b89e3031
Merge pull request #45914 from grahamc/section-ids
Section ids
2018-09-01 15:38:52 -04:00
Graham Christensen 2eea92a1dc
nixpkgs docs: give linked things IDs 2018-09-01 15:20:57 -04:00
Graham Christensen cbdcf81590
Add section IDs 2018-09-01 15:06:38 -04:00
Jörg Thalheim 4a74aca868
Merge pull request #45700 from Mic92/node-packages-v8
nodePackages: 6_x -> 8_x
2018-09-01 09:09:24 +01:00
Daiderd Jordan 477efb9d87
Merge pull request #42464 from LnL7/manual-installcheck
doc: add installCheckTarget and installCheckFlags to manual
2018-08-31 20:08:16 +02:00