Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
Hopefully this will fix the mass abortion on Hydra;
restarting the jobs didn't help.
  • Loading branch information
vcunat committed Jan 30, 2017
2 parents cc07ec8 + 49b1363 commit 9cd2dbc
Show file tree
Hide file tree
Showing 75 changed files with 1,672 additions and 1,616 deletions.
6 changes: 3 additions & 3 deletions doc/coding-conventions.xml
Expand Up @@ -623,7 +623,7 @@ evaluate correctly.</para>
from bad to good:
<itemizedlist>
<listitem>
<para>Uses <literal>git://</literal> which won't be proxied.
<para>Bad: Uses <literal>git://</literal> which won't be proxied.
<programlisting>
src = fetchgit {
url = "git://github.com/NixOS/nix.git";
Expand All @@ -634,7 +634,7 @@ src = fetchgit {
</para>
</listitem>
<listitem>
<para>This is ok, but an archive fetch will still be faster.
<para>Better: This is ok, but an archive fetch will still be faster.
<programlisting>
src = fetchgit {
url = "https://github.com/NixOS/nix.git";
Expand All @@ -645,7 +645,7 @@ src = fetchgit {
</para>
</listitem>
<listitem>
<para>Fetches a snapshot archive and you get the rev you want.
<para>Best: Fetches a snapshot archive and you get the rev you want.
<programlisting>
src = fetchFromGitHub {
owner = "NixOS";
Expand Down
4 changes: 4 additions & 0 deletions doc/default.nix
Expand Up @@ -68,6 +68,10 @@ pkgs.stdenv.mkDerivation {
inputFile = ../pkgs/development/r-modules/README.md;
outputFile = "languages-frameworks/r.xml";
}
+ toDocbook {
inputFile = ./languages-frameworks/vim.md;
outputFile = "./languages-frameworks/vim.xml";
}
+ ''
echo ${lib.nixpkgsVersion} > .version
Expand Down
1 change: 1 addition & 0 deletions doc/languages-frameworks/index.xml
Expand Up @@ -28,6 +28,7 @@ such as Perl or Haskell. These are described in this chapter.</para>
<xi:include href="r.xml" /> <!-- generated from ../../pkgs/development/r-modules/README.md -->
<xi:include href="ruby.xml" />
<xi:include href="texlive.xml" />
<xi:include href="vim.xml" />


</chapter>
102 changes: 102 additions & 0 deletions doc/languages-frameworks/vim.md
@@ -0,0 +1,102 @@
---
title: User's Guide for Vim in Nixpkgs
author: Marc Weber
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.
Loading can be deferred; see examples.

VAM (=vim-addon-manager) and Pathogen plugin managers are supported.
Vundle, NeoBundle could be your turn.

## dependencies by Vim plugins

VAM introduced .json files supporting dependencies without versioning
assuming that "using latest version" is ok most of the time.

## HOWTO

First create a vim-scripts file having one plugin name per line. Example:

"tlib"
{'name': 'vim-addon-sql'}
{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}

Such vim-scripts file can be read by VAM as well like this:

call vam#Scripts(expand('~/.vim-scripts'), {})

Create a default.nix file:

{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }

Create a generate.vim file:

ActivateAddons vim-addon-vim2nix
let vim_scripts = "vim-scripts"
call nix#ExportPluginsForNix({
\ 'path_to_nixpkgs': eval('{"'.substitute(substitute(substitute($NIX_PATH, ':', ',', 'g'), '=',':', 'g'), '\([:,]\)', '"\1"',"g").'"}')["nixpkgs"],
\ 'cache_file': '/tmp/vim2nix-cache',
\ 'try_catch': 0,
\ 'plugin_dictionaries': ["vim-addon-manager"]+map(readfile(vim_scripts), 'eval(v:val)')
\ })

Then run

nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"

You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
You can add your vim to your system's configuration file like this and start it by "vim-my":

my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
name = "vim-my";

vimrcConfig.vam.knownPlugins = plugins; # optional
vimrcConfig.vam.pluginDictionaries = [
copy paste output2 here
];

# Pathogen would be
# vimrcConfig.pathogen.knownPlugins = plugins; # plugins
# vimrcConfig.pathogen.pluginNames = ["tlib"];
};


Sample output1:

"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "reload";
src = fetchgit {
url = "git://github.com/xolox/vim-reload";
rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
};
dependencies = ["nim-misc"];

};
[...]

Sample output2:

[
''vim-addon-manager''
''tlib''
{ "name" = ''vim-addon-sql''; }
{ "filetype_regex" = ''\%(vim)$$''; "names" = [ ''reload'' ''vim-dev-plugin'' ]; }
]


## Important repositories

- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
from VAM plugin manager meant to be used by others as well used by

- [vim2nix](http://github.com/MarcWeber/vim-addon-vim2nix) which generates the
.nix code

20 changes: 1 addition & 19 deletions lib/trivial.nix
Expand Up @@ -102,25 +102,7 @@ rec {
min = x: y: if x < y then x else y;
max = x: y: if x > y then x else y;

/* Reads a JSON file. It is useful to import pure data into other nix
expressions.
Example:
mkDerivation {
src = fetchgit (importJSON ./repo.json)
#...
}
where repo.json contains:
{
"url": "git://some-domain/some/repo",
"rev": "265de7283488964f44f0257a8b4a055ad8af984d",
"sha256": "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"
}
*/
/* Reads a JSON file. */
importJSON = path:
builtins.fromJSON (builtins.readFile path);

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/misc/ids.nix
Expand Up @@ -206,7 +206,7 @@
ripple-data-api = 186;
mediatomb = 187;
rdnssd = 188;
ihaskell = 189;
# ihaskell = 189; # unused
i2p = 190;
lambdabot = 191;
asterisk = 192;
Expand Down Expand Up @@ -469,7 +469,7 @@
#ripple-data-api = 186; #unused
mediatomb = 187;
#rdnssd = 188; # unused
ihaskell = 189;
# ihaskell = 189; # unused
i2p = 190;
lambdabot = 191;
asterisk = 192;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/module-list.nix
Expand Up @@ -261,7 +261,7 @@
./services/misc/gitolite.nix
./services/misc/gogs.nix
./services/misc/gpsd.nix
./services/misc/ihaskell.nix
#./services/misc/ihaskell.nix
./services/misc/leaps.nix
./services/misc/mantisbt.nix
./services/misc/mathics.nix
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/i2pd.nix
Expand Up @@ -8,7 +8,7 @@ let

homeDir = "/var/lib/i2pd";

extip = "EXTIP=\$(${pkgs.curl.bin}/bin/curl -sf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')";
extip = "EXTIP=\$(${pkgs.curl.bin}/bin/curl -sLf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')";

toYesNo = b: if b then "true" else "false";

Expand Down
Expand Up @@ -64,10 +64,7 @@ in

security.setuidPrograms = [ "e_freqset" ];

environment.etc = singleton
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
services.xserver.exportConfiguration = true;

fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];

Expand Down
5 changes: 1 addition & 4 deletions nixos/modules/services/x11/desktop-managers/kde4.nix
Expand Up @@ -183,10 +183,7 @@ in
GST_PLUGIN_SYSTEM_PATH = [ "/lib/gstreamer-0.10" ];
};

environment.etc = singleton
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
services.xserver.exportConfiguration = true;

# Enable helpful DBus services.
services.udisks2.enable = true;
Expand Down
5 changes: 1 addition & 4 deletions nixos/modules/services/x11/desktop-managers/kde5.nix
Expand Up @@ -199,10 +199,7 @@ in

environment.pathsToLink = [ "/share" ];

environment.etc = singleton {
source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
services.xserver.exportConfiguration = true;

environment.variables =
{
Expand Down
24 changes: 8 additions & 16 deletions nixos/modules/services/x11/xserver.nix
Expand Up @@ -465,23 +465,15 @@ in
}
];

environment.etc =
(optionals cfg.exportConfiguration
[ { source = "${configFile}";
target = "X11/xorg.conf";
}
# -xkbdir command line option does not seems to be passed to xkbcomp.
{ source = "${cfg.xkbDir}";
target = "X11/xkb";
}
])
environment.etc = mkMerge [
(mkIf cfg.exportConfiguration {
"X11/xorg.conf".source = configFile;
"X11/xkb".source = cfg.xkbDir;
})
# Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5
++ (let cfgPath = "/X11/xorg.conf.d/10-evdev.conf"; in
[{
source = xorg.xf86inputevdev.out + "/share" + cfgPath;
target = cfgPath;
}]
);
(let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in
{ "${cfgPath}".source = xorg.xf86inputevdev.out + "/share" + cfgPath; })
];

environment.systemPackages =
[ xorg.xorgserver.out
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/brackets/default.nix
Expand Up @@ -11,11 +11,11 @@ let
in
stdenv.mkDerivation rec {
name = "brackets-${version}";
version = "1.7";
version = "1.8";

src = fetchurl {
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
sha256 = "0nsiy3gvp8rd71a0misf6v1kz067kxnszr5mpch9fj4jqmg6nj8m";
sha256 = "0b2k0vv1qwmsg1wckp71yrb86zp8zisskmzzvx9ir19bma9jzr42";
name = "${name}.deb";
};

Expand Down
22 changes: 19 additions & 3 deletions pkgs/applications/editors/rstudio/default.nix
@@ -1,4 +1,14 @@
{ stdenv, fetchurl, makeDesktopItem, cmake, boost155, zlib, openssl, R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper }:
{ stdenv, fetchurl, makeDesktopItem, cmake, boost155, zlib, openssl,
R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper,
# If you have set up an R wrapper with other packages by following
# something like https://nixos.org/nixpkgs/manual/#r-packages, RStudio
# by default not be able to access any of those R packages. In order
# to do this, override the argument "R" here with your respective R
# wrapper, and set "useRPackages" to true. This will add the
# environment variable R_PROFILE_USER to the RStudio wrapper, pointing
# to an R script which will allow R to use these packages.
useRPackages ? false
}:

let
version = "0.98.110";
Expand Down Expand Up @@ -72,8 +82,14 @@ stdenv.mkDerivation rec {
mimeType = "text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;";
};

postInstall = ''
wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin
postInstall = let rProfile =
# RStudio seems to bypass the environment variables that the R
# wrapper already applies, and so this sets R_PROFILE_USER to
# again make those R packages accessible:
if useRPackages
then "--set R_PROFILE_USER ${R}/${R.passthru.fixLibsR}" else "";
in ''
wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin ${rProfile}
mkdir $out/share
cp -r ${desktopItem}/share/applications $out/share
mkdir $out/share/icons
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/gis/qgis/default.nix
Expand Up @@ -14,7 +14,8 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake makeWrapper ];

enableParallelBuilding = true;
# fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
#enableParallelBuilding = true;

# To handle the lack of 'local' RPATH; required, as they call one of
# their built binaries requiring their libs, in the build process.
Expand Down
8 changes: 7 additions & 1 deletion pkgs/applications/graphics/ao/default.nix
Expand Up @@ -10,7 +10,13 @@ stdenv.mkDerivation rec {
libpthreadstubs libXau libXdmcp libXrandr libXext libXinerama libXxf86vm
libXcursor libXfixes
];
src = fetchgit (stdenv.lib.importJSON ./src.json);

src = fetchgit {
url = https://github.com/mkeeter/ao;
rev = "69fadb81543cc9031e4a7ec2036c7f2ab505a620";
sha256 = "1717k72vr0i5j7bvxmd6q16fpvkljnqfa1hr3i4yq8cjdsj69my7";
};

cmakeFlags = "-G Ninja";
buildPhase = "ninja";
installPhase = ''
Expand Down
5 changes: 0 additions & 5 deletions pkgs/applications/graphics/ao/src.json

This file was deleted.

30 changes: 30 additions & 0 deletions pkgs/applications/misc/gcalcli/default.nix
@@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, pkgs, lib, python, pythonPackages }:

pythonPackages.buildPythonApplication rec {
version = "3.4.0";
name = "gcalcli-${version}";

src = fetchFromGitHub {
owner = "insanum";
repo = "gcalcli";
rev = "v${version}";
sha256 = "171awccgnmfv4j7m2my9387sjy60g18kzgvscl6pzdid9fn9rrm8";
};

propagatedBuildInputs = with pythonPackages; [
dateutil
gflags
google_api_python_client
httplib2
oauth2client
parsedatetime
six
vobject
] ++ lib.optional (!pythonPackages.isPy3k) futures;

meta = with lib; {
homepage = https://github.com/insanum/gcalcli;
description = "CLI for Google Calendar";
license = licenses.mit;
};
}

0 comments on commit 9cd2dbc

Please sign in to comment.