Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2019-06-25 16:26:29 +02:00
commit 4589a04299
14 changed files with 122 additions and 30 deletions

View file

@ -26,6 +26,15 @@ in
Set it to "any" to listen on all available interfaces Set it to "any" to listen on all available interfaces
''; '';
}; };
user = mkOption {
default = "duplicati";
type = types.str;
description = ''
Duplicati runs as it's own user. It will only be able to backup world-readable files.
Run as root with special care.
'';
};
}; };
}; };
@ -37,14 +46,19 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
User = "duplicati"; User = cfg.user;
PermissionsStartOnly = true;
Group = "duplicati"; Group = "duplicati";
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati"; ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati";
Restart = "on-failure"; Restart = "on-failure";
}; };
preStart = ''
mkdir -p /var/lib/duplicati
chown -R ${cfg.user}:duplicati /var/lib/duplicati
'';
}; };
users.users.duplicati = { users.users.duplicati = lib.optionalAttrs (cfg.user == "duplicati") {
uid = config.ids.uids.duplicati; uid = config.ids.uids.duplicati;
home = "/var/lib/duplicati"; home = "/var/lib/duplicati";
createHome = true; createHome = true;

View file

@ -71,7 +71,7 @@ in {
''; '';
clusterName = mkOption { clusterName = mkOption {
type = types.str; type = types.str;
default = "NixOS Test Cluster"; default = "Test Cluster";
description = '' description = ''
The name of the cluster. The name of the cluster.
This setting prevents nodes in one logical cluster from joining This setting prevents nodes in one logical cluster from joining

View file

@ -445,7 +445,7 @@ in
type = types.bool; type = types.bool;
default = !config.boot.isContainer; default = !config.boot.isContainer;
description = '' description = ''
Whether to enable support for nixos containers. Whether to enable support for NixOS containers.
''; '';
}; };

View file

@ -1,4 +1,4 @@
{ lib, stdenv { lib, stdenv, pkgs
, haskell, nodejs , haskell, nodejs
, fetchurl, fetchpatch, makeWrapper, writeScriptBin }: , fetchurl, fetchpatch, makeWrapper, writeScriptBin }:
let let
@ -8,7 +8,7 @@ let
elmNodePackages = elmNodePackages =
import ./packages/node-composition.nix { import ./packages/node-composition.nix {
inherit nodejs; inherit nodejs pkgs;
inherit (stdenv.hostPlatform) system; inherit (stdenv.hostPlatform) system;
}; };

View file

@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
"; ";
passthru = { passthru = {
inherit compat24 compat26 unicode; inherit compat28 compat30 unicode;
gtk = if withGtk2 then gtk2 else gtk3; gtk = if withGtk2 then gtk2 else gtk3;
}; };

View file

@ -0,0 +1,35 @@
{ buildPythonPackage
, callPackage
, pytestcov
, fetchPypi
, lib
, pytest
, pythonOlder
, pytestrunner
}:
buildPythonPackage rec {
pname = "pycategories";
version = "1.2.0";
disabled = pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
sha256 = "bd70ecb5e94e7659e564ea153f0c7673291dc37c526c246800fc08d6c5378099";
};
nativeBuildInputs = [ pytestrunner ];
# Is private because the author states it's unmaintained
# and shouldn't be used in production code
propagatedBuildInputs = [ (callPackage ./infix.nix { }) ];
checkInputs = [ pytest pytestcov ];
meta = with lib; {
homepage = "https://gitlab.com/danielhones/pycategories";
description = "Implementation of some concepts from category theory";
license = licenses.mit;
maintainers = with maintainers; [ dmvianna ];
};
}

View file

@ -0,0 +1,23 @@
{ buildPythonPackage
, lib
, fetchPypi
}:
buildPythonPackage rec {
pname = "infix";
version = "1.2";
src = fetchPypi {
inherit pname version;
sha256 = "a1bfdcf875bc072f41e426d0673f2e3017750743bb90cc725fffb292eb09648c";
};
# No tests
doCheck = false;
meta = {
homepage = "https://github.com/borntyping/python-infix";
description = "A decorator that allows functions to be used as infix functions";
license = lib.licenses.mit;
};
}

View file

@ -1,6 +1,8 @@
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext, libiconv { stdenv, fetchFromGitHub, autoreconfHook, lua5_3, pkgconfig, python
, zlib, bzip2, curl, lzma, gettext, libiconv
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth , sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
, gtkClient ? false, gtk2 , gtkClient ? false, gtk3
, qtClient ? false, qt5
, server ? true, readline , server ? true, readline
, enableSqlite ? true, sqlite , enableSqlite ? true, sqlite
}: }:
@ -8,31 +10,42 @@
let let
inherit (stdenv.lib) optional optionals; inherit (stdenv.lib) optional optionals;
name = "freeciv"; in stdenv.mkDerivation rec {
pname = "freeciv";
version = "2.6.0"; version = "2.6.0";
in
stdenv.mkDerivation {
name = "${name}-${version}";
inherit version;
src = fetchurl { src = fetchFromGitHub {
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2"; owner = "freeciv";
sha256 = "16f9wsnn7073s6chzbm3819swd0iw019p9nrzr3diiynk28kj83w"; repo = "freeciv";
rev = "R${builtins.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "1b3q5k9wpv7z24svz01ybw8d8wlzkkdr6ia5hgp6cxk6vq67n67s";
}; };
nativeBuildInputs = [ pkgconfig ]; postPatch = ''
for f in {common,utility}/*.py; do
substituteInPlace $f \
--replace '/usr/bin/env python' ${python.interpreter}
done
'';
buildInputs = [ zlib bzip2 curl lzma gettext libiconv ] nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ lua5_3 zlib bzip2 curl lzma gettext libiconv ]
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ] ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
++ optionals gtkClient [ gtk2 ] ++ optionals gtkClient [ gtk3 ]
++ optionals qtClient [ qt5.qtbase ]
++ optional server readline ++ optional server readline
++ optional enableSqlite sqlite; ++ optional enableSqlite sqlite;
configureFlags = [ "--enable-shared" ] configureFlags = [ "--enable-shared" ]
++ optional sdlClient "--enable-client=sdl" ++ optional sdlClient "--enable-client=sdl"
++ optionals qtClient [
"--enable-client=qt"
"--with-qt5-includes=${qt5.qtbase.dev}/include"
]
++ optional enableSqlite "--enable-fcdb=sqlite3" ++ optional enableSqlite "--enable-fcdb=sqlite3"
++ optional (!gtkClient) "--enable-fcmp=cli" ++ optional (!gtkClient) "--enable-fcmp=cli"
++ optional (!server) "--disable-server"; ++ optional (!server) "--disable-server";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -46,11 +59,11 @@ stdenv.mkDerivation {
to the space age... to the space age...
''; '';
homepage = http://freeciv.wikia.com/; homepage = http://www.freeciv.org; # http only
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ pierron ]; maintainers = with maintainers; [ pierron ];
platforms = platforms.unix; platforms = platforms.unix;
hydraPlatforms = stdenv.lib.platforms.linux; # sdl-config times out on darwin hydraPlatforms = platforms.linux; # sdl-config times out on darwin
}; };
} }

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "acpilight"; pname = "acpilight";
version = "1.1"; version = "1.2";
src = fetchgit { src = fetchgit {
url = "https://gitlab.com/wavexx/acpilight.git"; url = "https://gitlab.com/wavexx/acpilight.git";
rev = "v${version}"; rev = "v${version}";
sha256 = "0kykrl71fb146vaq8207c3qp03h2djkn8hn6psryykk8gdzkv3xd"; sha256 = "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w";
}; };
pyenv = python3.withPackages (pythonPackages: with pythonPackages; [ pyenv = python3.withPackages (pythonPackages: with pythonPackages; [

View file

@ -29,9 +29,8 @@ buildPythonApplication rec {
chmod +x $out/bin/* chmod +x $out/bin/*
''; '';
fixupPhase = '' postFixup = ''
wrapProgram "$out/bin/couchpotato" --set PYTHONPATH "$PYTHONPATH:$out/${python.sitePackages}" \ wrapProgram "$out/bin/couchpotato" --set PYTHONPATH "$PYTHONPATH:$out/${python.sitePackages}"
--set PATH ${python}/bin
''; '';
meta = { meta = {

View file

@ -16,6 +16,7 @@ rustPlatform.buildRustPackage rec {
meta = with lib; { meta = with lib; {
description = "Cargo subcommand to see license of dependencies"; description = "Cargo subcommand to see license of dependencies";
homepage = "https://github.com/onur/cargo-license";
license = with licenses; [ mit ]; license = with licenses; [ mit ];
maintainers = with maintainers; [ basvandijk ]; maintainers = with maintainers; [ basvandijk ];
platforms = platforms.all; platforms = platforms.all;

View file

@ -2,7 +2,7 @@
buildGoPackage rec { buildGoPackage rec {
name = "vale-${version}"; name = "vale-${version}";
version = "1.4.2"; version = "1.4.3";
goPackagePath = "github.com/errata-ai/vale"; goPackagePath = "github.com/errata-ai/vale";
@ -12,7 +12,7 @@ buildGoPackage rec {
owner = "errata-ai"; owner = "errata-ai";
repo = "vale"; repo = "vale";
rev = "v${version}"; rev = "v${version}";
sha256 = "180532jp6m2ryppkjszs8b8gmvx9h54c8423par3907bgdxyzqj8"; sha256 = "1dgh2frf577048cacwnrl0xx5hha055z42sqq38lf07ybwyxdxms";
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -21527,6 +21527,11 @@ in
sdlClient = false; sdlClient = false;
}; };
freeciv_qt = freeciv.override {
qtClient = true;
sdlClient = false;
};
freedink = callPackage ../games/freedink { }; freedink = callPackage ../games/freedink { };
freeorion = callPackage ../games/freeorion { }; freeorion = callPackage ../games/freeorion { };

View file

@ -686,6 +686,8 @@ in {
inherit (pkgs) pkgconfig; inherit (pkgs) pkgconfig;
}; };
pycategories = callPackage ../development/python-modules/pycategories { };
pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie { pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie {
inherit (pkgs) pkgconfig; inherit (pkgs) pkgconfig;
}); });