Skip to content

Commit

Permalink
Merge branch 'master' into refs/top-bases/experimental/haxe
Browse files Browse the repository at this point in the history
* master: (78 commits)
  nixos/cgminer: fix restarts, set uid
  Add a LUA_COMPAT_ALL version of Lua 5.2
  direnv 2.2.1
  gst_all_1: recurseIntoAttrs
  Gnome3: add gdm 3.10.0.1
  Add accountservice, needed for gdm.
  Gnome1: add gobjectIntrospection to rest
  services.postgresql: Hint to use mkForce for authentication
  haskellPackages.scientific: Enable tests
  virt-manager: Add graphical support for the Spice protocol
  virt-manager: Fix error: 'ImportError: No module named libvirt'
  gstreamer.libav.withSystemLibav: default to true as agreed on NixOS#1403
  update: connman-ui to latest
  connman-vpn and connman-vpn dbus servise should start after connman service
  connman: new packages ConnMan v1.20 and connman-ui
  pyqt4: update to 4.10.3 and add python3 support
  sip: update to 4.15.4 and add python3 support
  gloss-raster: fix attribute name
  gloss-raster: new package
  wineStable: maintenance update 1.6.1 -> .2, use lcms2
  ...
  • Loading branch information
MarcWeber committed Jan 13, 2014
2 parents 25e2d44 + 119257f commit e788027
Show file tree
Hide file tree
Showing 87 changed files with 1,221 additions and 323 deletions.
1 change: 1 addition & 0 deletions lib/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
lovek323 = "Jason O'Conal <[email protected]>";
ludo = "Ludovic Courtès <[email protected]>";
marcweber = "Marc Weber <[email protected]>";
matejc = "Matej Cotman <[email protected]>";
modulistic = "Pablo Costa <[email protected]>";
mornfall = "Petr Ročkai <[email protected]>";
ocharles = "Oliver Charles <[email protected]>";
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/misc/ids.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
mongodb = 98;
openldap = 99;
memcached = 100;
cgminer = 101;

# When adding a uid, make sure it doesn't match an existing gid.

Expand Down Expand Up @@ -197,6 +198,7 @@
minidlna = 91;
haproxy = 92;
openldap = 93;
connman = 94;

# When adding a gid, make sure it doesn't match an existing uid.

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
./services/networking/avahi-daemon.nix
./services/networking/bind.nix
./services/networking/bitlbee.nix
./services/networking/connman.nix
./services/networking/cntlm.nix
./services/networking/chrony.nix
./services/networking/ddclient.nix
Expand Down
6 changes: 5 additions & 1 deletion nixos/modules/services/databases/postgresql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ in
type = types.lines;
default = "";
description = ''
Defines how users authenticate themselves to the server.
Defines how users authenticate themselves to the server. By
default, "trust" access to local users will always be granted
along with any other custom options. If you do not want this,
set this option using "pkgs.lib.mkForce" to override this
behaviour.
'';
};

Expand Down
17 changes: 10 additions & 7 deletions nixos/modules/services/misc/cgminer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,30 +108,33 @@ in

config = mkIf config.services.cgminer.enable {

users.extraUsers = singleton
{ name = cfg.user;
users.extraUsers = optionalAttrs (cfg.user == "cgminer") (singleton
{ name = "cgminer";
uid = config.ids.uids.cgminer;
description = "Cgminer user";
};
});

environment.systemPackages = [ cfg.package ];

systemd.services.cgminer = {
path = [ pkgs.cgminer ];

after = [ "display-manager.target" "network.target" ];
after = [ "network.target" "display-manager.service" ];
wantedBy = [ "multi-user.target" ];

environment = {
environment = {
LD_LIBRARY_PATH = ''/run/opengl-driver/lib:/run/opengl-driver-32/lib'';
DISPLAY = ":0";
GPU_MAX_ALLOC_PERCENT = "100";
GPU_USE_SYNC_OBJECTS = "1";
};

serviceConfig = {
ExecStart = "${pkgs.cgminer}/bin/cgminer -T -c ${cgminerConfig}";
ExecStart = "${pkgs.cgminer}/bin/cgminer --syslog --text-only --config ${cgminerConfig}";
User = cfg.user;
RestartSec = 10;
RestartSec = "30s";
Restart = "always";
StartLimitInterval = "1m";
};
};

Expand Down
94 changes: 94 additions & 0 deletions nixos/modules/services/networking/connman.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{ config, pkgs, ... }:

with pkgs.lib;
with pkgs;

let
cfg = config.networking.connman;

in {

###### interface

options = {

networking.connman = {

enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to use ConnMan for managing your network connections.
'';
};

};

};

###### implementation

config = mkIf cfg.enable {

assertions = [{
assertion = config.networking.useDHCP == false;
message = "You can not use services.networking.connman with services.networking.useDHCP";
}{
assertion = config.networking.wireless.enable == true;
message = "You must use services.networking.connman with services.networking.wireless";
}{
assertion = config.networking.networkmanager.enable == false;
message = "You can not use services.networking.connman with services.networking.networkmanager";
}];

environment.systemPackages = [ connman ];

systemd.services."connman" = {
description = "Connection service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
serviceConfig = {
Type = "dbus";
BusName = "net.connman";
Restart = "on-failure";
ExecStart = "${pkgs.connman}/sbin/connmand --nodaemon";
StandardOutput = "null";
};
};

systemd.services."connman-vpn" = {
description = "ConnMan VPN service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
before = [ "connman" ];
serviceConfig = {
Type = "dbus";
BusName = "net.connman.vpn";
ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
StandardOutput = "null";
};
};

systemd.services."net-connman-vpn" = {
description = "D-BUS Service";
serviceConfig = {
Name = "net.connman.vpn";
before = [ "connman" ];
ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
User = "root";
SystemdService = "connman-vpn.service";
};
};

networking = {
useDHCP = false;
wireless.enable = true;
networkmanager.enable = false;
};

powerManagement.resumeCommands = ''
systemctl restart connman
'';

};
}
21 changes: 21 additions & 0 deletions pkgs/applications/audio/lastfmsubmitd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ stdenv, fetchurl, pythonPackages }:

pythonPackages.buildPythonPackage rec {
name = "lastfmsubmitd-${version}";
namePrefix = "";
version = "1.0.6";

src = fetchurl {
url = "http://www.red-bean.com/decklin/lastfmsubmitd/lastfmsubmitd-${version}.tar.gz";
sha256 = "c2636d5095a95167366bacd458624d67b046e060244fa54ba2c2e3efb79f9b0e";
};

doCheck = false;

installCommand = "python setup.py install --prefix=$out";

meta = {
homepage = "http://www.red-bean.com/decklin/lastfmsubmitd/";
description = "An last.fm audio scrobbler and daemon";
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/audio/moc/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg, libvorbis, mpc, libsndfile, jackaudio, db4, libav, libmodplug, timidity, libid3tag, libtool }:
{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg_0_10, libvorbis, mpc, libsndfile, jackaudio, db4, libmodplug, timidity, libid3tag, libtool }:

stdenv.mkDerivation rec {
name = "moc-${version}";
Expand All @@ -11,7 +11,7 @@ stdenv.mkDerivation rec {

configurePhase = "./configure prefix=$out";

buildInputs = [ ncurses pkgconfig alsaLib flac libmad speex ffmpeg libvorbis mpc libsndfile jackaudio db4 libav libmodplug timidity libid3tag libtool ];
buildInputs = [ ncurses pkgconfig alsaLib flac libmad speex ffmpeg_0_10 libvorbis mpc libsndfile jackaudio db4 libmodplug timidity libid3tag libtool ];

meta = {
description = "MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use.";
Expand Down
51 changes: 51 additions & 0 deletions pkgs/applications/audio/projectm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ stdenv, fetchurl, pkgconfig, cmake
, glew, ftgl, ttf_bitstream_vera
, withQt ? true, qt4
, withLibvisual ? false, libvisual, SDL
, withJack ? false, jackaudio
, withPulseAudio ? true, pulseaudio
}:

assert withJack -> withQt;
assert withPulseAudio -> withQt;

stdenv.mkDerivation {
name = "projectm-2.1.0";

meta = {
description = "Music Visualizer";
homepage = "http://projectm.sourceforge.net/";
license = stdenv.lib.licenses.lgpl21Plus;
platforms = stdenv.lib.platforms.linux;
};

src = fetchurl {
url = "mirror://sourceforge/projectm/2.1.0/projectM-complete-2.1.0-Source.tar.gz";
sha256 = "1vh6jk68a0jdb6qwppb6f8cbgmhnv2ba3bcavzfd6sq06gq08cji";
};

patchPhase = ''
sed -i 's:''${LIBVISUAL_PLUGINSDIR}:''${CMAKE_INSTALL_PREFIX}/lib/libvisual-0.4:' \
src/projectM-libvisual/CMakeLists.txt
'';

nativeBuildInputs = [ pkgconfig cmake ];

cmakeFlags = ''
-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf
-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf
-DINCLUDE-PROJECTM-TEST=OFF
-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}
-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}
-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}
-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}
'';

buildInputs = with stdenv.lib;
[ glew ftgl ]
++ optional withQt qt4
++ optionals withLibvisual [ libvisual SDL ]
++ optional withJack jackaudio
++ optional withPulseAudio pulseaudio
;
}
70 changes: 19 additions & 51 deletions pkgs/applications/audio/snd/default.nix
Original file line number Diff line number Diff line change
@@ -1,58 +1,26 @@
args :
let
lib = args.lib;
fetchurl = args.fetchurl;
fullDepEntry = args.fullDepEntry;
{ stdenv, fetchurl, pkgconfig
, gtk2, alsaLib
, fftw, gsl
}:

version = lib.attrByPath ["version"] "9.4" args;
buildInputs = with args; [gtk glib pkgconfig
libXpm gmp gettext libX11 fftw]
++ (lib.optional (args ? ruby) args.ruby)
++ (lib.optional (args ? mesa) args.mesa)
++ (lib.optional (args ? guile) args.guile)
++ (lib.optional (args ? libtool) args.libtool)
++ (lib.optional (args ? sndlib) args.sndlib)
++ (lib.optional (args ? alsaLib) args.alsaLib)
++ (lib.optional (args ? jackaudio) args.jackaudio)
;
configureFlags = ["--with-gtk" "--with-xpm"]
++ (lib.optional (args ? ruby) "--with-ruby" )
++ (lib.optional (args ? mesa) "--with-gl" )
++ (lib.optional (args ? guile) "--with-guile")
++ (lib.optional (args ? sndlib) "--with-midi" )
++ (lib.optional (args ? alsaLib) "--with-alsa")
++ (lib.optional (args ? jackaudio) "--with-jack" )
++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
;
in
rec {
src = fetchurl {
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
};

inherit buildInputs;
configureFlags = [];

/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
"doMakeInstall" "doForceShare"];

makeDocsWork = fullDepEntry ''
# hackish way to make html docs work
h="$out/share/snd/html"; mkdir -p "$h"; cp *.html "$h"
patch -p1 < ${./doc.patch}
sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
'' ["defEnsureDir"];

preBuild = fullDepEntry (''
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
'') ["minInit" "doUnpack" "makeDocsWork"];
stdenv.mkDerivation rec {
name = "snd-14.3";

name = "snd-" + version;
meta = {
description = "Sound editor";
homepage = http://ccrma.stanford.edu/software/snd;
inherit src;
platforms = stdenv.lib.platforms.linux;
};

src = fetchurl {
url = "mirror://sourceforge/snd/${name}.tar.gz";
sha256 = "04shk34pza507kvm40dc6sdz5jz533z4q2h7m9hgqvw1r3f57ms6";
};

nativeBuildInputs = [ pkgconfig ];

buildInputs = [
gtk2 alsaLib
fftw gsl
];
}
Loading

0 comments on commit e788027

Please sign in to comment.