Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ca2ba44cab47
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 56b9f6fc8e1c
Choose a head ref

Commits on May 22, 2018

  1. treewide: Remove uses of builtins.toPath.

    toPath has confusing semantics and is never necessary; it can always
    either just be omitted or replaced by pre-concatenating `/.`. It has
    been marked as "!!! obsolete?" for more than 10 years in a C++
    comment, hopefully removing it will let us properly deprecate and,
    eventually, remove it.
    shlevy committed May 22, 2018
    Copy the full SHA
    6da6acc View commit details

Commits on Aug 3, 2018

  1. haskell-modules: add callCabal2nixWithOptions.

    Fixes #44377.
    dhess committed Aug 3, 2018
    Copy the full SHA
    4abb8be View commit details

Commits on Aug 9, 2018

  1. pythonPackages.pytest-timeout: refactor add python 2.7 compatibiliy

    In version 1.3.1 of `pytest-timeout` (latest) the setup.py file is not
    compatible with python 2.7 and 3+ due to how `open` is called. A patch
    has been added that can be removed once a fix and new relase is given.
    costrouc committed Aug 9, 2018
    Copy the full SHA
    7e192a5 View commit details

Commits on Aug 17, 2018

  1. hisat2: init 2.1.0

    jbedo committed Aug 17, 2018
    Copy the full SHA
    9bd7a4f View commit details

Commits on Aug 25, 2018

  1. ydiff: init at 1.1

    leenaars committed Aug 25, 2018
    Copy the full SHA
    de61d0d View commit details

Commits on Aug 30, 2018

  1. nixos/shells: avoid overriding the environment for child shells

    A shared exported guard `__NIXOS_SET_ENVIRONMENT_DONE` is introduced that can
    be used to prevent child shells from sourcing `system.build.setEnvironment`
    the second time.
    
    This fixes e.g. `nix run derivation` when run from e.g. ZSH through the console or
    ssh. Before this Bash would resource the common environment resetting the `PATH`
    environment variable.
    
    We also export `system.build.setEnvironment` to `/etc/set-environment` making it
    easy to reset the common environment with `. /etc/set-environment` when
    needed and to grep for environment variables in `/etc` (which was the
    motivation of #30418).
    
    This reverts changes made in b00a3fc
    (the original #30418).
    hedning authored and oxij committed Aug 30, 2018
    Copy the full SHA
    d273db4 View commit details
  2. nixos/shells: fix indent everywhere

    to comply with `doc/coding-conventions.xml`
    oxij committed Aug 30, 2018
    Copy the full SHA
    8952375 View commit details

Commits on Sep 3, 2018

  1. Copy the full SHA
    d22be10 View commit details
  2. Copy the full SHA
    d7ab0f4 View commit details
  3. Copy the full SHA
    ecfa538 View commit details
  4. geant4: remove multi version infrastructure

    Nobody maintains this and this does not contribute anything towards
    making reproducible research. Also this was missing recurseIntoAttrs, so
    Hydra used to not see it.
    veprbl committed Sep 3, 2018
    Copy the full SHA
    537de20 View commit details
  5. Copy the full SHA
    4d33e28 View commit details
  6. Copy the full SHA
    f3049d0 View commit details
  7. g4py: fix for new boost

    veprbl committed Sep 3, 2018
    Copy the full SHA
    fc4f99a View commit details
  8. Copy the full SHA
    97816be View commit details
  9. Copy the full SHA
    af54308 View commit details
  10. thonny: init at 3.0.0b3

    leenaars committed Sep 3, 2018
    Copy the full SHA
    bfb14fb View commit details

Commits on Sep 4, 2018

  1. semodule-utils: init at 2.7

    outergod committed Sep 4, 2018
    Copy the full SHA
    5e9aafb View commit details
  2. khal: add zsh completion

    teto committed Sep 4, 2018
    Copy the full SHA
    61df695 View commit details
  3. firefox-bin: 61.0.2 -> 62.0

    taku0 committed Sep 4, 2018
    Copy the full SHA
    12723b1 View commit details
  4. firefox: 61.0.2 -> 62.0

    taku0 committed Sep 4, 2018
    Copy the full SHA
    26cbfe1 View commit details
  5. Copy the full SHA
    d376ceb View commit details
  6. musl: 1.1.19 -> 1.1.20

    dtzWill committed Sep 4, 2018
    Copy the full SHA
    e37c21c View commit details

Commits on Sep 5, 2018

  1. hcloud: Add autocomplete support for bash and zsh

    Currently one would need to manually run the command to generate
    completion and insert it into `.bashrc`/`.zshrc` to get the
    autocompletion to work. This patch will automatically generate
    both docs and save them to correct position so it should continue
    to work even if user changes the shell at a later stage.
    uskudnik committed Sep 5, 2018
    Copy the full SHA
    d23c357 View commit details
  2. cargo-edit: 0.2.0 -> 0.3.0

    alyssais committed Sep 5, 2018
    Copy the full SHA
    7cafc36 View commit details
  3. haskellPackages.tensorflow-mnist-input-data: fetch

    Prefetch data so that the package doesn't try to connect to the internet.
    teto committed Sep 5, 2018
    Copy the full SHA
    11e2009 View commit details
  4. 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.
    Ericson2314 committed Sep 5, 2018
    Copy the full SHA
    e51f736 View commit details
  5. Copy the full SHA
    2ad99bc View commit details
  6. Revert "texinfoInteractive: fixup build by using older perl"

    This reverts commit 7a22083.
    oxij committed Sep 5, 2018
    Copy the full SHA
    0b89ece View commit details
  7. ocamlPackages.seq: init at 0.1

    vbgl committed Sep 5, 2018
    Copy the full SHA
    f0a0cca View commit details
  8. Copy the full SHA
    48708a9 View commit details
  9. Copy the full SHA
    085cc29 View commit details
  10. Copy the full SHA
    ee841c5 View commit details
  11. Copy the full SHA
    7de5708 View commit details
  12. Copy the full SHA
    12c0dd5 View commit details
  13. phe: init at 1.4.0

    flokli committed Sep 5, 2018
    Copy the full SHA
    f051f66 View commit details
  14. Copy the full SHA
    7339a40 View commit details
  15. gmpy2: 2.0.6 -> 2.0.8

    Also move outside python-packages.nix
    flokli committed Sep 5, 2018
    Copy the full SHA
    e053386 View commit details
  16. nix: 2.1 -> 2.1.1

    edolstra committed Sep 5, 2018
    Copy the full SHA
    1510f32 View commit details

Commits on Sep 6, 2018

  1. linux: Remove 4.17

    NeQuissimus committed Sep 6, 2018
    Copy the full SHA
    f89d6d9 View commit details
  2. pythonPackages.pytest-faulthandler: init at 1.5.0

     - compatible with 2.7 and 3+
     - all test pass.
    costrouc committed Sep 6, 2018
    Copy the full SHA
    5704642 View commit details
  3. pythonPackages.python-lz4: init at 2.1.0

    Fetching from github repository instead of pypi so that all tests can
    be run.
    
     - compatible with 2.7, 3+
     - all tests pass
    costrouc committed Sep 6, 2018
    Copy the full SHA
    3a56e31 View commit details
  4. pythonPackages.joblib: 0.12.1 -> 0.12.2

    In order to get all the tests passing the Github repository was
    downloaded instead of from pypi so that the `conftest.py` is
    available.
    
    In addition to updating the version:
    
      - compatible with 2.7, 3+ now
      - all tests are running and passing
    costrouc committed Sep 6, 2018
    Copy the full SHA
    05890dd View commit details
  5. pythonPackages.pytest-repeat: init at 0.6.0

     - compatible with 2.7, 3+
     - all tests pass and running
    costrouc committed Sep 6, 2018
    Copy the full SHA
    7b92017 View commit details
  6. pythonPackages.distributed: 1.15.1 -> 1.22.1

    The github repository was downloaded instead of the pypi repository
    for testing (needed `conftest.py`). Major work was done on the
    underlying dependencies to make distributed work on python 2.7,
    3+. Note that the test **do** take a significant amount of time (10-15
    minutes).
    
     - moved to `python-modules`
     - compatible with 2.7, 3+
     - all tests pass (previously tests were not run)
    costrouc committed Sep 6, 2018
    Copy the full SHA
    4f70170 View commit details
  7. Copy the full SHA
    ed13093 View commit details
  8. pythonPackages.pymatgen: 2018.8.10 -> 2018.9.1

    Also 2018.8.10 does not build in previous state because auto updating
    from pypi did not account for a new requirement `networkx`. This has
    been added.
    costrouc committed Sep 6, 2018
    Copy the full SHA
    63cf879 View commit details
  9. Merge pull request #46034 from teto/khal_zsh_completion

    khal: add zsh completion
    Mic92 authored Sep 6, 2018
    Copy the full SHA
    b285ea7 View commit details
  10. Copy the full SHA
    b5bd566 View commit details
  11. haskellPackages.tensorflow-mnist-input-data: use an attribute set to …

    …specify the data files
    
    This is more understandable and safer than using a nested list.
    basvandijk committed Sep 6, 2018
    Copy the full SHA
    6bd8799 View commit details
Showing 679 changed files with 21,639 additions and 13,314 deletions.
82 changes: 74 additions & 8 deletions doc/languages-frameworks/vim.section.md
Original file line number Diff line number Diff line change
@@ -5,11 +5,16 @@ date: 2016-06-25
---
# User's Guide to Vim Plugins/Addons/Bundles/Scripts in Nixpkgs

You'll get a vim(-your-suffix) in PATH also loading the plugins you want.
Both Neovim and Vim can be configured to include your favorite plugins
and additional libraries.

Loading can be deferred; see examples.

Vim packages, VAM (=vim-addon-manager) and Pathogen are supported to load
packages.
At the moment we support three different methods for managing plugins:

- Vim packages (*recommend*)
- VAM (=vim-addon-manager)
- Pathogen

## Custom configuration

@@ -25,7 +30,19 @@ vim_configurable.customize {
}
```

## Vim packages
For Neovim the `configure` argument can be overridden to achieve the same:

```
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
};
}
```

## Managing plugins with Vim packages

To store you plugins in Vim packages the following example can be used:

@@ -38,13 +55,50 @@ vim_configurable.customize {
opt = [ phpCompletion elm-vim ];
# To automatically load a plugin when opening a filetype, add vimrc lines like:
# autocmd FileType php :packadd phpCompletion
}
};
};
}
```

## VAM
For Neovim the syntax is

```
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
packages.myVimPackage = with pkgs.vimPlugins; {
# see examples below how to use custom packages
start = [ ];
opt = [ ];
};
};
}
```

### dependencies by Vim plugins
The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.nix` to make it installable:

```
{
packageOverrides = pkgs: with pkgs; {
myVim = vim_configurable.customize {
name = "vim-with-plugins";
# add here code from the example section
};
myNeovim = neovim.override {
configure = {
# add here code from the example section
};
};
};
}
```

After that you can install your special grafted `myVim` or `myNeovim` packages.

## Managing plugins with VAM

### Handling dependencies of Vim plugins

VAM introduced .json files supporting dependencies without versioning
assuming that "using latest version" is ok most of the time.
@@ -125,6 +179,18 @@ Sample output2:
]


## Adding new plugins to nixpkgs

In `pkgs/misc/vim-plugins/vim-plugin-names` we store the plugin names
for all vim plugins we automatically generate plugins for.
The format of this file `github username/github repository`:
For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
After adding your plugin to this file run the `./update.py` in the same folder.
This will updated a file called `generated.nix` and make your plugin accessible in the
`vimPlugins` attribute set (`vimPlugins.nerdtree` in our example).
If additional steps to the build process of the plugin are required, add an
override to the `pkgs/misc/vim-plugins/default.nix` in the same directory.

## Important repositories

- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
51 changes: 51 additions & 0 deletions doc/package-notes.xml
Original file line number Diff line number Diff line change
@@ -671,6 +671,8 @@ overrides = super: self: rec {
plugins = with availablePlugins; [ python perl ];
}
}</programlisting>
If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal>
attribute, <literal>availablePlugins</literal> will be used automatically.
</para>

<para>
@@ -704,6 +706,55 @@ overrides = super: self: rec {
}; }
</programlisting>
</para>
<para>
WeeChat allows to set defaults on startup using the <literal>--run-command</literal>.
The <literal>configure</literal> method can be used to pass commands to the program:
<programlisting>weechat.override {
configure = { availablePlugins, ... }: {
init = ''
/set foo bar
/server add freenode chat.freenode.org
'';
};
}</programlisting>
Further values can be added to the list of commands when running
<literal>weechat --run-command "your-commands"</literal>.
</para>
<para>
Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>.
These will be loaded before the commands from <literal>init</literal>:
<programlisting>weechat.override {
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-xmpp weechat-matrix-bridge wee-slack
];
init = ''
/set plugins.var.python.jabber.key "val"
'':
};
}</programlisting>
</para>
<para>
In <literal>nixpkgs</literal> there's a subpackage which contains derivations for
WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute
which contains a list of all scripts inside the store path. Furthermore all scripts
have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
<programlisting>{ stdenv, fetchurl }:

stdenv.mkDerivation {
name = "exemplary-weechat-script";
src = fetchurl {
url = "https://scripts.tld/your-scripts.tar.gz";
sha256 = "...";
};
passthru.scripts = [ "foo.py" "bar.lua" ];
installPhase = ''
mkdir $out/share
cp foo.py $out/share
cp bar.lua $out/share
'';
}</programlisting>
</para>
</section>
<section xml:id="sec-citrix">
<title>Citrix Receiver</title>
44 changes: 44 additions & 0 deletions lib/asserts.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ lib }:

rec {

/* Print a trace message if pred is false.
Intended to be used to augment asserts with helpful error messages.
Example:
assertMsg false "nope"
=> false
stderr> trace: nope
assert (assertMsg ("foo" == "bar") "foo is not bar, silly"); ""
stderr> trace: foo is not bar, silly
stderr> assert failed at …
Type:
assertMsg :: Bool -> String -> Bool
*/
# TODO(Profpatsch): add tests that check stderr
assertMsg = pred: msg:
if pred
then true
else builtins.trace msg false;

/* Specialized `assertMsg` for checking if val is one of the elements
of a list. Useful for checking enums.
Example:
let sslLibrary = "libressl"
in assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ]
=> false
stderr> trace: sslLibrary must be one of "openssl", "bearssl", but is: "libressl"
Type:
assertOneOf :: String -> ComparableVal -> List ComparableVal -> Bool
*/
assertOneOf = name: val: xs: assertMsg
(lib.elem val xs)
"${name} must be one of ${
lib.generators.toPretty {} xs}, but is: ${
lib.generators.toPretty {} val}";

}
6 changes: 4 additions & 2 deletions lib/default.nix
Original file line number Diff line number Diff line change
@@ -38,10 +38,11 @@ let
systems = callLibs ./systems;

# misc
asserts = callLibs ./asserts.nix;
debug = callLibs ./debug.nix;

generators = callLibs ./generators.nix;
misc = callLibs ./deprecated.nix;

# domain-specific
fetchers = callLibs ./fetchers.nix;

@@ -60,7 +61,6 @@ let
boolToString mergeAttrs flip mapNullable inNixShell min max
importJSON warn info nixpkgsVersion version mod compare
splitByAndCompare functionArgs setFunctionArgs isFunction;

inherit (fixedPoints) fix fix' extends composeExtensions
makeExtensible makeExtensibleWithCustomName;
inherit (attrsets) attrByPath hasAttrByPath setAttrByPath
@@ -117,6 +117,8 @@ let
unknownModule mkOption;
inherit (types) isType setType defaultTypeMerge defaultFunctor
isOptionType mkOptionType;
inherit (asserts)
assertMsg assertOneOf;
inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal
5 changes: 5 additions & 0 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
@@ -355,6 +355,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = "Independent JPEG Group License";
};

imagemagick = spdx {
fullName = "ImageMagick License";
spdxId = "imagemagick";
};

inria-compcert = {
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
url = "http://compcert.inria.fr/doc/LICENSE";
7 changes: 5 additions & 2 deletions lib/lists.nix
Original file line number Diff line number Diff line change
@@ -509,15 +509,18 @@ rec {
=> 3
*/
last = list:
assert list != []; elemAt list (length list - 1);
assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
elemAt list (length list - 1);

/* Return all elements but the last
Example:
init [ 1 2 3 ]
=> [ 1 2 ]
*/
init = list: assert list != []; take (length list - 1) list;
init = list:
assert lib.assertMsg (list != []) "lists.init: list must not be empty!";
take (length list - 1) list;


/* return the image of the cross product of some lists by a function
12 changes: 7 additions & 5 deletions lib/strings.nix
Original file line number Diff line number Diff line change
@@ -410,7 +410,7 @@ rec {
components = splitString "/" url;
filename = lib.last components;
name = builtins.head (splitString sep filename);
in assert name != filename; name;
in assert name != filename; name;

/* Create an --{enable,disable}-<feat> string that can be passed to
standard GNU Autoconf scripts.
@@ -468,7 +468,10 @@ rec {
strw = lib.stringLength str;
reqWidth = width - (lib.stringLength filler);
in
assert strw <= width;
assert lib.assertMsg (strw <= width)
"fixedWidthString: requested string length (${
toString width}) must not be shorter than actual length (${
toString strw})";
if strw == width then str else filler + fixedWidthString reqWidth filler str;

/* Format a number adding leading zeroes up to fixed width.
@@ -501,7 +504,7 @@ rec {
isStorePath = x:
isCoercibleToString x
&& builtins.substring 0 1 (toString x) == "/"
&& dirOf (builtins.toPath x) == builtins.storeDir;
&& dirOf x == builtins.storeDir;

/* Convert string to int
Obviously, it is a bit hacky to use fromJSON that way.
@@ -537,11 +540,10 @@ rec {
*/
readPathsFromFile = rootPath: file:
let
root = toString rootPath;
lines = lib.splitString "\n" (builtins.readFile file);
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
relativePaths = removeComments lines;
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths;
in
absolutePaths;

4 changes: 2 additions & 2 deletions lib/tests/misc.nix
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ runTests {
storePathAppendix = isStorePath
"${goodPath}/bin/python";
nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath)));
asPath = isStorePath (builtins.toPath goodPath);
asPath = isStorePath goodPath;
otherPath = isStorePath "/something/else";
otherVals = {
attrset = isStorePath {};
@@ -357,7 +357,7 @@ runTests {
int = 42;
bool = true;
string = ''fno"rd'';
path = /. + "/foo"; # toPath returns a string
path = /. + "/foo";
null_ = null;
function = x: x;
functionArgs = { arg ? 4, foo }: arg;
2 changes: 1 addition & 1 deletion lib/trivial.nix
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ rec {
builtins.fromJSON (builtins.readFile path);


## Warnings and asserts
## Warnings

/* See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
to expand to Nix builtins that carry metadata so that Nix can filter out
8 changes: 6 additions & 2 deletions lib/types.nix
Original file line number Diff line number Diff line change
@@ -119,7 +119,9 @@ rec {
let
betweenDesc = lowest: highest:
"${toString lowest} and ${toString highest} (both inclusive)";
between = lowest: highest: assert lowest <= highest;
between = lowest: highest:
assert lib.assertMsg (lowest <= highest)
"ints.between: lowest must be smaller than highest";
addCheck int (x: x >= lowest && x <= highest) // {
name = "intBetween";
description = "integer between ${betweenDesc lowest highest}";
@@ -439,7 +441,9 @@ rec {
# Either value of type `finalType` or `coercedType`, the latter is
# converted to `finalType` using `coerceFunc`.
coercedTo = coercedType: coerceFunc: finalType:
assert coercedType.getSubModules == null;
assert lib.assertMsg (coercedType.getSubModules == null)
"coercedTo: coercedType must not have submodules (it’s a ${
coercedType.description})";
mkOptionType rec {
name = "coercedTo";
description = "${finalType.description} or ${coercedType.description} convertible to it";
Loading