Merge remote-tracking branch 'upstream/master' into HEAD

This commit is contained in:
Frederik Rietdijk 2018-02-09 20:02:53 +01:00
commit 9c105bdf8f
58 changed files with 1443 additions and 250 deletions

View File

@ -1802,6 +1802,20 @@ addEnvHooks "$hostOffset" myBashFunction
disabled or patched to work with PaX.</para></listitem>
</varlistentry>
<varlistentry>
<term>autoPatchelfHook</term>
<listitem><para>This is a special setup hook which helps in packaging
proprietary software in that it automatically tries to find missing shared
library dependencies of ELF files. All packages within the
<envar>runtimeDependencies</envar> environment variable are unconditionally
added to executables, which is useful for programs that use
<citerefentry>
<refentrytitle>dlopen</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>
to load libraries at runtime.</para></listitem>
</varlistentry>
</variablelist>
</para>

View File

@ -440,7 +440,11 @@ rec {
init = list: assert list != []; take (length list - 1) list;
/* FIXME(zimbatm) Not used anywhere
/* return the image of the cross product of some lists by a function
Example:
crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]]
=> [ "13" "14" "23" "24" ]
*/
crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];

View File

@ -449,6 +449,7 @@
mirrexagon = "Andrew Abbott <mirrexagon@mirrexagon.com>";
mjanczyk = "Marcin Janczyk <m@dragonvr.pl>";
mjp = "Mike Playle <mike@mythik.co.uk>"; # github = "MikePlayle";
mkg = "Mark K Gardner <mkg@vt.edu>";
mlieberman85 = "Michael Lieberman <mlieberman85@gmail.com>";
mmahut = "Marek Mahut <marek.mahut@gmail.com>";
moaxcp = "John Mercier <moaxcp@gmail.com>";
@ -699,6 +700,7 @@
tomberek = "Thomas Bereknyei <tomberek@gmail.com>";
tomsmeets = "Tom Smeets <tom@tsmeets.nl>";
travisbhartwell = "Travis B. Hartwell <nafai@travishartwell.net>";
treemo = "Matthieu Chevrier <matthieu.chevrier@treemo.fr>";
trevorj = "Trevor Joynson <nix@trevor.joynson.io>";
trino = "Hubert Mühlhans <muehlhans.hubert@ekodia.de>";
tstrobel = "Thomas Strobel <4ZKTUB6TEP74PYJOPWIR013S2AV29YUBW5F9ZH2F4D5UMJUJ6S@hash.domains>";

View File

@ -3,6 +3,8 @@
with lib;
let
cfg = config.nixpkgs;
isConfig = x:
builtins.isAttrs x || lib.isFunction x;
@ -42,12 +44,51 @@ let
merge = lib.mergeOneOption;
};
_pkgs = import ../../.. config.nixpkgs;
pkgsType = mkOptionType {
name = "nixpkgs";
description = "An evaluation of Nixpkgs; the top level attribute set of packages";
check = builtins.isAttrs;
};
in
{
options.nixpkgs = {
pkgs = mkOption {
defaultText = literalExample
''import "''${nixos}/.." {
inherit (config.nixpkgs) config overlays system;
}
'';
default = import ../../.. { inherit (cfg) config overlays system; };
type = pkgsType;
example = literalExample ''import <nixpkgs> {}'';
description = ''
This is the evaluation of Nixpkgs that will be provided to
all NixOS modules. Defining this option has the effect of
ignoring the other options that would otherwise be used to
evaluate Nixpkgs, because those are arguments to the default
value. The default value imports the Nixpkgs source files
relative to the location of this NixOS module, because
NixOS and Nixpkgs are distributed together for consistency,
so the <code>nixos</code> in the default value is in fact a
relative path. The <code>config</code>, <code>overlays</code>
and <code>system</code> come from this option's siblings.
This option can be used by applications like NixOps to increase
the performance of evaluation, or to create packages that depend
on a container that should be built with the exact same evaluation
of Nixpkgs, for example. Applications like this should set
their default value using <code>lib.mkDefault</code>, so
user-provided configuration can override it without using
<code>lib</code>.
Note that using a distinct version of Nixpkgs with NixOS may
be an unexpected source of problems. Use this option with care.
'';
};
config = mkOption {
default = {};
example = literalExample
@ -59,6 +100,8 @@ in
The configuration of the Nix Packages collection. (For
details, see the Nixpkgs documentation.) It allows you to set
package configuration options.
Ignored when <code>nixpkgs.pkgs</code> is set.
'';
};
@ -82,6 +125,8 @@ in
takes as an argument the <emphasis>original</emphasis> Nixpkgs.
The first argument should be used for finding dependencies, and
the second should be used for overriding recipes.
Ignored when <code>nixpkgs.pkgs</code> is set.
'';
};
@ -93,14 +138,16 @@ in
If unset, it defaults to the platform type of your host system.
Specifying this option is useful when doing distributed
multi-platform deployment, or when building virtual machines.
Ignored when <code>nixpkgs.pkgs</code> is set.
'';
};
};
config = {
_module.args = {
pkgs = _pkgs;
pkgs_i686 = _pkgs.pkgsi686Linux;
pkgs = cfg.pkgs;
pkgs_i686 = cfg.pkgs.pkgsi686Linux;
};
};
}

View File

@ -111,6 +111,7 @@
./programs/wireshark.nix
./programs/xfs_quota.nix
./programs/xonsh.nix
./programs/yabar.nix
./programs/zsh/oh-my-zsh.nix
./programs/zsh/zsh.nix
./programs/zsh/zsh-syntax-highlighting.nix

View File

@ -0,0 +1,149 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.programs.yabar;
mapExtra = v: lib.concatStringsSep "\n" (mapAttrsToList (
key: val: "${key} = ${if (isString val) then "\"${val}\"" else "${builtins.toString val}"};"
) v);
listKeys = r: concatStringsSep "," (map (n: "\"${n}\"") (attrNames r));
configFile = let
bars = mapAttrsToList (
name: cfg: ''
${name}: {
font: "${cfg.font}";
position: "${cfg.position}";
${mapExtra cfg.extra}
block-list: [${listKeys cfg.indicators}]
${concatStringsSep "\n" (mapAttrsToList (
name: cfg: ''
${name}: {
exec: "${cfg.exec}";
align: "${cfg.align}";
${mapExtra cfg.extra}
};
''
) cfg.indicators)}
};
''
) cfg.bars;
in pkgs.writeText "yabar.conf" ''
bar-list = [${listKeys cfg.bars}];
${concatStringsSep "\n" bars}
'';
in
{
options.programs.yabar = {
enable = mkEnableOption "yabar";
package = mkOption {
default = pkgs.yabar;
example = literalExample "pkgs.yabar-unstable";
type = types.package;
description = ''
The package which contains the `yabar` binary.
Nixpkgs provides the `yabar` and `yabar-unstable`
derivations since 18.03, so it's possible to choose.
'';
};
bars = mkOption {
default = {};
type = types.attrsOf(types.submodule {
options = {
font = mkOption {
default = "sans bold 9";
example = "Droid Sans, FontAwesome Bold 9";
type = types.string;
description = ''
The font that will be used to draw the status bar.
'';
};
position = mkOption {
default = "top";
example = "bottom";
type = types.enum [ "top" "bottom" ];
description = ''
The position where the bar will be rendered.
'';
};
extra = mkOption {
default = {};
type = types.attrsOf types.string;
description = ''
An attribute set which contains further attributes of a bar.
'';
};
indicators = mkOption {
default = {};
type = types.attrsOf(types.submodule {
options.exec = mkOption {
example = "YABAR_DATE";
type = types.string;
description = ''
The type of the indicator to be executed.
'';
};
options.align = mkOption {
default = "left";
example = "right";
type = types.enum [ "left" "center" "right" ];
description = ''
Whether to align the indicator at the left or right of the bar.
'';
};
options.extra = mkOption {
default = {};
type = types.attrsOf (types.either types.string types.int);
description = ''
An attribute set which contains further attributes of a indicator.
'';
};
});
description = ''
Indicators that should be rendered by yabar.
'';
};
};
});
description = ''
List of bars that should be rendered by yabar.
'';
};
};
config = mkIf cfg.enable {
systemd.user.services.yabar = {
description = "yabar service";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
script = ''
${cfg.package}/bin/yabar -c ${configFile}
'';
serviceConfig.Restart = "always";
};
};
}

View File

@ -113,7 +113,7 @@ let
mailboxes = { lib, pkgs, ... }: {
options = {
name = mkOption {
type = types.str;
type = types.strMatching ''[^"]+'';
example = "Spam";
description = "The name of the mailbox.";
};

View File

@ -1,12 +1,150 @@
{ config, lib, pkgs, ... }:
{ config, options, pkgs, lib, ... }:
with lib;
let
cfg = config.services.rspamd;
opts = options.services.rspamd;
mkBindSockets = socks: concatStringsSep "\n" (map (each: " bind_socket = \"${each}\"") socks);
bindSocketOpts = {options, config, ... }: {
options = {
socket = mkOption {
type = types.str;
example = "localhost:11333";
description = ''
Socket for this worker to listen on in a format acceptable by rspamd.
'';
};
mode = mkOption {
type = types.str;
default = "0644";
description = "Mode to set on unix socket";
};
owner = mkOption {
type = types.str;
default = "${cfg.user}";
description = "Owner to set on unix socket";
};
group = mkOption {
type = types.str;
default = "${cfg.group}";
description = "Group to set on unix socket";
};
rawEntry = mkOption {
type = types.str;
internal = true;
};
};
config.rawEntry = let
maybeOption = option:
optionalString options.${option}.isDefined " ${option}=${config.${option}}";
in
if (!(hasPrefix "/" config.socket)) then "${config.socket}"
else "${config.socket}${maybeOption "mode"}${maybeOption "owner"}${maybeOption "group"}";
};
workerOpts = { name, ... }: {
options = {
enable = mkOption {
type = types.nullOr types.bool;
default = null;
description = "Whether to run the rspamd worker.";
};
name = mkOption {
type = types.nullOr types.str;
default = name;
description = "Name of the worker";
};
type = mkOption {
type = types.nullOr (types.enum [
"normal" "controller" "fuzzy_storage" "proxy" "lua"
]);
description = "The type of this worker";
};
bindSockets = mkOption {
type = types.listOf (types.either types.str (types.submodule bindSocketOpts));
default = [];
description = ''
List of sockets to listen, in format acceptable by rspamd
'';
example = [{
socket = "/run/rspamd.sock";
mode = "0666";
owner = "rspamd";
} "*:11333"];
apply = value: map (each: if (isString each)
then if (isUnixSocket each)
then {socket = each; owner = cfg.user; group = cfg.group; mode = "0644"; rawEntry = "${each}";}
else {socket = each; rawEntry = "${each}";}
else each) value;
};
count = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Number of worker instances to run
'';
};
includes = mkOption {
type = types.listOf types.str;
default = [];
description = ''
List of files to include in configuration
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = "Additional entries to put verbatim into worker section of rspamd config file.";
};
};
config = mkIf (name == "normal" || name == "controller" || name == "fuzzy") {
type = mkDefault name;
includes = mkDefault [ "$CONFDIR/worker-${name}.inc" ];
bindSockets = mkDefault (if name == "normal"
then [{
socket = "/run/rspamd/rspamd.sock";
mode = "0660";
owner = cfg.user;
group = cfg.group;
}]
else if name == "controller"
then [ "localhost:11334" ]
else [] );
};
};
indexOf = default: start: list: e:
if list == []
then default
else if (head list) == e then start
else (indexOf default (start + (length (listenStreams (head list).socket))) (tail list) e);
systemdSocket = indexOf (abort "Socket not found") 0 allSockets;
isUnixSocket = socket: hasPrefix "/" (if (isString socket) then socket else socket.socket);
isPort = hasPrefix "*:";
isIPv4Socket = hasPrefix "*v4:";
isIPv6Socket = hasPrefix "*v6:";
isLocalHost = hasPrefix "localhost:";
listenStreams = socket:
if (isLocalHost socket) then
let port = (removePrefix "localhost:" socket);
in [ "127.0.0.1:${port}" ] ++ (if config.networking.enableIPv6 then ["[::1]:${port}"] else [])
else if (isIPv6Socket socket) then [removePrefix "*v6:" socket]
else if (isPort socket) then [removePrefix "*:" socket]
else if (isIPv4Socket socket) then
throw "error: IPv4 only socket not supported in rspamd with socket activation"
else if (length (splitString " " socket)) != 1 then
throw "error: string options not supported in rspamd with socket activation"
else [socket];
mkBindSockets = enabled: socks: concatStringsSep "\n " (flatten (map (each:
if cfg.socketActivation && enabled != false then
let systemd = (systemdSocket each);
in (imap (idx: e: "bind_socket = \"systemd:${toString (systemd + idx - 1)}\";") (listenStreams each.socket))
else "bind_socket = \"${each.rawEntry}\";") socks));
rspamdConfFile = pkgs.writeText "rspamd.conf"
''
@ -22,19 +160,33 @@ let
.include "$CONFDIR/logging.inc"
}
worker {
${mkBindSockets cfg.bindSocket}
.include "$CONFDIR/worker-normal.inc"
}
worker {
${mkBindSockets cfg.bindUISocket}
.include "$CONFDIR/worker-controller.inc"
${concatStringsSep "\n" (mapAttrsToList (name: value: ''
worker ${optionalString (value.name != "normal" && value.name != "controller") "${value.name}"} {
type = "${value.type}";
${optionalString (value.enable != null)
"enabled = ${if value.enable != false then "yes" else "no"};"}
${mkBindSockets value.enable value.bindSockets}
${optionalString (value.count != null) "count = ${toString value.count};"}
${concatStringsSep "\n " (map (each: ".include \"${each}\"") value.includes)}
${value.extraConfig}
}
'') cfg.workers)}
${cfg.extraConfig}
'';
allMappedSockets = flatten (mapAttrsToList (name: value:
if value.enable != false
then imap (idx: each: {
name = "${name}";
index = idx;
value = each;
}) value.bindSockets
else []) cfg.workers);
allSockets = map (e: e.value) allMappedSockets;
allSocketNames = map (each: "rspamd-${each.name}-${toString each.index}.socket") allMappedSockets;
in
{
@ -48,36 +200,43 @@ in
enable = mkEnableOption "Whether to run the rspamd daemon.";
debug = mkOption {
type = types.bool;
default = false;
description = "Whether to run the rspamd daemon in debug mode.";
};
bindSocket = mkOption {
type = types.listOf types.str;
default = [
"/run/rspamd/rspamd.sock mode=0660 owner=${cfg.user} group=${cfg.group}"
];
defaultText = ''[
"/run/rspamd/rspamd.sock mode=0660 owner=${cfg.user} group=${cfg.group}"
]'';
socketActivation = mkOption {
type = types.bool;
description = ''
List of sockets to listen, in format acceptable by rspamd
'';
example = ''
bindSocket = [
"/run/rspamd.sock mode=0666 owner=rspamd"
"*:11333"
];
Enable systemd socket activation for rspamd.
'';
};
bindUISocket = mkOption {
type = types.listOf types.str;
default = [
"localhost:11334"
];
workers = mkOption {
type = with types; attrsOf (submodule workerOpts);
description = ''
List of sockets for web interface, in format acceptable by rspamd
Attribute set of workers to start.
'';
default = {
normal = {};
controller = {};
};
example = literalExample ''
{
normal = {
includes = [ "$CONFDIR/worker-normal.inc" ];
bindSockets = [{
socket = "/run/rspamd/rspamd.sock";
mode = "0660";
owner = "${cfg.user}";
group = "${cfg.group}";
}];
};
controller = {
includes = [ "$CONFDIR/worker-controller.inc" ];
bindSockets = [ "[::1]:11334" ];
};
}
'';
};
@ -113,6 +272,13 @@ in
config = mkIf cfg.enable {
services.rspamd.socketActivation = mkDefault (!opts.bindSocket.isDefined && !opts.bindUISocket.isDefined);
assertions = [ {
assertion = !cfg.socketActivation || !(opts.bindSocket.isDefined || opts.bindUISocket.isDefined);
message = "Can't use socketActivation for rspamd when using renamed bind socket options";
} ];
# Allow users to run 'rspamc' and 'rspamadm'.
environment.systemPackages = [ pkgs.rspamd ];
@ -128,17 +294,22 @@ in
gid = config.ids.gids.rspamd;
};
environment.etc."rspamd.conf".source = rspamdConfFile;
systemd.services.rspamd = {
description = "Rspamd Service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wantedBy = mkIf (!cfg.socketActivation) [ "multi-user.target" ];
after = [ "network.target" ] ++
(if cfg.socketActivation then allSocketNames else []);
requires = mkIf cfg.socketActivation allSocketNames;
serviceConfig = {
ExecStart = "${pkgs.rspamd}/bin/rspamd ${optionalString cfg.debug "-d"} --user=${cfg.user} --group=${cfg.group} --pid=/run/rspamd.pid -c ${rspamdConfFile} -f";
Restart = "always";
RuntimeDirectory = "rspamd";
PrivateTmp = true;
Sockets = mkIf cfg.socketActivation (concatStringsSep " " allSocketNames);
};
preStart = ''
@ -146,5 +317,25 @@ in
${pkgs.coreutils}/bin/chown ${cfg.user}:${cfg.group} /var/lib/rspamd
'';
};
systemd.sockets = mkIf cfg.socketActivation
(listToAttrs (map (each: {
name = "rspamd-${each.name}-${toString each.index}";
value = {
description = "Rspamd socket ${toString each.index} for worker ${each.name}";
wantedBy = [ "sockets.target" ];
listenStreams = (listenStreams each.value.socket);
socketConfig = {
BindIPv6Only = mkIf (isIPv6Socket each.value.socket) "ipv6-only";
Service = "rspamd.service";
SocketUser = mkIf (isUnixSocket each.value.socket) each.value.owner;
SocketGroup = mkIf (isUnixSocket each.value.socket) each.value.group;
SocketMode = mkIf (isUnixSocket each.value.socket) each.value.mode;
};
};
}) allMappedSockets));
};
imports = [
(mkRenamedOptionModule [ "services" "rspamd" "bindSocket" ] [ "services" "rspamd" "workers" "normal" "bindSockets" ])
(mkRenamedOptionModule [ "services" "rspamd" "bindUISocket" ] [ "services" "rspamd" "workers" "controller" "bindSockets" ])
];
}

View File

@ -64,6 +64,16 @@ in {
'';
};
group = mkOption {
default = "traefik";
type = types.string;
example = "docker";
description = ''
Set the group that traefik runs under.
For the docker backend this needs to be set to <literal>docker</literal> instead.
'';
};
package = mkOption {
default = pkgs.traefik;
defaultText = "pkgs.traefik";
@ -87,7 +97,7 @@ in {
];
Type = "simple";
User = "traefik";
Group = "traefik";
Group = cfg.group;
Restart = "on-failure";
StartLimitInterval = 86400;
StartLimitBurst = 5;

View File

@ -2,7 +2,7 @@
# and nixos-14.04). The channel is updated every time the tested job
# succeeds, and all other jobs have finished (they may fail).
{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; }
{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; }
, stableBranch ? false
, supportedSystems ? [ "x86_64-linux" ]
, limitedSupportedSystems ? [ "i686-linux" ]

View File

@ -2,7 +2,7 @@
# small subset of Nixpkgs, mostly useful for servers that need fast
# security updates.
{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; }
{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; }
, stableBranch ? false
, supportedSystems ? [ "x86_64-linux" ] # no i686-linux
}:
@ -41,6 +41,7 @@ in rec {
nfs3
openssh
php-pcre
predictable-interface-names
proxy
simple;
installer = {

View File

@ -1,4 +1,4 @@
{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; }
{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; }
, stableBranch ? false
, supportedSystems ? [ "x86_64-linux" "aarch64-linux" ]
}:
@ -326,6 +326,7 @@ in rec {
tests.pgmanage = callTest tests/pgmanage.nix {};
tests.postgis = callTest tests/postgis.nix {};
#tests.pgjwt = callTest tests/pgjwt.nix {};
tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {};
tests.printing = callTest tests/printing.nix {};
tests.prometheus = callTest tests/prometheus.nix {};
tests.proxy = callTest tests/proxy.nix {};
@ -333,6 +334,7 @@ in rec {
# tests.quagga = callTest tests/quagga.nix {};
tests.quake3 = callTest tests/quake3.nix {};
tests.radicale = callTest tests/radicale.nix {};
tests.rspamd = callSubTests tests/rspamd.nix {};
tests.runInMachine = callTest tests/run-in-machine.nix {};
tests.samba = callTest tests/samba.nix {};
tests.sddm = callSubTests tests/sddm.nix {};
@ -351,6 +353,7 @@ in rec {
tests.wordpress = callTest tests/wordpress.nix {};
tests.xfce = callTest tests/xfce.nix {};
tests.xmonad = callTest tests/xmonad.nix {};
tests.yabar = callTest tests/yabar.nix {};
tests.zookeeper = callTest tests/zookeeper.nix {};
/* Build a bunch of typical closures so that Hydra can keep track of

View File

@ -0,0 +1,27 @@
{ system ? builtins.currentSystem
, pkgs ? import ../.. { inherit system; }
}:
with import ../lib/testing.nix { inherit system; };
let boolToString = x: if x then "yes" else "no"; in
let testWhenSetTo = predictable: withNetworkd:
makeTest {
name = "${if predictable then "" else "un"}predictableInterfaceNames${if withNetworkd then "-with-networkd" else ""}";
meta = {};
machine = { config, pkgs, ... }: {
networking.usePredictableInterfaceNames = pkgs.stdenv.lib.mkForce predictable;
networking.useNetworkd = withNetworkd;
networking.dhcpcd.enable = !withNetworkd;
};
testScript = ''
print $machine->succeed("ip link");
$machine->succeed("ip link show ${if predictable then "ens3" else "eth0"}");
$machine->fail("ip link show ${if predictable then "eth0" else "ens3"}");
'';
}; in
with pkgs.stdenv.lib.lists;
with pkgs.stdenv.lib.attrsets;
listToAttrs (map (drv: nameValuePair drv.name drv) (
crossLists testWhenSetTo [[true false] [true false]]
))

140
nixos/tests/rspamd.nix Normal file
View File

@ -0,0 +1,140 @@
{ system ? builtins.currentSystem }:
with import ../lib/testing.nix { inherit system; };
with pkgs.lib;
let
initMachine = ''
startAll
$machine->waitForUnit("rspamd.service");
$machine->succeed("id \"rspamd\" >/dev/null");
'';
checkSocket = socket: user: group: mode: ''
$machine->succeed("ls ${socket} >/dev/null");
$machine->succeed("[[ \"\$(stat -c %U ${socket})\" == \"${user}\" ]]");
$machine->succeed("[[ \"\$(stat -c %G ${socket})\" == \"${group}\" ]]");
$machine->succeed("[[ \"\$(stat -c %a ${socket})\" == \"${mode}\" ]]");
'';
simple = name: socketActivation: enableIPv6: makeTest {
name = "rspamd-${name}";
machine = {
services.rspamd = {
enable = true;
socketActivation = socketActivation;
};
networking.enableIPv6 = enableIPv6;
};
testScript = ''
startAll
$machine->waitForUnit("multi-user.target");
$machine->waitForOpenPort(11334);
$machine->waitForUnit("rspamd.service");
$machine->succeed("id \"rspamd\" >/dev/null");
${checkSocket "/run/rspamd/rspamd.sock" "rspamd" "rspamd" "660" }
sleep 10;
$machine->log($machine->succeed("cat /etc/rspamd.conf"));
$machine->log($machine->succeed("systemctl cat rspamd.service"));
${if socketActivation then ''
$machine->log($machine->succeed("systemctl cat rspamd-controller-1.socket"));
$machine->log($machine->succeed("systemctl cat rspamd-normal-1.socket"));
'' else ''
$machine->fail("systemctl cat rspamd-controller-1.socket");
$machine->fail("systemctl cat rspamd-normal-1.socket");
''}
$machine->log($machine->succeed("curl http://localhost:11334/auth"));
$machine->log($machine->succeed("curl http://127.0.0.1:11334/auth"));
${optionalString enableIPv6 ''
$machine->log($machine->succeed("curl http://[::1]:11334/auth"));
''}
'';
};
in
{
simple = simple "simple" false true;
ipv4only = simple "ipv4only" false false;
simple-socketActivated = simple "simple-socketActivated" true true;
ipv4only-socketActivated = simple "ipv4only-socketActivated" true false;
deprecated = makeTest {
name = "rspamd-deprecated";
machine = {
services.rspamd = {
enable = true;
bindSocket = [ "/run/rspamd.sock mode=0600 user=root group=root" ];
bindUISocket = [ "/run/rspamd-worker.sock mode=0666 user=root group=root" ];
};
};
testScript = ''
${initMachine}
$machine->waitForFile("/run/rspamd.sock");
${checkSocket "/run/rspamd.sock" "root" "root" "600" }
${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" }
$machine->log($machine->succeed("cat /etc/rspamd.conf"));
$machine->fail("systemctl cat rspamd-normal-1.socket");
$machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat"));
$machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping"));
'';
};
bindports = makeTest {
name = "rspamd-bindports";
machine = {
services.rspamd = {
enable = true;
socketActivation = false;
workers.normal.bindSockets = [{
socket = "/run/rspamd.sock";
mode = "0600";
owner = "root";
group = "root";
}];
workers.controller.bindSockets = [{
socket = "/run/rspamd-worker.sock";
mode = "0666";
owner = "root";
group = "root";
}];
};
};
testScript = ''
${initMachine}
$machine->waitForFile("/run/rspamd.sock");
${checkSocket "/run/rspamd.sock" "root" "root" "600" }
${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" }
$machine->log($machine->succeed("cat /etc/rspamd.conf"));
$machine->fail("systemctl cat rspamd-normal-1.socket");
$machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat"));
$machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping"));
'';
};
socketActivated = makeTest {
name = "rspamd-socketActivated";
machine = {
services.rspamd = {
enable = true;
workers.normal.bindSockets = [{
socket = "/run/rspamd.sock";
mode = "0600";
owner = "root";
group = "root";
}];
workers.controller.bindSockets = [{
socket = "/run/rspamd-worker.sock";
mode = "0666";
owner = "root";
group = "root";
}];
};
};
testScript = ''
startAll
$machine->waitForFile("/run/rspamd.sock");
${checkSocket "/run/rspamd.sock" "root" "root" "600" }
${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" }
$machine->log($machine->succeed("cat /etc/rspamd.conf"));
$machine->log($machine->succeed("systemctl cat rspamd-normal-1.socket"));
$machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat"));
$machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping"));
'';
};
}

25
nixos/tests/yabar.nix Normal file
View File

@ -0,0 +1,25 @@
import ./make-test.nix ({ pkgs, lib }:
with lib;
{
name = "yabar";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ma27 ];
};
nodes.yabar = {
imports = [ ./common/x11.nix ./common/user-account.nix ];
services.xserver.displayManager.auto.user = "bob";
programs.yabar.enable = true;
};
testScript = ''
$yabar->start;
$yabar->waitForX;
$yabar->waitForUnit("yabar.service", "bob");
'';
})

View File

@ -9,7 +9,7 @@ let
# Latest version number can be found at:
# http://repository-origin.spotify.com/pool/non-free/s/spotify-client/
# Be careful not to pick the testing version.
version = "1.0.69.336.g7edcc575-39";
version = "1.0.70.399.g5ffabd56-26";
deps = [
alsaLib
@ -54,7 +54,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb";
sha256 = "0bh2q7g478g7wj661fypxcbhrbq87zingfyigg7rz1shgsgwc3gd";
sha256 = "0kpakz11xkyqqjvln4jkhc3z5my8zgpw8m6jx954cjdbc6vkxd29";
};
buildInputs = [ dpkg makeWrapper ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation (rec {
name = "ProofGeneral-unstable-${version}";
version = "2017-11-06";
version = "2018-01-30";
src = fetchFromGitHub {
owner = "ProofGeneral";
repo = "PG";
rev = "2eab72c33751768c8a6cde36b978ea4a36b91843";
sha256 = "1l3n48d6d4l5q3wkhdyp8dc6hzdw1ckdzr57dj8rdm78j87vh2cg";
rev = "945cada601c5729edd16fcc989a3969c8b34d20a";
sha256 = "1zjmbhq6c8g8b93nnsvr5pxx6mlcndb0fz152b2h80vfh9663cn8";
};
buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;

View File

@ -4,7 +4,10 @@
}:
let
version = "1.1.414";
verMajor = "1";
verMinor = "1";
verPatch = "423";
version = "${verMajor}.${verMinor}.${verPatch}";
ginVer = "1.5";
gwtVer = "2.7.0";
in
@ -19,46 +22,30 @@ stdenv.mkDerivation rec {
owner = "rstudio";
repo = "rstudio";
rev = "v${version}";
sha256 = "1rr2zkv53r8swhq5d745jpp0ivxpsizzh7srf34isqpkn5pgx3v8";
sha256 = "02kpmzh0vr0gb5dhiwcm4gwjbc3biwz0km655mgzmx9j64cyd3nf";
};
# Hack RStudio to only use the input R.
patches = [ ./r-location.patch ];
postPatch = "substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}";
inherit ginVer;
ginSrc = fetchurl {
url = "https://s3.amazonaws.com/rstudio-buildtools/gin-${ginVer}.zip";
sha256 = "155bjrgkf046b8ln6a55x06ryvm8agnnl7l8bkwwzqazbpmz8qgm";
};
inherit gwtVer;
gwtSrc = fetchurl {
url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip";
sha256 = "1cs78z9a1jg698j2n35wsy07cy4fxcia9gi00x0r0qc3fcdhcrda";
};
hunspellDictionaries = builtins.attrValues hunspellDicts;
hunspellDictionaries = with stdenv.lib; filter isDerivation (attrValues hunspellDicts);
mathJaxSrc = fetchurl {
url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
sha256 = "0wbcqb9rbfqqvvhqr1pbqax75wp8ydqdyhp91fbqfqp26xzjv6lk";
};
rmarkdownSrc = fetchFromGitHub {
owner = "rstudio";
repo = "rmarkdown";
rev = "v1.8";
sha256 = "1blqxdr1vp2z5wd52nmf8hq36sdd4s2pyms441dqj50v35f8girb";
};
rsconnectSrc = fetchFromGitHub {
owner = "rstudio";
repo = "rsconnect";
rev = "953c945779dd180c1bfe68f41c173c13ec3e222d";
sha256 = "1yxwd9v4mvddh7m5rbljicmssw7glh1lhin7a9f01vxxa92vpj7z";
};
rstudiolibclang = fetchurl {
url = https://s3.amazonaws.com/rstudio-buildtools/libclang-3.5.zip;
sha256 = "1sl5vb8misipwbbbykdymw172w9qrh8xv3p29g0bf3nzbnv6zc7c";
@ -71,31 +58,31 @@ stdenv.mkDerivation rec {
preConfigure =
''
export RSTUDIO_VERSION_MAJOR=${verMajor}
export RSTUDIO_VERSION_MINOR=${verMinor}
export RSTUDIO_VERSION_PATCH=${verPatch}
GWT_LIB_DIR=src/gwt/lib
mkdir -p $GWT_LIB_DIR/gin/$ginVer
unzip $ginSrc -d $GWT_LIB_DIR/gin/$ginVer
mkdir -p $GWT_LIB_DIR/gin/${ginVer}
unzip ${ginSrc} -d $GWT_LIB_DIR/gin/${ginVer}
unzip $gwtSrc
unzip ${gwtSrc}
mkdir -p $GWT_LIB_DIR/gwt
mv gwt-$gwtVer $GWT_LIB_DIR/gwt/$gwtVer
mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer}
mkdir dependencies/common/dictionaries
for dict in $hunspellDictionaries; do
for i in "$dict/share/hunspell/"*
do ln -sv $i dependencies/common/dictionaries/
for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do
for i in "$dict/share/hunspell/"*; do
ln -sv $i dependencies/common/dictionaries/
done
done
unzip $mathJaxSrc -d dependencies/common/mathjax-26
mkdir -p dependencies/common/rmarkdown
ln -s $rmarkdownSrc dependencies/common/rmarkdown/
mkdir -p dependencies/common/rsconnect
ln -s $rsconnectSrc dependencies/common/rsconnect/
unzip ${mathJaxSrc} -d dependencies/common/mathjax-26
mkdir -p dependencies/common/libclang/3.5
unzip $rstudiolibclang -d dependencies/common/libclang/3.5
unzip ${rstudiolibclang} -d dependencies/common/libclang/3.5
mkdir -p dependencies/common/libclang/builtin-headers
unzip $rstudiolibclangheaders -d dependencies/common/libclang/builtin-headers
unzip ${rstudiolibclangheaders} -d dependencies/common/libclang/builtin-headers
mkdir -p dependencies/common/pandoc
cp ${pandoc}/bin/pandoc dependencies/common/pandoc/

View File

@ -3,18 +3,18 @@
stdenv.mkDerivation rec {
name = "typora-${version}";
version = "0.9.41";
version = "0.9.44";
src =
if stdenv.system == "x86_64-linux" then
fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "e4916f86c7c12aec8fd59b3ef79c2a4d3f77b02a0a9e962916c688871c9fda1d";
sha256 = "9442c090bf2619d270890228abd7dabb9e217c0b200615f8ed3cb255efd122d5";
}
else
fetchurl {
url = "https://www.typora.io/linux/typora_${version}_i386.deb";
sha256 = "18960fb4b2cd6cf9cb77025a4035a3258f1599b1d225fb673b49c1588fa272d6";
sha256 = "ae228ca946d03940b85df30c995c4de3f942a780e32d4dcab872dec671c66ef3";
}
;

View File

@ -1,15 +1,10 @@
{ stdenv, fetchurl, libsoup, graphicsmagick, SDL, json_glib
, GConf, atk, cairo, cmake, curl, dbus_glib, exiv2, glib
, libgnome_keyring, gtk3, ilmbase, intltool, lcms, lcms2
, lensfun, libXau, libXdmcp, libexif, libglade, libgphoto2, libjpeg
, libpng, libpthreadstubs, librsvg, libtiff, libxcb
, openexr, osm-gps-map, pixman, pkgconfig, sqlite, bash, libxslt, openjpeg
, mesa, lua, pugixml, colord, colord-gtk, libxshmfence, libxkbcommon
, epoxy, at_spi2_core, libwebp, libsecret, wrapGAppsHook, gnome3
{ stdenv, fetchurl, libsoup, graphicsmagick, json_glib, wrapGAppsHook
, cairo, cmake, ninja, curl, perl, llvm, desktop_file_utils, exiv2, glib
, ilmbase, gtk3, intltool, lcms2, lensfun, libX11, libexif, libgphoto2, libjpeg
, libpng, librsvg, libtiff, openexr, osm-gps-map, pkgconfig, sqlite, libxslt
, openjpeg, lua, pugixml, colord, colord-gtk, libwebp, libsecret, gnome3
}:
assert stdenv ? glibc;
stdenv.mkDerivation rec {
version = "2.4.1";
name = "darktable-${version}";
@ -19,14 +14,13 @@ stdenv.mkDerivation rec {
sha256 = "014pq80i5k1kdvvrl7xrgaaq3i4fzv09h7a3pwzlp2ahkczwcm32";
};
buildInputs =
[ GConf atk cairo cmake curl dbus_glib exiv2 glib libgnome_keyring gtk3
ilmbase intltool lcms lcms2 lensfun libXau libXdmcp libexif
libglade libgphoto2 libjpeg libpng libpthreadstubs
librsvg libtiff libxcb openexr pixman pkgconfig sqlite libxslt
libsoup graphicsmagick SDL json_glib openjpeg mesa lua pugixml
colord colord-gtk libxshmfence libxkbcommon epoxy at_spi2_core
libwebp libsecret wrapGAppsHook gnome3.adwaita-icon-theme
nativeBuildInputs = [ cmake ninja llvm pkgconfig intltool perl desktop_file_utils wrapGAppsHook ];
buildInputs = [
cairo curl exiv2 glib gtk3 ilmbase lcms2 lensfun libX11 libexif
libgphoto2 libjpeg libpng librsvg libtiff openexr sqlite libxslt
libsoup graphicsmagick json_glib openjpeg lua pugixml
colord colord-gtk libwebp libsecret gnome3.adwaita-icon-theme
osm-gps-map
];

View File

@ -30,18 +30,18 @@ let
];
in buildRustPackage rec {
name = "alacritty-unstable-${version}";
version = "2017-12-29";
version = "2018-01-31";
# At the moment we cannot handle git dependencies in buildRustPackage.
# This fork only replaces rust-fontconfig/libfontconfig with a git submodules.
src = fetchgit {
url = https://github.com/Mic92/alacritty.git;
rev = "rev-${version}";
sha256 = "0pk4b8kfxixmd9985v2fya1m7np8ggws8d9msw210drc0grwbfkd";
sha256 = "0jc8haijd6f8r5fqiknrvqnwc9q4cp93852lr2p7zak7dv29v45p";
fetchSubmodules = true;
};
cargoSha256 = "0acj526cx4xl52vbcbd3hp1klh4p756j6alxqqz3x715zi2dqkzf";
cargoSha256 = "0023jpc6krilmp5wzbbwapxafsi6m1k13mvjh4zlvls1nyyhk808";
nativeBuildInputs = [
cmake

View File

@ -1,12 +1,13 @@
{ stdenv, fetchurl, python2Packages }:
python2Packages.buildPythonApplication rec {
version = "2.9.3.1";
name = "electrum-dash-${version}";
version = "2.4.1";
src = fetchurl {
url = "https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz";
sha256 = "02k7m7fyn0cvlgmwxr2gag7rf2knllkch1ma58shysp7zx9jb000";
url = "https://github.com/akhavr/electrum-dash/releases/download/${version}/Electrum-DASH-${version}.tar.gz";
#"https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz";
sha256 = "9b7ac205f63fd4bfb15d77a34a4451ef82caecf096f31048a7603bd276dfc33e";
};
propagatedBuildInputs = with python2Packages; [
@ -20,10 +21,11 @@ python2Packages.buildPythonApplication rec {
pyqt4
qrcode
requests
slowaes
pyaes
tlslite
x11_hash
mnemonic
jsonrpclib
# plugins
trezor

View File

@ -0,0 +1,93 @@
{ stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages,
boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, bash, mesa_glu }:
let
AlienWxWidgets = perlPackages.buildPerlPackage rec {
name = "Alien-wxWidgets-0.69";
src = fetchurl {
url = "mirror://cpan/authors/id/M/MD/MDOOTSON/${name}.tar.gz";
sha256 = "075m880klf66pbcfk0la2nl60vd37jljizqndrklh5y4zvzdy1nr";
};
propagatedBuildInputs = [
pkgconfig perlPackages.ModulePluggable perlPackages.ModuleBuild
gtk2 gtk3 wxGTK30
];
};
Wx = perlPackages.Wx.overrideAttrs (oldAttrs: {
propagatedBuildInputs = [
perlPackages.ExtUtilsXSpp
AlienWxWidgets
];
});
WxGLCanvas = perlPackages.buildPerlPackage rec {
name = "Wx-GLCanvas-0.09";
src = fetchurl {
url = "mirror://cpan/authors/id/M/MB/MBARBON/${name}.tar.gz";
sha256 = "1q4gvj4gdx4l8k4mkgiix24p9mdfy1miv7abidf0my3gy2gw5lka";
};
propagatedBuildInputs = [ Wx perlPackages.OpenGL mesa_glu ];
doCheck = false;
};
in
stdenv.mkDerivation rec {
name = "slic3r-prusa-edition-${version}";
version = "1.38.7";
buildInputs = [
cmake
perl
makeWrapper
tbb
which
Wx
WxGLCanvas
] ++ (with perlPackages; [
boost
ClassXSAccessor
EncodeLocale
ExtUtilsMakeMaker
ExtUtilsXSpp
GrowlGNTP
ImportInto
IOStringy
locallib
LWP
MathClipper
MathConvexHullMonotoneChain
MathGeometryVoronoi
MathPlanePath
ModuleBuild
Moo
NetDBus
OpenGL
threads
XMLSAX
]);
postInstall = ''
echo 'postInstall'
wrapProgram "$out/bin/slic3r-prusa3d" \
--prefix PERL5LIB : "$out/lib/slic3r-prusa3d:$PERL5LIB"
# it seems we need to copy the icons...
mkdir -p $out/bin/var
cp ../resources/icons/* $out/bin/var/
cp -r ../resources $out/bin/
'';
src = fetchFromGitHub {
owner = "prusa3d";
repo = "Slic3r";
sha256 = "1nrryd2bxmk4y59bq5fp7n2alyvc5a9xvnbx5j4fg4mqr91ccs5c";
rev = "version_${version}";
};
meta = with stdenv.lib; {
description = "G-code generator for 3D printer";
homepage = https://github.com/prusa3d/Slic3r;
license = licenses.agpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ tweber ];
};
}

View File

@ -75,5 +75,6 @@ buildPythonApplication rec {
description = "Multipurpose automation tool for content like torrents";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ domenkozar tari ];
broken = true; # as of 2018-02-09
};
}

View File

@ -1,9 +1,6 @@
{ stdenv, fetchurl, autoreconfHook, python, intltool, pkgconfig, libX11
, ldns, pythonPackages
# Test requirements
, xvfb_run
, enableJingle ? true, farstream ? null, gst-plugins-bad ? null
, libnice ? null
, enableE2E ? true
@ -25,13 +22,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "gajim-${version}";
version = "0.16.8";
version = "0.16.9";
src = fetchurl {
name = "${name}.tar.bz2";
url = "https://dev.gajim.org/gajim/gajim/repository/archive.tar.bz2?"
+ "ref=${name}";
sha256 = "009cpzqh4zy7hc9pq3r5m4lgagwawhjab13rjzavb0n9ggijcscb";
sha256 = "121dh906zya9n7npyk7b5xama0z3ycy9jl7l5jm39pc86h1winh3";
};
patches = let
@ -46,8 +43,7 @@ stdenv.mkDerivation rec {
name = "gajim-${name}.patch";
url = "https://dev.gajim.org/gajim/gajim/commit/${rev}.diff";
inherit sha256;
}) cherries)
++ [./fix-tests.patch]; # https://dev.gajim.org/gajim/gajim/issues/8660
}) cherries);
postPatch = ''
sed -i -e '0,/^[^#]/ {
@ -74,8 +70,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
autoreconfHook pythonPackages.wrapPython intltool pkgconfig
# Test dependencies
xvfb_run
];
autoreconfPhase = ''
@ -114,9 +108,8 @@ stdenv.mkDerivation rec {
doInstallCheck = true;
installCheckPhase = ''
XDG_DATA_DIRS="$out/share/gajim''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS" \
PYTHONPATH="test:$out/share/gajim/src:''${PYTHONPATH:+:}$PYTHONPATH" \
xvfb-run make test
make test_nogui
'';
enableParallelBuilding = true;

View File

@ -1,13 +0,0 @@
diff --git a/src/common/gajim.py b/src/common/gajim.py
index 4a5d884b6..95d401b67 100644
--- a/src/common/gajim.py
+++ b/src/common/gajim.py
@@ -415,7 +415,7 @@ def get_jid_from_account(account_name, full=False):
jid = name + '@' + hostname
if full:
resource = connections[account_name].server_resource
- jid += '/' + resource
+ jid += '/' + str(resource)
return jid
def get_our_jids():

View File

@ -1,14 +1,14 @@
{ stdenv, lib, fetchFromGitHub, go, procps, removeReferencesTo }:
stdenv.mkDerivation rec {
version = "0.14.43";
version = "0.14.44";
name = "syncthing-${version}";
src = fetchFromGitHub {
owner = "syncthing";
repo = "syncthing";
rev = "v${version}";
sha256 = "1n09zmp9dqrl3y0fa0l1gx6f09j9mm3xdf7b58y03znspsg7mxhi";
sha256 = "1gdkx6lbzmdz2hqc9slbq41rwgkxmdisnj0iywx4mppmc2b4v6wh";
};
buildInputs = [ go removeReferencesTo ];

View File

@ -209,14 +209,14 @@ rec {
tiniSha256 = "0zj4kdis1vvc6dwn4gplqna0bs7v6d1y2zc8v80s3zi018inhznw";
};
docker_18_01 = dockerGen rec {
version = "18.01.0-ce";
rev = "03596f51b120095326d2004d676e97228a21014d"; # git commit
sha256 = "1zffaxwkfz8ca76f5ql5z76mcjx37jbgv2kk75i68487yg16x0md";
runcRev = "b2567b37d7b75eb4cf325b77297b140ea686ce8f";
runcSha256 = "0zarsrbfcm1yp6mdl6rcrigdf7nb70xmv2cbggndz0qqyrw0mk0l";
containerdRev = "89623f28b87a6004d4b785663257362d1658a729";
containerdSha256 = "0irx7ps6rhq7z69cr3gspxdr7ywrv6dz62gkr1z2723cki9hsxma";
docker_18_02 = dockerGen rec {
version = "18.02.0-ce";
rev = "fc4de447b563498eb4da89f56fb858bbe761d91b"; # git commit
sha256 = "1025cwv2niiwg5pc30nb1qky1raisvd9ix2qw6rdib232hwq9k8m";
runcRev = "9f9c96235cc97674e935002fc3d78361b696a69e";
runcSha256 = "18f8vqdbf685dd777pjh8jzpxafw2vapqh4m43xgyi7lfwa0gsln";
containerdRev = "9b55aab90508bd389d7654c4baf173a981477d55";
containerdSha256 = "0kfafqi66yp4qy738pl11f050hfrx9m4kc670qpx7fmf9ii7q6p2";
tiniRev = "949e6facb77383876aeff8a6944dde66b3089574";
tiniSha256 = "0zj4kdis1vvc6dwn4gplqna0bs7v6d1y2zc8v80s3zi018inhznw";
};

View File

@ -0,0 +1,174 @@
declare -a autoPatchelfLibs
gatherLibraries() {
autoPatchelfLibs+=("$1/lib")
}
addEnvHooks "$targetOffset" gatherLibraries
isExecutable() {
[ "$(file -b -N --mime-type "$1")" = application/x-executable ]
}
findElfs() {
find "$1" -type f -exec "$SHELL" -c '
while [ -n "$1" ]; do
mimeType="$(file -b -N --mime-type "$1")"
if [ "$mimeType" = application/x-executable \
-o "$mimeType" = application/x-sharedlib ]; then
echo "$1"
fi
shift
done
' -- {} +
}
# We cache dependencies so that we don't need to search through all of them on
# every consecutive call to findDependency.
declare -a cachedDependencies
addToDepCache() {
local existing
for existing in "${cachedDependencies[@]}"; do
if [ "$existing" = "$1" ]; then return; fi
done
cachedDependencies+=("$1")
}
declare -gi depCacheInitialised=0
declare -gi doneRecursiveSearch=0
declare -g foundDependency
getDepsFromSo() {
ldd "$1" 2> /dev/null | sed -n -e 's/[^=]*=> *\(.\+\) \+([^)]*)$/\1/p'
}
populateCacheWithRecursiveDeps() {
local so found foundso
for so in "${cachedDependencies[@]}"; do
for found in $(getDepsFromSo "$so"); do
local libdir="${found%/*}"
local base="${found##*/}"
local soname="${base%.so*}"
for foundso in "${found%/*}/$soname".so*; do
addToDepCache "$foundso"
done
done
done
}
getSoArch() {
objdump -f "$1" | sed -ne 's/^architecture: *\([^,]\+\).*/\1/p'
}
# NOTE: If you want to use this function outside of the autoPatchelf function,
# keep in mind that the dependency cache is only valid inside the subshell
# spawned by the autoPatchelf function, so invoking this directly will possibly
# rebuild the dependency cache. See the autoPatchelf function below for more
# information.
findDependency() {
local filename="$1"
local arch="$2"
local lib dep
if [ $depCacheInitialised -eq 0 ]; then
for lib in "${autoPatchelfLibs[@]}"; do
for so in "$lib/"*.so*; do addToDepCache "$so"; done
done
depCacheInitialised=1
fi
for dep in "${cachedDependencies[@]}"; do
if [ "$filename" = "${dep##*/}" ]; then
if [ "$(getSoArch "$dep")" = "$arch" ]; then
foundDependency="$dep"
return 0
fi
fi
done
# Populate the dependency cache with recursive dependencies *only* if we
# didn't find the right dependency so far and afterwards run findDependency
# again, but this time with $doneRecursiveSearch set to 1 so that it won't
# recurse again (and thus infinitely).
if [ $doneRecursiveSearch -eq 0 ]; then
populateCacheWithRecursiveDeps
doneRecursiveSearch=1
findDependency "$filename" "$arch" || return 1
return 0
fi
return 1
}
autoPatchelfFile() {
local dep rpath="" toPatch="$1"
local interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")"
if isExecutable "$toPatch"; then
patchelf --set-interpreter "$interpreter" "$toPatch"
if [ -n "$runtimeDependencies" ]; then
for dep in $runtimeDependencies; do
rpath="$rpath${rpath:+:}$dep/lib"
done
fi
fi
echo "searching for dependencies of $toPatch" >&2
# We're going to find all dependencies based on ldd output, so we need to
# clear the RPATH first.
patchelf --remove-rpath "$toPatch"
local missing="$(
ldd "$toPatch" 2> /dev/null | \
sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p'
)"
# This ensures that we get the output of all missing dependencies instead
# of failing at the first one, because it's more useful when working on a
# new package where you don't yet know its dependencies.
local -i depNotFound=0
for dep in $missing; do
echo -n " $dep -> " >&2
if findDependency "$dep" "$(getSoArch "$toPatch")"; then
rpath="$rpath${rpath:+:}${foundDependency%/*}"
echo "found: $foundDependency" >&2
else
echo "not found!" >&2
depNotFound=1
fi
done
# This makes sure the builder fails if we didn't find a dependency, because
# the stdenv setup script is run with set -e. The actual error is emitted
# earlier in the previous loop.
[ $depNotFound -eq 0 ]
if [ -n "$rpath" ]; then
echo "setting RPATH to: $rpath" >&2
patchelf --set-rpath "$rpath" "$toPatch"
fi
}
autoPatchelf() {
echo "automatically fixing dependencies for ELF files" >&2
# Add all shared objects of the current output path to the start of
# cachedDependencies so that it's choosen first in findDependency.
cachedDependencies+=(
$(find "$prefix" \! -type d \( -name '*.so' -o -name '*.so.*' \))
)
local elffile
# Here we actually have a subshell, which also means that
# $cachedDependencies is final at this point, so whenever we want to run
# findDependency outside of this, the dependency cache needs to be rebuilt
# from scratch, so keep this in mind if you want to run findDependency
# outside of this function.
findElfs "$prefix" | while read -r elffile; do
autoPatchelfFile "$elffile"
done
}
fixupOutputHooks+=(autoPatchelf)

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "0.4.0-RC1";
version = "0.6.0-RC1";
name = "dotty-bare-${version}";
src = fetchurl {
url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz";
sha256 = "1d1ab08b85bd6898ce6273fa50818de0d314fc6e5377fb6ee05494827043321b";
sha256 = "de1f5e72fb0e0b4c377d6cec93f565eff49769698cd8be01b420705fe8475ca4";
};
propagatedBuildInputs = [ jre ] ;

View File

@ -72,8 +72,7 @@ assert enableSplitObjs == null;
let
inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast
concatStringsSep enableFeature optionalAttrs toUpper
filter makeLibraryPath;
concatStringsSep enableFeature optionalAttrs toUpper;
isGhcjs = ghc.isGhcjs or false;
isHaLVM = ghc.isHaLVM or false;
@ -384,7 +383,7 @@ stdenv.mkDerivation ({
env = stdenv.mkDerivation {
name = "interactive-${pname}-${version}-environment";
buildInputs = systemBuildInputs;
nativeBuildInputs = [ ghcEnv ];
nativeBuildInputs = [ ghcEnv ] ++ nativeBuildInputs;
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
shellHook = ''
@ -392,9 +391,6 @@ stdenv.mkDerivation ({
export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg"
# TODO: is this still valid?
export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html"
export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+''${LD_LIBRARY_PATH}:}${
makeLibraryPath (filter (x: !isNull x) systemBuildInputs)
}"
${if isHaLVM
then ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/HaLVM-${ghc.version}"''
else ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcCommand}-${ghc.version}"''}

View File

@ -1,5 +1,6 @@
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3 }:
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, zlib
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
stdenv.mkDerivation rec {
name = "libproxy-${version}";
@ -16,7 +17,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ dbus networkmanager spidermonkey_38 pcre python2 python3 ];
buildInputs = [ pcre python2 python3 zlib ]
++ (if stdenv.hostPlatform.isDarwin
then [ SystemConfiguration CoreFoundation JavaScriptCore ]
else [ spidermonkey_38 dbus networkmanager ]);
preConfigure = ''
cmakeFlagsArray+=(
@ -27,7 +31,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
license = licenses.lgpl21;
homepage = http://libproxy.github.io/libproxy/;
description = "A library that provides automatic proxy configuration management";

View File

@ -3,13 +3,17 @@
buildPythonPackage rec {
pname = "awesome-slugify";
version = "1.6.5";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "0wgxrhr8s5vk2xmcz9s1z1aml4ppawmhkbggl9rp94c747xc7pmv";
};
prePatch = ''
substituteInPlace setup.py \
--replace 'Unidecode>=0.04.14,<0.05' 'Unidecode>=0.04.14'
'';
patches = [
./slugify_filename_test.patch # fixes broken test by new unidecode
];

View File

@ -1,17 +1,20 @@
{ stdenv, buildPythonPackage, fetchPypi, termcolor, pytest }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "pytest-sugar";
version = "0.9.0";
version = "0.9.1";
src = fetchPypi {
inherit pname version;
sha256 = "11lni9kn0r1y896xg20qjv4yjcyr56h0hx9dprdgjnam4dqcl6lg";
sha256 = "ab8cc42faf121344a4e9b13f39a51257f26f410e416c52ea11078cdd00d98a2c";
};
propagatedBuildInputs = [ termcolor pytest ];
checkPhase = ''
py.test
'';
meta = with stdenv.lib; {
description = "A plugin that changes the default look and feel of py.test";
homepage = https://github.com/Frozenball/pytest-sugar;

View File

@ -0,0 +1,84 @@
{ lib
, fetchPypi
, fetchNuGet
, buildPythonPackage
, python
, pytest
, pycparser
, pkgconfig
, dotnetbuildhelpers
, clang
, mono
}:
let
UnmanagedExports127 = fetchNuGet {
baseName = "UnmanagedExports";
version = "1.2.7";
sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf";
outputFiles = [ "*" ];
};
NUnit360 = fetchNuGet {
baseName = "NUnit";
version = "3.6.0";
sha256 = "0wz4sb0hxlajdr09r22kcy9ya79lka71w0k1jv5q2qj3d6g2frz1";
outputFiles = [ "*" ];
};
in
buildPythonPackage rec {
pname = "pythonnet";
version = "2.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1hxnkrfj8ark9sbamcxzd63p98vgljfvdwh79qj3ac8pqrgghq80";
};
postPatch = ''
substituteInPlace setup.py --replace 'self._install_packages()' '#self._install_packages()'
'';
preConfigure = ''
[ -z "$dontPlacateNuget" ] && placate-nuget.sh
[ -z "$dontPlacatePaket" ] && placate-paket.sh
'';
nativeBuildInputs = [
pytest
pycparser
pkgconfig
dotnetbuildhelpers
clang
NUnit360
UnmanagedExports127
];
buildInputs = [
mono
];
preBuild = ''
rm -rf packages
mkdir packages
ln -s ${NUnit360}/lib/dotnet/NUnit/ packages/NUnit.3.6.0
ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7
'';
checkPhase = ''
${python.interpreter} -m pytest
'';
meta = with lib; {
description = ".Net and Mono integration for Python";
homepage = https://pythonnet.github.io;
license = licenses.mit;
maintainers = with maintainers; [ jraygauthier ];
};
}

View File

@ -285,7 +285,7 @@ let
pbdMPI = [ pkgs.openmpi ];
pbdNCDF4 = [ pkgs.netcdf ];
pbdPROF = [ pkgs.openmpi ];
pbdZMQ = [ pkgs.which ];
pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.which ];
pdftools = [ pkgs.poppler.dev ];
PKI = [ pkgs.openssl.dev ];
png = [ pkgs.libpng.dev ];
@ -393,6 +393,7 @@ let
nat = [ pkgs.which ];
nat_nblast = [ pkgs.which ];
nat_templatebrains = [ pkgs.which ];
pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.binutils.bintools ];
RMark = [ pkgs.which ];
RPushbullet = [ pkgs.which ];
qtpaint = [ pkgs.cmake ];
@ -776,6 +777,14 @@ let
PKG_LIBS = "-L${pkgs.openblasCompat}/lib -lopenblas";
});
pbdZMQ = old.pbdZMQ.overrideDerivation (attrs: {
postPatch = lib.optionalString stdenv.isDarwin ''
for file in R/*.{r,r.in}; do
sed -i 's#system("which \(\w\+\)"[^)]*)#"${pkgs.binutils.bintools}/bin/\1"#g' $file
done
'';
});
qtbase = old.qtbase.overrideDerivation (attrs: {
patches = [ ./patches/qtbase.patch ];
});

View File

@ -0,0 +1,24 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "hcloud-${version}";
version = "1.3.0";
goPackagePath = "github.com/hetznercloud/cli";
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
sha256 = "1216qz1kk38vkvfrznjwb65vsbhscqvvrsbp2i6pnf0i85p00pqm";
};
buildFlagsArray = [ "-ldflags=" "-X github.com/hetznercloud/cli.Version=${version}" ];
meta = {
description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
homepage = https://github.com/hetznercloud/cli;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.zauberpony ];
};
}

View File

@ -7,18 +7,29 @@
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0002", MODE:="0666"
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666"
stdenv.mkDerivation rec {
name = "uhd-${version}";
version = "3.10.2.0";
let
uhdVer = "003_010_003_000";
ImgVer = stdenv.lib.replaceStrings ["_"] ["."] uhdVer;
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
# and xxx.yyy.zzz. Hrmpf...
version = "3.10.3.0";
# Firmware images are downloaded (pre-built) from:
# http://files.ettus.com/binaries/images/
uhdImagesSrc = fetchurl {
url = "http://files.ettus.com/binaries/images/uhd-images_${ImgVer}-release.tar.gz";
sha256 = "198awvw6zsh19ydgx5qry5yc6yahdval9wjrsqbyj51pnr6s5qvy";
};
in stdenv.mkDerivation {
name = "uhd-${version}";
src = fetchFromGitHub {
owner = "EttusResearch";
repo = "uhd";
rev = "release_003_010_002_000";
sha256 = "0g6f4amw7h0vr6faa1nc1zs3bc645binza0zqqx5cwgfxybv8cfy";
rev = "release_${uhdVer}";
sha256 = "1aj8qizbyz4shwawj3qlhl6pyyda59hhgm9cwrj7s5kfdi4vdlc3";
};
enableParallelBuilding = true;
@ -31,13 +42,6 @@ stdenv.mkDerivation rec {
# Build only the host software
preConfigure = "cd host";
# Firmware images are downloaded (pre-built)
uhdImagesName = "uhd-images_003.007.003-release";
uhdImagesSrc = fetchurl {
url = "http://files.ettus.com/binaries/maint_images/archive/${uhdImagesName}.tar.gz";
sha256 = "1pv5c5902041494z0jfw623ca29pvylrw5klybbhklvn5wwlr6cv";
};
postPhases = [ "installFirmware" ];
installFirmware = ''

View File

@ -4,19 +4,14 @@
}:
let
allSpecs = {
"i686-linux" = {
system = "linux32";
sha256 = "13fngjg2v0l3vhlmjnffy785ckgk2kbpm7307li75vinkcly91cj";
};
"x86_64-linux" = {
system = "linux64";
sha256 = "0x5vnmnw6mws6iw9s0kcm4crx9gfgy0vjjpk1v0wk7jpn6d0bl47";
sha256 = "13iyz6579yw4fk9dr4nf2pdj55v1iflj8yf9a4zz7qw5996d5yk7";
};
"x86_64-darwin" = {
system = "mac64";
sha256 = "09y8ijj75q5a7snzchxinxfq2ad2sw0f30zi0p3hqf1n88y28jq6";
sha256 = "11xa31bxhrq0p7kd3j76dihp73abdbmbwdng5454m1wir6yj25f1";
};
};
@ -33,7 +28,7 @@ let
in
stdenv.mkDerivation rec {
name = "chromedriver-${version}";
version = "2.33";
version = "2.35";
src = fetchurl {
url = "http://chromedriver.storage.googleapis.com/${version}/chromedriver_${spec.system}.zip";

View File

@ -0,0 +1,24 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "yaml2json-${version}";
version = "unstable-2017-05-03";
goPackagePath = "github.com/bronze1man/yaml2json";
goDeps = ./deps.nix;
src = fetchFromGitHub {
rev = "ee8196e587313e98831c040c26262693d48c1a0c";
owner = "bronze1man";
repo = "yaml2json";
sha256 = "16a2sqzbam5adbhfvilnpdabzwncs7kgpr0cn4gp09h2imzsprzw";
};
meta = with stdenv.lib; {
homepage = https://github.com/bronze1man/yaml2json;
description = "Convert yaml to json";
license = with licenses; [ mit ];
maintainers = [ maintainers.adisbladis ];
};
}

View File

@ -0,0 +1,11 @@
[
{
goPackagePath = "gopkg.in/yaml.v2";
fetch = {
type = "git";
url = "https://gopkg.in/yaml.v2";
rev = "d670f9405373e636a5a2765eea47fac0c9bc91a4";
sha256 = "1w1xid51n8v1mydn2m3vgggw8qgpd5a5sr62snsc77d99fpjsrs0";
};
}
]

View File

@ -1,16 +1,20 @@
{ stdenv, fetchurl, libSM, libX11, SDL }:
{ stdenv, fetchurl, libSM, libX11, libICE, SDL, alsaLib, gcc-unwrapped, libXext }:
with stdenv.lib;
stdenv.mkDerivation rec{
name = "atari++-${version}";
version = "1.73";
version = "1.81";
src = fetchurl {
url = "http://www.xl-project.com/download/atari++_${version}.tar.gz";
sha256 = "1y5kwh08717jsa5agxrvxnggnwxq36irrid9rzfhca1nnvp9a45l";
sha256 = "1sv268dsjddirhx47zaqgqiahy6zjxj7xaiiksd1gjvs4lvf3cdg";
};
buildInputs = [ libSM libX11 SDL ];
buildInputs = [ libSM libX11 SDL libICE alsaLib gcc-unwrapped libXext ];
postFixup = ''
patchelf --set-rpath ${stdenv.lib.makeLibraryPath buildInputs} "$out/bin/atari++"
'';
meta = {
homepage = http://www.xl-project.com/;

View File

@ -330,6 +330,9 @@ rec {
inherit name;
vimrcFile = vimrcFile vimrcConfig;
};
override = f: makeCustomizable (vim.override f);
overrideAttrs = f: makeCustomizable (vim.overrideAttrs f);
};
pluginnames2Nix = {name, namefiles} : vim_configurable.customize {

View File

@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "0.6.2";
version = "0.6.3";
name = "nix-bash-completions-${version}";
src = fetchFromGitHub {
owner = "hedning";
repo = "nix-bash-completions";
rev = "v${version}";
sha256 = "0w6mimi70drjkdpx5pcw66xy2a4kysjfzmank0kc5vbhrjgkjwyp";
sha256 = "1zmk9f53xpwk5j6qqisjlddgm2fr68p1q6pn3wa14bd777lranhj";
};
# To enable lazy loading via. bash-completion we need a symlink to the script

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
let
version = "0.3.7";
version = "0.3.8";
in
stdenv.mkDerivation rec {
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "spwhitt";
repo = "nix-zsh-completions";
rev = "${version}";
sha256 = "164x8awia56z481r898pbywjgrx8fv8gfw8pxp4qgbxzp3gwq9iy";
sha256 = "05ynd38br2kn657g7l01jg1q8ja9xwrdyb95w02gh7j9cww2k06w";
};
installPhase = ''

View File

@ -20,15 +20,19 @@ stdenv.mkDerivation {
buildInputs = [ ncurses pcre ];
configureFlags = [
"--enable-maildir-support"
"--enable-multibyte"
"--with-tcsetpgrp"
"--enable-pcre"
];
preConfigure = ''
configureFlags="--enable-maildir-support --enable-multibyte --enable-zprofile=$out/etc/zprofile --with-tcsetpgrp --enable-pcre"
configureFlagsArray+=(--enable-zprofile=$out/etc/zprofile)
'';
# the zsh/zpty module is not available on hydra
# so skip groups Y Z
checkFlagsArray = ''
(TESTNUM=A TESTNUM=B TESTNUM=C TESTNUM=D TESTNUM=E TESTNUM=V TESTNUM=W)
'';
checkFlags = map (T: "TESTNUM=${T}") (stdenv.lib.stringToCharacters "ABCDEVW");
# XXX: think/discuss about this, also with respect to nixos vs nix-on-X
postInstall = ''

View File

@ -0,0 +1,65 @@
{ stdenv, fetchurl, automake, autoconf, libtool, fuse, pkgconfig, pcre,
# Optional Dependencies
lz4 ? null, xz ? null, zlib ? null, lzo ? null, zstd ? null}:
with stdenv.lib;
let
mkFlag = trueStr: falseStr: cond: name: val: "--"
+ (if cond then trueStr else falseStr)
+ name
+ optionalString (val != null && cond != false) "=${val}";
mkEnable = mkFlag "enable-" "disable-";
mkWith = mkFlag "with-" "--without-";
mkOther = mkFlag "" "" true;
shouldUsePkg = pkg: if pkg != null && any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
optLz4 = shouldUsePkg lz4;
optLzma = shouldUsePkg xz;
optZlib = shouldUsePkg zlib;
optLzo = shouldUsePkg lzo;
optZstd = shouldUsePkg zstd;
in
stdenv.mkDerivation rec {
pname = "squashfuse";
version = "0.1.101";
name = "${pname}-${version}";
meta = {
description = "FUSE filesystem to mount squashfs archives";
homepage = https://github.com/vasi/squashfuse;
maintainers = [ maintainers.genesis ];
platforms = platforms.linux;
license = "BSD-2-Clause";
};
# platforms.darwin should be supported : see PLATFORMS file in src.
# we could use a nix fuseProvider, and let the derivation choose the OS
# specific implementation.
src = fetchurl {
url = "https://github.com/vasi/squashfuse/archive/${version}.tar.gz";
sha256 = "08d1j1a73dhhypbk0q20qkrz564zpmvkpk3k3s8xw8gd9nvy2xa2";
};
nativeBuildInputs = [ automake autoconf libtool pkgconfig];
buildInputs = [ optLz4 optLzma optZlib optLzo optZstd fuse ];
# We can do it far better i guess, ignoring -with option
# but it should be safer like that.
# TODO: Improve writing nix expression mkWithLib.
configureFlags = [
(mkWith (optLz4 != null) "lz4=${lz4}/lib" null)
(mkWith (optLzma != null) "xz=${xz}/lib" null)
(mkWith (optZlib != null) "zlib=${zlib}/lib" null)
(mkWith (optLzo != null) "lzo=${lzo}/lib" null)
(mkWith (optZstd != null) "zstd=${zstd}/lib" null)
];
preConfigure = ''
./autogen.sh
'';
}

View File

@ -0,0 +1,18 @@
{ stdenv, fetchFromGitHub, buildPerlPackage }:
buildPerlPackage rec {
name = "rename-${version}";
version = "1.9";
src = fetchFromGitHub {
owner = "pstray";
repo = "rename";
rev = "d46f1d0ced25dc5849acb5d5974a3e2e9d97d536";
sha256 = "0qahs1cqfaci2hdf1xncrz4k0z5skkfr43apnm3kybs7za33apzw";
};
meta = with stdenv.lib; {
description = "Rename files according to a Perl rewrite expression";
homepage = http://search.cpan.org/~pederst/rename-1.9/bin/rename.PL;
maintainers = with maintainers; [ mkg ];
license = with licenses; [ gpl1Plus ];
};
}

View File

@ -3,26 +3,8 @@
, darwin
}:
stdenv.mkDerivation {
name = "screenFetch-2016-10-11";
src = fetchFromGitHub {
owner = "KittyKatt";
repo = "screenFetch";
rev = "89e51f24018c89b3647deb24406a9af3a78bbe99";
sha256 = "0i2k261jj2s4sfhav7vbsd362pa0gghw6qhwafhmicmf8hq2a18v";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm 0755 screenfetch-dev $out/bin/screenfetch
install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
# Fix all of the depedencies of screenfetch
patchShebangs $out/bin/screenfetch
wrapProgram "$out/bin/screenfetch" \
--set PATH ${lib.makeBinPath ([
let
path = lib.makeBinPath ([
coreutils gawk gnused findutils
gnugrep ncurses bc
] ++ lib.optionals stdenv.isLinux [
@ -34,7 +16,30 @@ stdenv.mkDerivation {
DarwinTools
system_cmds
"/usr" # some commands like defaults is not available to us
]))}
]));
in stdenv.mkDerivation rec {
name = "screenFetch-${version}";
version = "3.8.0";
src = fetchFromGitHub {
owner = "KittyKatt";
repo = "screenFetch";
rev = "v${version}";
sha256 = "00ibv72cb7cqfpljyzgvajhbp0clqsqliz18nyv83bfy3gkf2qs8";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm 0755 screenfetch-dev $out/bin/screenfetch
install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO
# Fix all of the dependencies of screenfetch
patchShebangs $out/bin/screenfetch
wrapProgram "$out/bin/screenfetch" \
--prefix PATH : ${path}
'';
meta = with lib; {
@ -50,7 +55,7 @@ stdenv.mkDerivation {
command! This script is very easy to add to and can easily be extended.
'';
license = licenses.gpl3;
homepage = http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/;
homepage = https://github.com/KittyKatt/screenFetch;
maintainers = with maintainers; [ relrod ];
platforms = platforms.all;
};

View File

@ -0,0 +1,24 @@
{ stdenv, fetchurl, tcl, tk }:
stdenv.mkDerivation rec {
name = "uudeview-0.5.20";
src = fetchurl {
url = "http://www.fpx.de/fp/Software/UUDeview/download/${name}.tar.gz";
sha256 = "0dg4v888fxhmf51vxq1z1gd57fslsidn15jf42pj4817vw6m36p4";
};
buildInputs = [ tcl tk ];
hardeningDisable = [ "format" ];
configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ];
postPatch = ''
substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish"
'';
meta = {
description = "The Nice and Friendly Decoder";
homepage = http://www.fpx.de/fp/Software/UUDeview/;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ woffs ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -16,11 +16,11 @@ with stdenv.lib;
buildPythonApplication rec {
name = "youtube-dl-${version}";
version = "2018.01.27";
version = "2018.02.08";
src = fetchurl {
url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
sha256 = "14vbm8pr6xdrdbk8j9k4v82rnalbdpk2lcm7n9wj6z6d441ymji9";
sha256 = "0iq5mav782gz0gm00rry3v7gdxkkx4y1k0p20pvz32ga4id5k1mg";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "biosdevname-${version}";
version = "0.7.2";
version = "0.7.3";
src = fetchFromGitHub {
owner = "dell";
repo = "biosdevname";
rev = "v${version}";
sha256 = "183k6f9nayhai27y6nizf0sp9bj1kabykj66hcwdzllhrrh505sd";
sha256 = "19wbb79x9h79k55sgd4dylvdbhhrvfaiaknbw9s1wvfmirkxa1dz";
};
nativeBuildInputs = [ autoreconfHook ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "keepalived-${version}";
version = "1.3.6";
version = "1.4.1";
src = fetchFromGitHub {
owner = "acassen";
repo = "keepalived";
rev = "v${version}";
sha256 = "05088vv510dlflzyg8sh8l8qfscnvxl6n6pw9ycp27zhb6r5cr5y";
sha256 = "1d3jnfhj9mpnc27wvgsiz2vr4lnvvccw3v128z16jpyibyv20ph0";
};
buildInputs = [

View File

@ -0,0 +1,41 @@
{ stdenv, makeWrapper, python2Packages, fetchFromGitHub, python2 }:
stdenv.mkDerivation rec {
pname = "theHarvester";
version = "2.7.1";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "laramies";
repo = "${pname}";
rev = "25553762d2d93a39083593adb08a34d5f5142c60";
sha256 = "0gnm598y6paz0knwvdv1cx0w6ngdbbpzkdark3q5vs66yajv24w4";
};
nativeBuildInputs = [ makeWrapper ];
# add dependencies
propagatedBuildInputs = [ python2Packages.requests ];
installPhase = ''
# create dirs
mkdir -p $out/share/${pname} $out/bin
# move project code
mv * $out/share/${pname}/
# make project runnable
chmod +x $out/share/${pname}/theHarvester.py
ln -s $out/share/${pname}/theHarvester.py $out/bin
wrapProgram "$out/bin/theHarvester.py" --prefix PYTHONPATH : $out/share/${pname}:$PYTHONPATH
'';
meta = with stdenv.lib; {
description = "Gather E-mails, subdomains and names from different public sources";
homepage = "https://github.com/laramies/theHarvester";
platforms = platforms.all;
maintainers = with maintainers; [ treemo ];
license = licenses.gpl2;
};
}

View File

@ -1,12 +1,18 @@
{ stdenv, lib, bundlerEnv, ruby, curl }:
bundlerEnv {
pname = "asciidoctor";
{ stdenv, lib, bundlerApp, ruby, curl }:
bundlerApp {
inherit ruby;
pname = "asciidoctor";
gemdir = ./.;
exes = [
"asciidoctor"
"asciidoctor-bespoke"
"asciidoctor-latex"
"asciidoctor-pdf"
"asciidoctor-safe"
];
meta = with lib; {
description = "A faster Asciidoc processor written in Ruby";
homepage = http://asciidoctor.org/;

View File

@ -79,6 +79,10 @@ with pkgs;
{ deps = [ autoconf264 automake111x gettext libtool ]; }
../build-support/setup-hooks/autoreconf.sh;
autoPatchelfHook = makeSetupHook
{ deps = [ file ]; }
../build-support/setup-hooks/auto-patchelf.sh;
ensureNewerSourcesHook = { year }: makeSetupHook {}
(writeScript "ensure-newer-sources-hook.sh" ''
postUnpackHooks+=(_ensureNewerSources)
@ -1977,6 +1981,8 @@ with pkgs;
mcrcon = callPackage ../tools/networking/mcrcon {};
uudeview = callPackage ../tools/misc/uudeview { };
zabbix-cli = callPackage ../tools/misc/zabbix-cli { };
### DEVELOPMENT / EMSCRIPTEN
@ -4400,6 +4406,10 @@ with pkgs;
gsettings_desktop_schemas = gnome3.gsettings_desktop_schemas;
};
rename = callPackage ../tools/misc/rename {
inherit (perlPackages) buildPerlPackage;
};
renameutils = callPackage ../tools/misc/renameutils { };
renderdoc = libsForQt5.callPackage ../applications/graphics/renderdoc { };
@ -4700,6 +4710,8 @@ with pkgs;
squashfsTools = callPackage ../tools/filesystems/squashfs { };
squashfuse = callPackage ../tools/filesystems/squashfuse { };
srcml = callPackage ../applications/version-management/srcml { };
sshfs-fuse = callPackage ../tools/filesystems/sshfs-fuse { };
@ -4866,6 +4878,8 @@ with pkgs;
thc-hydra = callPackage ../tools/security/thc-hydra { };
theharvester = callPackage ../tools/security/theharvester { };
thefuck = python3Packages.callPackage ../tools/misc/thefuck { };
thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { };
@ -7613,6 +7627,8 @@ with pkgs;
guile = guile_2_0;
};
hcloud = callPackage ../development/tools/hcloud { };
help2man = callPackage ../development/tools/misc/help2man {
inherit (perlPackages) LocaleGettext;
};
@ -7991,9 +8007,7 @@ with pkgs;
tweak = callPackage ../applications/editors/tweak { };
uhd = callPackage ../development/tools/misc/uhd {
boost = boost165;
};
uhd = callPackage ../development/tools/misc/uhd { };
uisp = callPackage ../development/tools/misc/uisp { };
@ -8054,6 +8068,8 @@ with pkgs;
yacc = bison;
yaml2json = callPackage ../development/tools/yaml2json { };
ycmd = callPackage ../development/tools/misc/ycmd {
inherit (darwin.apple_sdk.frameworks) Cocoa;
llvmPackages = llvmPackages_5;
@ -9882,9 +9898,7 @@ with pkgs;
};
libproxy = callPackage ../development/libraries/libproxy {
stdenv = if stdenv.isDarwin
then overrideCC stdenv gcc
else stdenv;
inherit (darwin.apple_sdk.frameworks) SystemConfiguration CoreFoundation JavaScriptCore;
};
libpseudo = callPackage ../development/libraries/libpseudo { };
@ -14640,7 +14654,6 @@ with pkgs;
});
darktable = callPackage ../applications/graphics/darktable {
inherit (gnome2) GConf libglade;
lua = lua5_3;
pugixml = pugixml.override { shared = true; };
};
@ -14701,10 +14714,10 @@ with pkgs;
inherit (callPackage ../applications/virtualization/docker { })
docker_17_12
docker_18_01;
docker_18_02;
docker = docker_17_12;
docker-edge = docker_18_01;
docker-edge = docker_18_02;
docker-proxy = callPackage ../applications/virtualization/docker/proxy.nix { };
@ -17161,6 +17174,8 @@ with pkgs;
slic3r = callPackage ../applications/misc/slic3r { };
slic3r-prusa3d = callPackage ../applications/misc/slic3r-prusa3d { };
curaengine_stable = callPackage ../applications/misc/curaengine/stable.nix { };
cura_stable = callPackage ../applications/misc/cura/stable.nix {
curaengine = curaengine_stable;

View File

@ -75,7 +75,7 @@ in rec {
coqPackages_8_5 = mkCoqPackages coq_8_5;
coqPackages_8_6 = mkCoqPackages coq_8_6;
coqPackages_8_7 = mkCoqPackages coq_8_7;
coqPackages = coqPackages_8_6;
coqPackages = coqPackages_8_7;
coq = coqPackages.coq;
}

View File

@ -14845,6 +14845,11 @@ in {
};
};
pythonnet = callPackage ../development/python-modules/pythonnet {
# `mono >= 4.6` required to prevent crashes encountered with earlier versions.
mono = pkgs.mono46;
};
pytz = callPackage ../development/python-modules/pytz { };
pytzdata = callPackage ../development/python-modules/pytzdata { };