Merge remote-tracking branch 'upstream/staging-next' into staging

This commit is contained in:
John Ericson 2019-11-25 15:59:05 -05:00
commit f191360ad0
151 changed files with 1795 additions and 858 deletions

3
.github/CODEOWNERS vendored
View file

@ -47,6 +47,9 @@
/nixos/doc/manual/man-nixos-option.xml @nbp
/nixos/modules/installer/tools/nixos-option.sh @nbp
# NixOS integration test driver
/nixos/lib/test-driver @tfc
# New NixOS modules
/nixos/modules/module-list.nix @Infinisil

View file

@ -37,6 +37,7 @@ rec {
else if final.isAndroid then "bionic"
else if final.isLinux /* default */ then "glibc"
else if final.isMsp430 then "newlib"
else if final.isVc4 then "newlib"
else if final.isAvr then "avrlibc"
else if final.isNetBSD then "nblibc"
# TODO(@Ericson2314) think more about other operating systems

View file

@ -26,7 +26,7 @@ let
"riscv32-linux" "riscv64-linux"
"aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none"
"aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none" "vc4-none"
];
allParsed = map parse.mkSystemFromString all;
@ -45,6 +45,7 @@ in {
x86_64 = filterDoubles predicates.isx86_64;
mips = filterDoubles predicates.isMips;
riscv = filterDoubles predicates.isRiscV;
vc4 = filterDoubles predicates.isVc4;
cygwin = filterDoubles predicates.isCygwin;
darwin = filterDoubles predicates.isDarwin;

View file

@ -118,6 +118,12 @@ rec {
config = "avr";
};
vc4 = {
config = "vc4-elf";
libc = "newlib";
platform = {};
};
arm-embedded = {
config = "arm-none-eabi";
libc = "newlib";

View file

@ -21,6 +21,7 @@ rec {
isSparc = { cpu = { family = "sparc"; }; };
isWasm = { cpu = { family = "wasm"; }; };
isMsp430 = { cpu = { family = "msp430"; }; };
isVc4 = { cpu = { family = "vc4"; }; };
isAvr = { cpu = { family = "avr"; }; };
isAlpha = { cpu = { family = "alpha"; }; };
isJavaScript = { cpu = cpuTypes.js; };

View file

@ -112,6 +112,8 @@ rec {
msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; };
avr = { bits = 8; family = "avr"; };
vc4 = { bits = 32; significantByte = littleEndian; family = "vc4"; };
js = { bits = 32; significantByte = littleEndian; family = "js"; };
};

View file

@ -3601,6 +3601,12 @@
github = "klntsky";
githubId = 18447310;
};
kmcopper = {
email = "kmcopper@danwin1210.me";
name = "Kyle Copperfield";
github = "kmcopper";
githubId = 57132115;
};
kmeakin = {
email = "karlwfmeakin@gmail.com";
name = "Karl Meakin";

View file

@ -126,7 +126,7 @@ let
packageData = package: {
name = package.name;
pname = lib.getName package;
pname = pkgs.lib.getName package;
updateScript = map builtins.toString (pkgs.lib.toList package.updateScript);
};

View file

@ -181,6 +181,11 @@
The BeeGFS module has been removed.
</para>
</listitem>
<listitem>
<para>
The osquery module has been removed.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -86,7 +86,7 @@ let
optionsList = lib.sort optionLess optionsListDesc;
# Convert the list of options into an XML file.
optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
optionsXML = pkgs.writeText "options.xml" (builtins.toXML optionsList);
optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);

View file

@ -3,7 +3,6 @@ from contextlib import contextmanager, _GeneratorContextManager
from xml.sax.saxutils import XMLGenerator
import _thread
import atexit
import json
import os
import ptpython.repl
import pty
@ -16,7 +15,7 @@ import sys
import tempfile
import time
import unicodedata
from typing import Tuple, TextIO, Any, Callable, Dict, Iterator, Optional, List
from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List
CHAR_TO_KEY = {
"A": "shift-a",
@ -771,7 +770,9 @@ def run_tests() -> None:
machine.execute("sync")
if nr_tests != 0:
log.log("{} out of {} tests succeeded".format(nr_succeeded, nr_tests))
eprint("{} out of {} tests succeeded".format(nr_succeeded, nr_tests))
if nr_tests > nr_succeeded:
sys.exit(1)
@contextmanager

View file

@ -518,7 +518,6 @@
./services/monitoring/munin.nix
./services/monitoring/nagios.nix
./services/monitoring/netdata.nix
./services/monitoring/osquery.nix
./services/monitoring/prometheus/default.nix
./services/monitoring/prometheus/alertmanager.nix
./services/monitoring/prometheus/exporters.nix

View file

@ -10,6 +10,7 @@ with lib;
(mkRenamedOptionModule [ "networking" "enableRalinkFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
(mkRenamedOptionModule [ "networking" "enableRTL8192cFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
(mkRenamedOptionModule [ "networking" "networkmanager" "useDnsmasq" ] [ "networking" "networkmanager" "dns" ])
(mkRenamedOptionModule [ "networking" "connman" ] [ "services" "connman" ])
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
(config:
let enabled = getAttrFromPath [ "services" "printing" "gutenprint" ] config;
@ -284,6 +285,9 @@ with lib;
(mkRemovedOptionModule [ "services.beegfsEnable" ] "The BeeGFS module has been removed")
(mkRemovedOptionModule [ "services.beegfs" ] "The BeeGFS module has been removed")
# osquery
(mkRemovedOptionModule [ "services.osquery" ] "The osquery module has been removed")
# Redis
(mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
(mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")

View file

@ -1,91 +0,0 @@
{ config, lib, pkgs, ... }:
with builtins;
with lib;
let
cfg = config.services.osquery;
in
{
options = {
services.osquery = {
enable = mkEnableOption "osquery";
loggerPath = mkOption {
type = types.path;
description = "Base directory used for logging.";
default = "/var/log/osquery";
};
pidfile = mkOption {
type = types.path;
description = "Path used for pid file.";
default = "/var/osquery/osqueryd.pidfile";
};
utc = mkOption {
type = types.bool;
description = "Attempt to convert all UNIX calendar times to UTC.";
default = true;
};
databasePath = mkOption {
type = types.path;
description = "Path used for database file.";
default = "/var/osquery/osquery.db";
};
extraConfig = mkOption {
type = types.attrs // {
merge = loc: foldl' (res: def: recursiveUpdate res def.value) {};
};
description = "Extra config to be recursively merged into the JSON config file.";
default = { };
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.osquery ];
environment.etc."osquery/osquery.conf".text = toJSON (
recursiveUpdate {
options = {
config_plugin = "filesystem";
logger_plugin = "filesystem";
logger_path = cfg.loggerPath;
database_path = cfg.databasePath;
utc = cfg.utc;
};
} cfg.extraConfig
);
systemd.services.osqueryd = {
description = "The osquery Daemon";
after = [ "network.target" "syslog.service" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.osquery ];
preStart = ''
mkdir -p ${escapeShellArg cfg.loggerPath}
mkdir -p "$(dirname ${escapeShellArg cfg.pidfile})"
mkdir -p "$(dirname ${escapeShellArg cfg.databasePath})"
'';
serviceConfig = {
TimeoutStartSec = "infinity";
ExecStart = "${pkgs.osquery}/bin/osqueryd --logger_path ${escapeShellArg cfg.loggerPath} --pidfile ${escapeShellArg cfg.pidfile} --database_path ${escapeShellArg cfg.databasePath}";
KillMode = "process";
KillSignal = "SIGTERM";
Restart = "on-failure";
};
};
};
}

View file

@ -4,7 +4,7 @@ with pkgs;
with lib;
let
cfg = config.networking.connman;
cfg = config.services.connman;
configFile = pkgs.writeText "connman.conf" ''
[General]
NetworkInterfaceBlacklist=${concatStringsSep "," cfg.networkInterfaceBlacklist}
@ -17,7 +17,7 @@ in {
options = {
networking.connman = {
services.connman = {
enable = mkOption {
type = types.bool;
@ -71,13 +71,13 @@ in {
assertions = [{
assertion = !config.networking.useDHCP;
message = "You can not use services.networking.connman with services.networking.useDHCP";
message = "You can not use services.connman with networking.useDHCP";
}{
assertion = config.networking.wireless.enable;
message = "You must use services.networking.connman with services.networking.wireless";
message = "You must use services.connman with networking.wireless";
}{
assertion = !config.networking.networkmanager.enable;
message = "You can not use services.networking.connman with services.networking.networkmanager";
message = "You can not use services.connman with networking.networkmanager";
}];
environment.systemPackages = [ connman ];

View file

@ -924,6 +924,8 @@ in
config = mkIf config.systemd.network.enable {
users.users.systemd-network.group = "systemd-network";
systemd.additionalUpstreamSystemUnits = [
"systemd-networkd.service" "systemd-networkd-wait-online.service"
];

View file

@ -136,6 +136,8 @@ in
}
];
users.users.resolved.group = "systemd-resolve";
systemd.additionalUpstreamSystemUnits = [
"systemd-resolved.service"
];

View file

@ -50,7 +50,10 @@ with lib;
${config.services.timesyncd.extraConfig}
'';
users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync;
users.users.systemd-timesync = {
uid = config.ids.uids.systemd-timesync;
group = "systemd-timesync";
};
users.groups.systemd-timesync.gid = config.ids.gids.systemd-timesync;
system.activationScripts.systemd-timesyncd-migration = mkIf (versionOlder config.system.stateVersion "19.09") ''

View file

@ -149,7 +149,7 @@ let
--setenv PATH="$PATH" \
${optionalString cfg.ephemeral "--ephemeral"} \
${if cfg.additionalCapabilities != null && cfg.additionalCapabilities != [] then
''--capability="${concatStringsSep " " cfg.additionalCapabilities}"'' else ""
''--capability="${concatStringsSep "," cfg.additionalCapabilities}"'' else ""
} \
${if cfg.tmpfs != null && cfg.tmpfs != [] then
''--tmpfs=${concatStringsSep " --tmpfs=" cfg.tmpfs}'' else ""

View file

@ -42,6 +42,9 @@ in {
default = false;
description = ''
Whether to start racoon service for openvswitch.
Supported only if openvswitch version is less than 2.6.0.
Use <literal>virtualisation.vswitch.package = pkgs.openvswitch-lts</literal>
for a version that supports ipsec over GRE.
'';
};
};
@ -89,6 +92,13 @@ in {
"${cfg.package}/share/openvswitch/vswitch.ovsschema"
fi
chmod -R +w /var/db/openvswitch
if ${cfg.package}/bin/ovsdb-tool needs-conversion /var/db/openvswitch/conf.db | grep -q "yes"
then
echo "Performing database upgrade"
${cfg.package}/bin/ovsdb-tool convert /var/db/openvswitch/conf.db
else
echo "Database already up to date"
fi
'';
serviceConfig = {
ExecStart =
@ -133,7 +143,7 @@ in {
};
}
(mkIf cfg.ipsec {
(mkIf (cfg.ipsec && (versionOlder cfg.package.version "2.6.0")) {
services.racoon.enable = true;
services.racoon.configPath = "${runDir}/ipsec/etc/racoon/racoon.conf";
@ -172,5 +182,4 @@ in {
'';
};
})]));
}

View file

@ -620,7 +620,7 @@ in
# Wireless won't work in the VM.
networking.wireless.enable = mkVMOverride false;
networking.connman.enable = mkVMOverride false;
services.connman.enable = mkVMOverride false;
# Speed up booting by not waiting for ARP.
networking.dhcpcd.extraConfig = "noarp";

View file

@ -206,7 +206,6 @@ in
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
orangefs = handleTest ./orangefs.nix {};
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
osquery = handleTest ./osquery.nix {};
osrm-backend = handleTest ./osrm-backend.nix {};
overlayfs = handleTest ./overlayfs.nix {};
packagekit = handleTest ./packagekit.nix {};

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...}:
import ./make-test-python.nix ({ pkgs, ...}:
let
adminPrivateKey = pkgs.writeText "id_ed25519" ''
@ -43,7 +43,7 @@ let
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZNonUP1ePHLrvn0W9D2hdN6zWWZYFyJc+QR6pOKQEw bob@client
'';
gitoliteAdminConfSnippet = ''
gitoliteAdminConfSnippet = pkgs.writeText "gitolite-admin-conf-snippet" ''
repo alice-project
RW+ = alice
'';
@ -85,55 +85,54 @@ in
};
testScript = ''
startAll;
start_all()
subtest "can setup ssh keys on system", sub {
$client->mustSucceed("mkdir -p ~root/.ssh");
$client->mustSucceed("cp ${adminPrivateKey} ~root/.ssh/id_ed25519");
$client->mustSucceed("chmod 600 ~root/.ssh/id_ed25519");
with subtest("can setup ssh keys on system"):
client.succeed(
"mkdir -p ~root/.ssh",
"cp ${adminPrivateKey} ~root/.ssh/id_ed25519",
"chmod 600 ~root/.ssh/id_ed25519",
)
client.succeed(
"sudo -u alice mkdir -p ~alice/.ssh",
"sudo -u alice cp ${alicePrivateKey} ~alice/.ssh/id_ed25519",
"sudo -u alice chmod 600 ~alice/.ssh/id_ed25519",
)
client.succeed(
"sudo -u bob mkdir -p ~bob/.ssh",
"sudo -u bob cp ${bobPrivateKey} ~bob/.ssh/id_ed25519",
"sudo -u bob chmod 600 ~bob/.ssh/id_ed25519",
)
$client->mustSucceed("sudo -u alice mkdir -p ~alice/.ssh");
$client->mustSucceed("sudo -u alice cp ${alicePrivateKey} ~alice/.ssh/id_ed25519");
$client->mustSucceed("sudo -u alice chmod 600 ~alice/.ssh/id_ed25519");
with subtest("gitolite server starts"):
server.wait_for_unit("gitolite-init.service")
server.wait_for_unit("sshd.service")
client.succeed("ssh gitolite@server info")
$client->mustSucceed("sudo -u bob mkdir -p ~bob/.ssh");
$client->mustSucceed("sudo -u bob cp ${bobPrivateKey} ~bob/.ssh/id_ed25519");
$client->mustSucceed("sudo -u bob chmod 600 ~bob/.ssh/id_ed25519");
};
with subtest("admin can clone and configure gitolite-admin.git"):
client.succeed(
"git clone gitolite@server:gitolite-admin.git",
"git config --global user.name 'System Administrator'",
"git config --global user.email root\@domain.example",
"cp ${alicePublicKey} gitolite-admin/keydir/alice.pub",
"cp ${bobPublicKey} gitolite-admin/keydir/bob.pub",
"(cd gitolite-admin && git add . && git commit -m 'Add keys for alice, bob' && git push)",
"cat ${gitoliteAdminConfSnippet} >> gitolite-admin/conf/gitolite.conf",
"(cd gitolite-admin && git add . && git commit -m 'Add repo for alice' && git push)",
)
subtest "gitolite server starts", sub {
$server->waitForUnit("gitolite-init.service");
$server->waitForUnit("sshd.service");
$client->mustSucceed('ssh gitolite@server info');
};
with subtest("non-admins cannot clone gitolite-admin.git"):
client.fail("sudo -i -u alice git clone gitolite@server:gitolite-admin.git")
client.fail("sudo -i -u bob git clone gitolite@server:gitolite-admin.git")
subtest "admin can clone and configure gitolite-admin.git", sub {
$client->mustSucceed('git clone gitolite@server:gitolite-admin.git');
$client->mustSucceed("git config --global user.name 'System Administrator'");
$client->mustSucceed("git config --global user.email root\@domain.example");
$client->mustSucceed("cp ${alicePublicKey} gitolite-admin/keydir/alice.pub");
$client->mustSucceed("cp ${bobPublicKey} gitolite-admin/keydir/bob.pub");
$client->mustSucceed('(cd gitolite-admin && git add . && git commit -m "Add keys for alice, bob" && git push)');
$client->mustSucceed("printf '${gitoliteAdminConfSnippet}' >> gitolite-admin/conf/gitolite.conf");
$client->mustSucceed('(cd gitolite-admin && git add . && git commit -m "Add repo for alice" && git push)');
};
with subtest("non-admins can clone testing.git"):
client.succeed("sudo -i -u alice git clone gitolite@server:testing.git")
client.succeed("sudo -i -u bob git clone gitolite@server:testing.git")
subtest "non-admins cannot clone gitolite-admin.git", sub {
$client->mustFail('sudo -i -u alice git clone gitolite@server:gitolite-admin.git');
$client->mustFail('sudo -i -u bob git clone gitolite@server:gitolite-admin.git');
};
with subtest("alice can clone alice-project.git"):
client.succeed("sudo -i -u alice git clone gitolite@server:alice-project.git")
subtest "non-admins can clone testing.git", sub {
$client->mustSucceed('sudo -i -u alice git clone gitolite@server:testing.git');
$client->mustSucceed('sudo -i -u bob git clone gitolite@server:testing.git');
};
subtest "alice can clone alice-project.git", sub {
$client->mustSucceed('sudo -i -u alice git clone gitolite@server:alice-project.git');
};
subtest "bob cannot clone alice-project.git", sub {
$client->mustFail('sudo -i -u bob git clone gitolite@server:alice-project.git');
};
with subtest("bob cannot clone alice-project.git"):
client.fail("sudo -i -u bob git clone gitolite@server:alice-project.git")
'';
})

View file

@ -1,6 +1,6 @@
# This test runs influxdb and checks if influxdb is up and running
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "influxdb";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ offline ];
@ -9,25 +9,32 @@ import ./make-test.nix ({ pkgs, ...} : {
nodes = {
one = { ... }: {
services.influxdb.enable = true;
environment.systemPackages = [ pkgs.httpie ];
};
};
testScript = ''
startAll;
$one->waitForUnit("influxdb.service");
import shlex
start_all()
one.wait_for_unit("influxdb.service")
# create database
$one->succeed(q~
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE test"
~);
one.succeed(
"curl -XPOST http://localhost:8086/query --data-urlencode 'q=CREATE DATABASE test'"
)
# write some points and run simple query
$one->succeed(q~
curl -XPOST 'http://localhost:8086/write?db=test' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
~);
$one->succeed(q~
curl -GET 'http://localhost:8086/query' --data-urlencode "db=test" --data-urlencode "q=SELECT \"value\" FROM \"cpu_load_short\" WHERE \"region\"='us-west'" | grep "0\.64"
~);
out = one.succeed(
"curl -XPOST 'http://localhost:8086/write?db=test' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'"
)
qv = "SELECT value FROM cpu_load_short WHERE region='us-west'"
cmd = f'curl -GET "http://localhost:8086/query?db=test" --data-urlencode {shlex.quote("q="+ qv)}'
out = one.succeed(cmd)
assert "2015-06-11T20:46:02Z" in out
assert "0.64" in out
'';
})

View file

@ -3,7 +3,7 @@
# 2. jenkins user can be extended on both master and slave
# 3. jenkins service not started on slave node
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "jenkins";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ bjornfor coconnor domenkozar eelco ];
@ -33,18 +33,17 @@ import ./make-test.nix ({ pkgs, ...} : {
};
testScript = ''
startAll;
start_all()
$master->waitForUnit("jenkins");
master.wait_for_unit("jenkins")
$master->mustSucceed("curl http://localhost:8080 | grep 'Authentication required'");
assert "Authentication required" in master.succeed("curl http://localhost:8080")
print $master->execute("sudo -u jenkins groups");
$master->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
for host in master, slave:
groups = host.succeed("sudo -u jenkins groups")
assert "jenkins" in groups
assert "users" in groups
print $slave->execute("sudo -u jenkins groups");
$slave->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
$slave->mustFail("systemctl is-enabled jenkins.service");
slave.fail("systemctl is-enabled jenkins.service")
'';
})

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} :
import ./make-test-python.nix ({ pkgs, ...} :
let
accessKey = "BKIKJAA5BMMU2RHO6IBB";
secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
@ -18,7 +18,7 @@ let
sio.seek(0)
minioClient.put_object('test-bucket', 'test.txt', sio, sio_len, content_type='text/plain')
'';
in {
in {
name = "minio";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ bachp ];
@ -37,19 +37,19 @@ let
};
};
testScript =
''
startAll;
$machine->waitForUnit("minio.service");
$machine->waitForOpenPort(9000);
testScript = ''
start_all()
machine.wait_for_unit("minio.service")
machine.wait_for_open_port(9000)
# Create a test bucket on the server
$machine->succeed("mc config host add minio http://localhost:9000 ${accessKey} ${secretKey} S3v4");
$machine->succeed("mc mb minio/test-bucket");
$machine->succeed("${minioPythonScript}");
$machine->succeed("mc ls minio") =~ /test-bucket/ or die;
$machine->succeed("mc cat minio/test-bucket/test.txt") =~ /Test from Python/ or die;
$machine->shutdown;
'';
# Create a test bucket on the server
machine.succeed(
"mc config host add minio http://localhost:9000 ${accessKey} ${secretKey} S3v4"
)
machine.succeed("mc mb minio/test-bucket")
machine.succeed("${minioPythonScript}")
assert "test-bucket" in machine.succeed("mc ls minio")
assert "Test from Python" in machine.succeed("mc cat minio/test-bucket/test.txt")
machine.shutdown()
'';
})

View file

@ -3,7 +3,7 @@
# 2. nexus service can startup on server (creating database and all other initial stuff)
# 3. the web application is reachable via HTTP
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "nexus";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ironpinguin ma27 ];
@ -22,11 +22,11 @@ import ./make-test.nix ({ pkgs, ...} : {
};
testScript = ''
startAll;
start_all()
$server->waitForUnit("nexus");
$server->waitForOpenPort(8081);
server.wait_for_unit("nexus")
server.wait_for_open_port(8081)
$server->succeed("curl -f 127.0.0.1:8081");
server.succeed("curl -f 127.0.0.1:8081")
'';
})

View file

@ -1,28 +0,0 @@
import ./make-test.nix ({ pkgs, lib, ... }:
with lib;
{
name = "osquery";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ma27 ];
};
machine = {
services.osquery.enable = true;
services.osquery.loggerPath = "/var/log/osquery/logs";
services.osquery.pidfile = "/run/osqueryd.pid";
};
testScript = ''
$machine->start;
$machine->waitForUnit("osqueryd.service");
$machine->succeed("echo 'SELECT address FROM etc_hosts LIMIT 1;' | osqueryi | grep '127.0.0.1'");
$machine->succeed(
"echo 'SELECT value FROM osquery_flags WHERE name = \"logger_path\";' | osqueryi | grep /var/log/osquery/logs"
);
$machine->succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"pidfile\";' | osqueryi | grep /run/osqueryd.pid");
'';
})

View file

@ -1,9 +1,10 @@
import ./make-test.nix ({ pkgs, ...} :
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "pantheon";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ worldofpeace ];
maintainers = pkgs.pantheon.maintainers;
};
machine = { ... }:
@ -21,35 +22,37 @@ import ./make-test.nix ({ pkgs, ...} :
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
bob = nodes.machine.config.users.users.bob;
in ''
startAll;
machine.wait_for_unit("display-manager.service")
# Wait for display manager to start
$machine->waitForText(qr/${user.description}/);
$machine->screenshot("lightdm");
with subtest("Test we can see usernames in elementary-greeter"):
machine.wait_for_text("${user.description}")
machine.wait_for_text("${bob.description}")
machine.screenshot("elementary_greeter_lightdm")
# Log in
$machine->sendChars("${user.password}\n");
$machine->waitForFile("/home/alice/.Xauthority");
$machine->succeed("xauth merge ~alice/.Xauthority");
with subtest("Login with elementary-greeter"):
machine.send_chars("${user.password}\n")
machine.wait_for_x()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
# Check if "pantheon-shell" components actually start
$machine->waitUntilSucceeds("pgrep gala");
$machine->waitForWindow(qr/gala/);
$machine->waitUntilSucceeds("pgrep wingpanel");
$machine->waitForWindow("wingpanel");
$machine->waitUntilSucceeds("pgrep plank");
$machine->waitForWindow(qr/plank/);
with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
# Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
# TODO: DBus API could eliminate this? Pantheon uses Bamf.
with subtest("Check if pantheon session components actually start"):
machine.wait_until_succeeds("pgrep gala")
machine.wait_for_window("gala")
machine.wait_until_succeeds("pgrep wingpanel")
machine.wait_for_window("wingpanel")
machine.wait_until_succeeds("pgrep plank")
machine.wait_for_window("plank")
# Open elementary terminal
$machine->execute("su - alice -c 'DISPLAY=:0.0 io.elementary.terminal &'");
$machine->waitForWindow(qr/io.elementary.terminal/);
# Take a screenshot of the desktop
$machine->sleep(20);
$machine->screenshot("screen");
with subtest("Open elementary terminal"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal &'")
machine.wait_for_window("io.elementary.terminal")
machine.sleep(20)
machine.screenshot("screen")
'';
})

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} :
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "plasma5";
@ -7,23 +7,11 @@ import ./make-test.nix ({ pkgs, ...} :
};
machine = { ... }:
let
sddm_theme = pkgs.stdenv.mkDerivation {
name = "breeze-ocr-theme";
phases = "buildPhase";
buildCommand = ''
mkdir -p $out/share/sddm/themes/
cp -r ${pkgs.plasma-workspace}/share/sddm/themes/breeze $out/share/sddm/themes/breeze-ocr-theme
chmod -R +w $out/share/sddm/themes/breeze-ocr-theme
printf "[General]\ntype=color\ncolor=#1d99f3\nbackground=\n" > $out/share/sddm/themes/breeze-ocr-theme/theme.conf
'';
};
in
{
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.theme = "breeze-ocr-theme";
services.xserver.desktopManager.plasma5.enable = true;
services.xserver.desktopManager.default = "plasma5";
services.xserver.displayManager.sddm.autoLogin = {
@ -32,34 +20,40 @@ import ./make-test.nix ({ pkgs, ...} :
};
hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
virtualisation.memorySize = 1024;
environment.systemPackages = [ sddm_theme ];
};
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
xdo = "${pkgs.xdotool}/bin/xdotool";
in ''
startAll;
# wait for log in
$machine->waitForFile("/home/alice/.Xauthority");
$machine->succeed("xauth merge ~alice/.Xauthority");
with subtest("Wait for login"):
start_all()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
$machine->waitUntilSucceeds("pgrep plasmashell");
$machine->waitForWindow("^Desktop ");
with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell")
machine.wait_for_window("^Desktop ")
# Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
$machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'");
$machine->waitForWindow(" Dolphin");
with subtest("Run Dolphin"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin &'")
machine.wait_for_window(" Dolphin")
$machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'");
$machine->waitForWindow("Konsole");
with subtest("Run Konsole"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole &'")
machine.wait_for_window("Konsole")
$machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'");
$machine->waitForWindow("Settings");
with subtest("Run systemsettings"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings5 &'")
machine.wait_for_window("Settings")
$machine->execute("${xdo} key Alt+F1 sleep 10");
$machine->screenshot("screen");
with subtest("Wait to get a screenshot"):
machine.execute(
"${xdo} key Alt+F1 sleep 10"
)
machine.screenshot("screen")
'';
})

View file

@ -31,7 +31,7 @@ let
};
};
in import ./make-test.nix {
in import ./make-test-python.nix {
name = "prometheus";
nodes = {
@ -173,67 +173,73 @@ in import ./make-test.nix {
testScript = { nodes, ... } : ''
# Before starting the other machines we first make sure that our S3 service is online
# and has a bucket added for thanos:
$s3->start;
$s3->waitForUnit("minio.service");
$s3->waitForOpenPort(${toString minioPort});
$s3->succeed(
"mc config host add minio " .
"http://localhost:${toString minioPort} ${s3.accessKey} ${s3.secretKey} S3v4");
$s3->succeed("mc mb minio/thanos-bucket");
s3.start()
s3.wait_for_unit("minio.service")
s3.wait_for_open_port(${toString minioPort})
s3.succeed(
"mc config host add minio "
+ "http://localhost:${toString minioPort} "
+ "${s3.accessKey} ${s3.secretKey} S3v4",
"mc mb minio/thanos-bucket",
)
# Now that s3 has started we can start the other machines:
$prometheus->start;
$query->start;
$store->start;
for machine in prometheus, query, store:
machine.start()
# Check if prometheus responds to requests:
$prometheus->waitForUnit("prometheus.service");
$prometheus->waitForOpenPort(${toString queryPort});
$prometheus->succeed("curl -s http://127.0.0.1:${toString queryPort}/metrics");
prometheus.wait_for_unit("prometheus.service")
prometheus.wait_for_open_port(${toString queryPort})
prometheus.succeed("curl -s http://127.0.0.1:${toString queryPort}/metrics")
# Let's test if pushing a metric to the pushgateway succeeds:
$prometheus->waitForUnit("pushgateway.service");
$prometheus->succeed(
"echo 'some_metric 3.14' | " .
"curl --data-binary \@- http://127.0.0.1:${toString pushgwPort}/metrics/job/some_job");
prometheus.wait_for_unit("pushgateway.service")
prometheus.succeed(
"echo 'some_metric 3.14' | "
+ "curl --data-binary \@- "
+ "http://127.0.0.1:${toString pushgwPort}/metrics/job/some_job"
)
# Now check whether that metric gets ingested by prometheus.
# Since we'll check for the metric several times on different machines
# we abstract the test using the following function:
# Function to check if the metric "some_metric" has been received and returns the correct value.
local *Machine::waitForMetric = sub {
my ($self) = @_;
$self->waitUntilSucceeds(
"curl -sf 'http://127.0.0.1:${toString queryPort}/api/v1/query?query=some_metric' " .
"| jq '.data.result[0].value[1]' | grep '\"3.14\"'");
};
def wait_for_metric(machine):
return machine.wait_until_succeeds(
"curl -sf 'http://127.0.0.1:${toString queryPort}/api/v1/query?query=some_metric' | "
+ "jq '.data.result[0].value[1]' | grep '\"3.14\"'"
)
$prometheus->waitForMetric;
wait_for_metric(prometheus)
# Let's test if the pushgateway persists metrics to the configured location.
$prometheus->waitUntilSucceeds("test -e /var/lib/prometheus-pushgateway/metrics");
prometheus.wait_until_succeeds("test -e /var/lib/prometheus-pushgateway/metrics")
# Test thanos
$prometheus->waitForUnit("thanos-sidecar.service");
prometheus.wait_for_unit("thanos-sidecar.service")
# Test if the Thanos query service can correctly retrieve the metric that was send above.
$query->waitForUnit("thanos-query.service");
$query->waitForMetric;
query.wait_for_unit("thanos-query.service")
wait_for_metric(query)
# Test if the Thanos sidecar has correctly uploaded its TSDB to S3, if the
# Thanos storage service has correctly downloaded it from S3 and if the Thanos
# query service running on $store can correctly retrieve the metric:
$store->waitForUnit("thanos-store.service");
$store->waitForMetric;
store.wait_for_unit("thanos-store.service")
wait_for_metric(store)
$store->waitForUnit("thanos-compact.service");
store.wait_for_unit("thanos-compact.service")
# Test if the Thanos bucket command is able to retrieve blocks from the S3 bucket
# and check if the blocks have the correct labels:
$store->succeed(
"thanos bucket ls" .
" --objstore.config-file=${nodes.store.config.services.thanos.store.objstore.config-file}" .
" --output=json | jq .thanos.labels.some_label | grep 'required by thanos'");
store.succeed(
"thanos bucket ls "
+ "--objstore.config-file=${nodes.store.config.services.thanos.store.objstore.config-file} "
+ "--output=json | "
+ "jq .thanos.labels.some_label | "
+ "grep 'required by thanos'"
)
'';
}

View file

@ -4,7 +4,7 @@ let
password = "helloworld";
in
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "sudo";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ lschuermann ];
@ -50,44 +50,34 @@ in
testScript =
''
subtest "users in wheel group should have passwordless sudo", sub {
$machine->succeed("su - test0 -c \"sudo -u root true\"");
};
with subtest("users in wheel group should have passwordless sudo"):
machine.succeed('su - test0 -c "sudo -u root true"')
subtest "test1 user should have sudo with password", sub {
$machine->succeed("su - test1 -c \"echo ${password} | sudo -S -u root true\"");
};
with subtest("test1 user should have sudo with password"):
machine.succeed('su - test1 -c "echo ${password} | sudo -S -u root true"')
subtest "test1 user should not be able to use sudo without password", sub {
$machine->fail("su - test1 -c \"sudo -n -u root true\"");
};
with subtest("test1 user should not be able to use sudo without password"):
machine.fail('su - test1 -c "sudo -n -u root true"')
subtest "users in group 'foobar' should be able to use sudo with password", sub {
$machine->succeed("sudo -u test2 echo ${password} | sudo -S -u root true");
};
with subtest("users in group 'foobar' should be able to use sudo with password"):
machine.succeed("sudo -u test2 echo ${password} | sudo -S -u root true")
subtest "users in group 'barfoo' should be able to use sudo without password", sub {
$machine->succeed("sudo -u test3 sudo -n -u root true");
};
with subtest("users in group 'barfoo' should be able to use sudo without password"):
machine.succeed("sudo -u test3 sudo -n -u root true")
subtest "users in group 'baz' (GID 1337) should be able to use sudo without password", sub {
$machine->succeed("sudo -u test4 sudo -n -u root echo true");
};
with subtest("users in group 'baz' (GID 1337)"):
machine.succeed("sudo -u test4 sudo -n -u root echo true")
subtest "test5 user should be able to run commands under test1", sub {
$machine->succeed("sudo -u test5 sudo -n -u test1 true");
};
with subtest("test5 user should be able to run commands under test1"):
machine.succeed("sudo -u test5 sudo -n -u test1 true")
subtest "test5 user should not be able to run commands under root", sub {
$machine->fail("sudo -u test5 sudo -n -u root true");
};
with subtest("test5 user should not be able to run commands under root"):
machine.fail("sudo -u test5 sudo -n -u root true")
subtest "test5 user should be able to keep his environment", sub {
$machine->succeed("sudo -u test5 sudo -n -E -u test1 true");
};
with subtest("test5 user should be able to keep his environment"):
machine.succeed("sudo -u test5 sudo -n -E -u test1 true")
subtest "users in group 'barfoo' should not be able to keep their environment", sub {
$machine->fail("sudo -u test3 sudo -n -E -u root true");
};
with subtest("users in group 'barfoo' should not be able to keep their environment"):
machine.fail("sudo -u test3 sudo -n -E -u root true")
'';
})

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, pkgs, ... }: let
import ./make-test-python.nix ({ lib, pkgs, ... }: let
testId = "7CFNTQM-IMTJBHJ-3UWRDIU-ZGQJFR6-VCXZ3NB-XUH3KZO-N52ITXR-LAIYUAU";
@ -22,13 +22,11 @@ in {
};
testScript = ''
my $config;
$machine->waitForUnit("syncthing-init.service");
$config = $machine->succeed("cat /var/lib/syncthing/.config/syncthing/config.xml");
machine.wait_for_unit("syncthing-init.service")
config = machine.succeed("cat /var/lib/syncthing/.config/syncthing/config.xml")
$config =~ /${testId}/ or die;
$config =~ /testFolder/ or die;
assert "testFolder" in config
assert "${testId}" in config
'';
})

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, pkgs, ... }: {
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "syncthing-relay";
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ delroth ];
@ -14,9 +14,13 @@ import ./make-test.nix ({ lib, pkgs, ... }: {
};
testScript = ''
$machine->waitForUnit("syncthing-relay.service");
$machine->waitForOpenPort(12345);
$machine->waitForOpenPort(12346);
$machine->succeed("curl http://localhost:12346/status | jq -r '.options.\"provided-by\"'") =~ /nixos-test/ or die;
machine.wait_for_unit("syncthing-relay.service")
machine.wait_for_open_port(12345)
machine.wait_for_open_port(12346)
out = machine.succeed(
"curl -sS http://localhost:12346/status | jq -r '.options.\"provided-by\"'"
)
assert "nixos-test" in out
'';
})

View file

@ -1,4 +1,4 @@
let generateNodeConf = { lib, pkgs, config, privkpath, pubk, peerId, nodeId, ...}: {
let generateNodeConf = { lib, pkgs, config, privk, pubk, peerId, nodeId, ...}: {
imports = [ common/user-account.nix ];
systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
networking.useNetworkd = true;
@ -7,13 +7,16 @@ let generateNodeConf = { lib, pkgs, config, privkpath, pubk, peerId, nodeId, ...
virtualisation.vlans = [ 1 ];
environment.systemPackages = with pkgs; [ wireguard-tools ];
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
systemd.tmpfiles.rules = [
"f /run/wg_priv 0640 root systemd-network - ${privk}"
];
systemd.network = {
enable = true;
netdevs = {
"90-wg0" = {
netdevConfig = { Kind = "wireguard"; Name = "wg0"; };
wireguardConfig = {
PrivateKeyFile = privkpath ;
PrivateKeyFile = "/run/wg_priv";
ListenPort = 51820;
FwMark = 42;
};
@ -53,7 +56,7 @@ in import ./make-test-python.nix ({pkgs, ... }: {
nodes = {
node1 = { pkgs, ... }@attrs:
let localConf = {
privkpath = pkgs.writeText "priv.key" "GDiXWlMQKb379XthwX0haAbK6hTdjblllpjGX0heP00=";
privk = "GDiXWlMQKb379XthwX0haAbK6hTdjblllpjGX0heP00=";
pubk = "iRxpqj42nnY0Qz8MAQbSm7bXxXP5hkPqWYIULmvW+EE=";
nodeId = "1";
peerId = "2";
@ -62,7 +65,7 @@ in import ./make-test-python.nix ({pkgs, ... }: {
node2 = { pkgs, ... }@attrs:
let localConf = {
privkpath = pkgs.writeText "priv.key" "eHxSI2jwX/P4AOI0r8YppPw0+4NZnjOxfbS5mt06K2k=";
privk = "eHxSI2jwX/P4AOI0r8YppPw0+4NZnjOxfbS5mt06K2k=";
pubk = "27s0OvaBBdHoJYkH9osZpjpgSOVNw+RaKfboT/Sfq0g=";
nodeId = "2";
peerId = "1";

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }:
import ./make-test-python.nix ({ pkgs, ... }:
{
name = "uwsgi";
meta = with pkgs.stdenv.lib.maintainers; {
@ -30,9 +30,9 @@ import ./make-test.nix ({ pkgs, ... }:
testScript =
''
$machine->waitForUnit('multi-user.target');
$machine->waitForUnit('uwsgi.service');
$machine->waitForOpenPort(8000);
$machine->succeed('curl -v 127.0.0.1:8000 | grep "Hello World!"');
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("uwsgi.service")
machine.wait_for_open_port(8000)
assert "Hello World" in machine.succeed("curl -v 127.0.0.1:8000")
'';
})

View file

@ -45,12 +45,12 @@ import ./make-test-python.nix ({ pkgs, ... }:
with subtest("wordpress-init went through"):
for site_name in site_names:
info = machine.get_unit_info(f"wordpress-init-{site_name}")
assert info.Result == "success"
assert info["Result"] == "success"
with subtest("secret keys are set"):
re.compile(r"^define.*NONCE_SALT.{64,};$")
pattern = re.compile(r"^define.*NONCE_SALT.{64,};$", re.MULTILINE)
for site_name in site_names:
assert r.match(
assert pattern.search(
machine.succeed(f"cat /var/lib/wordpress/{site_name}/secret-keys.php")
)
'';

View file

@ -7,12 +7,12 @@
with stdenv.lib;
stdenv.mkDerivation rec {
version = "2.3.2";
version = "2.3.3";
pname = "audacity";
src = fetchzip {
url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
sha256 = "08w96124vv8k4myd4vifq73ningq6404x889wvg2sk016kc4dfv1";
sha256 = "0ddc03dbm4ixy877czmwd03fpjgr3y68bxfgb6n2q6cv4prp30ig";
};
preConfigure = /* we prefer system-wide libs */ ''

View file

@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
version = "0.2.19";
version = "0.2.20";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
sha256 = "063b28ysj224m6ngns9i574i7vnp1x4g07cqjw908ch04yngcg1c";
sha256 = "1hf4wpk7r0s4jpjhxaz67y1hd8jx9ns5imd85r3cdg4lxf3j5gph";
};
cargoSha256 = "0pqxqd5dyw9mjclrqkxzfnzsz74xl4bg0b86v5q6kc0a91zd49b9";
cargoSha256 = "1h3fis47hmxvppiv1icjhgp48nd46gayfcmzfjs34q6jask90n0w";
cargoBuildFlags = [
"--no-default-features"
@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec {
description = "An open source Spotify client running as a UNIX daemon";
homepage = "https://github.com/Spotifyd/spotifyd";
license = with licenses; [ gpl3 ];
maintainers = [ maintainers.anderslundstedt maintainers.marsam ];
maintainers = with maintainers; [ anderslundstedt filalex77 marsam ];
platforms = platforms.unix;
};
}

View file

@ -60,11 +60,11 @@ let
in mkDerivation rec {
pname = "drawpile";
version = "2.1.13";
version = "2.1.14";
src = fetchurl {
url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz";
sha256 = "0r56hkzjdlg4615zvrjv60i3f06pv7ssh6bs6jb46qs8wbsawsxf";
sha256 = "0vpsq8swvli6xiykjqjmdcz33jd44nvhq1n350dm9qap9s9wdr47";
};
nativeBuildInputs = [

View file

@ -1,6 +1,7 @@
{ stdenv
, mkDerivation
, fetchFromGitHub
, fetchpatch
, cmake
, pkgconfig
@ -9,7 +10,7 @@
, qtsvg
, exiv2
, opencv
, opencv4
, libraw
, libtiff
, quazip
@ -28,6 +29,12 @@ mkDerivation rec {
patches = [
./nomacs-iostream.patch
(fetchpatch {
name = "darwin-less-restrictive-opencv.patch";
url = "https://github.com/nomacs/nomacs/commit/d182fce4bcd9a25bd15e3de065ca67849a32458c.patch";
sha256 = "0j6sviwrjn69nqf59hjn30c4j838h8az7rnlwcx8ymlb21vd9x2h";
stripLen = 1;
})
];
enableParallelBuilding = true;
@ -43,7 +50,7 @@ mkDerivation rec {
qttools
qtsvg
exiv2
opencv
opencv4
libraw
libtiff
quazip];

View file

@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "clightd";
version = "3.4";
version = "4.0";
src = fetchFromGitHub {
owner = "FedeDP";
repo = "Clightd";
rev = version;
sha256 = "0g6kawizwfhvigkwm7rbfq6rg872xn8igy8n355w4d7mmcxk0jf8";
sha256 = "0cskxy3xsy187in5vg8xcs3kwcx2s160qv009v0ahkcalp29ghz4";
};
# dbus-1.pc has datadir=/etc

View file

@ -1,18 +1,18 @@
{ lib, stdenv, fetchFromGitHub
, dbus, cmake, pkgconfig, bash-completion
, gsl, popt, clightd, systemd, libconfig
, gsl, popt, clightd, systemd, libconfig, libmodule
, withGeoclue ? true, geoclue2
, withUpower ? true, upower }:
stdenv.mkDerivation rec {
pname = "clight";
version = "3.1";
version = "4.0";
src = fetchFromGitHub {
owner = "FedeDP";
repo = "Clight";
rev = version;
sha256 = "0rzcr1x9h4llnmklhgzs9r7xwhsrw1qkqvfffkp8fs90nycaqx81";
sha256 = "101fp9kwmfmfffpdvv41wf96kdjw0b16xk49g43w32a5wlr74zrq";
};
# bash-completion.pc completionsdir=${bash-completion.out}
@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
systemd
geoclue2
libconfig
libmodule
] ++ optional withGeoclue geoclue2
++ optional withUpower upower;

View file

@ -5,13 +5,13 @@
mkDerivation rec {
pname = "CopyQ";
version = "3.9.2";
version = "3.9.3";
src = fetchFromGitHub {
owner = "hluk";
repo = "CopyQ";
rev = "v${version}";
sha256 = "02zs444i7hnqishs1i6vp8ffjxlxk3xkrw935pdwnwppv9s9v202";
sha256 = "0wlwq9xg8rzsbj0b29z358k4mbrqy04iraa8x0p26pa95yskgcma";
};
nativeBuildInputs = [ cmake ];

View file

@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
pname = "dbeaver-ce";
version = "6.2.4";
version = "6.2.5";
desktopItem = makeDesktopItem {
name = "dbeaver";
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "1k3aan290kfy2b53gl8r4yxvb8jas6sms1r052m3jld3i8frqgva";
sha256 = "1bg5cq7ivf263mjr8g9qwdhp9x0gm04nqiya4fyw0k33yiab85zn";
};
installPhase = ''

View file

@ -8,7 +8,7 @@ let
wrapperScript = writeScript "glava" ''
#!${runtimeShell}
case "$1" in
--copy-config)
--copy-config|-C)
# The binary would symlink it, which won't work in Nix because the
# garbage collector will eventually remove the original files after
# updates
@ -45,6 +45,14 @@ in
];
preConfigure = ''
for f in $(find -type f);do
substituteInPlace $f \
--replace /etc/xdg $out/etc/xdg
done
substituteInPlace Makefile \
--replace '$(DESTDIR)$(SHADERDIR)' '$(SHADERDIR)'
substituteInPlace Makefile \
--replace 'unknown' 'v${version}'

View file

@ -1,5 +1,5 @@
{ cairo, cmake, fetchFromGitHub, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
, python2, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
, python3, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
, xcbutilrenderutil, xcbutilwm, xcbutilxrm, makeWrapper
# optional packages-- override the variables ending in 'Support' to enable or
@ -24,15 +24,16 @@ assert nlSupport -> ! iwSupport && libnl != null;
assert i3Support -> ! i3GapsSupport && jsoncpp != null && i3 != null;
assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
stdenv.mkDerivation rec {
let xcbproto-py3 = xcbproto.override { python = python3; };
in stdenv.mkDerivation rec {
pname = "polybar";
version = "3.4.0";
version = "3.4.1";
src = fetchFromGitHub {
owner = "jaagr";
owner = pname;
repo = pname;
rev = version;
sha256 = "1g3zj0788cdlm8inpl19279bw8zjcy7dzj7q4f1l2d8c8g1jhv0m";
sha256 = "1z1m6dxh2i5vsnkzaccb9j02ab05wgmcgig5d0l9w856g5jp3zmy";
fetchSubmodules = true;
};
@ -45,12 +46,12 @@ stdenv.mkDerivation rec {
having a black belt in shell scripting.
'';
license = licenses.mit;
maintainers = [ maintainers.afldcr ];
platforms = platforms.unix;
maintainers = with maintainers; [ afldcr filalex77 ];
platforms = platforms.linux;
};
buildInputs = [
cairo libXdmcp libpthreadstubs libxcb pcre python2 xcbproto xcbutil
cairo libXdmcp libpthreadstubs libxcb pcre python3 xcbproto-py3 xcbutil
xcbutilcursor xcbutilimage xcbutilrenderutil xcbutilwm xcbutilxrm
(if alsaSupport then alsaLib else null)

View file

@ -17,7 +17,7 @@ buildGoPackage rec {
meta = with stdenv.lib; {
description = "C14 is designed for data archiving & long-term backups.";
homepage = https://www.online.net/en/c14;
homepage = https://www.online.net/en/storage/c14-cold-storage;
license = licenses.mit;
maintainers = with maintainers; [ apeyroux ];
};

View file

@ -11,11 +11,11 @@
mkDerivation rec {
pname = "datovka";
version = "4.14.0";
version = "4.14.1";
src = fetchurl {
url = "https://secure.nic.cz/files/datove_schranky/${version}/${pname}-${version}.tar.xz";
sha256 = "0q7zlq522wdgwxgd3jxmxvr3awclcy0mbw3qaymwzn2b8d35168r";
sha256 = "0jinxsm2zw77294vz9pjiqpgpzdwx5nijsi4nqzxna5rkmwdyxk6";
};
buildInputs = [ libisds qmake qtbase qtsvg libxml2 ];

View file

@ -2,19 +2,18 @@
, zlib, libxml2, gtk2, libnotify, speex, ffmpeg, libX11, libsoup, udev
, ortp, mediastreamer, sqlite, belle-sip, libosip, libexosip, bzrtp
, mediastreamer-openh264, bctoolbox, makeWrapper, fetchFromGitHub, cmake
, libmatroska, bcunit, doxygen, gdk-pixbuf, glib, cairo, pango, polarssl
, python, graphviz, belcard
, libmatroska, bcunit, doxygen, gdk-pixbuf, glib, cairo, pango, mbedtls
, python, graphviz, belcard, bcg729
, withGui ? true
}:
stdenv.mkDerivation rec {
baseName = "linphone";
pname = "linphone";
version = "3.12.0";
name = "${baseName}-${version}";
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = baseName;
repo = pname;
rev = version;
sha256 = "0az2ywrpx11sqfb4s4r2v726avcjf4k15bvrqj7xvhz7hdndmh0j";
};
@ -27,21 +26,25 @@ stdenv.mkDerivation rec {
buildInputs = [
readline openldap cyrus_sasl libupnp zlib libxml2 gtk2 libnotify speex ffmpeg libX11
polarssl libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
bctoolbox libmatroska bcunit gdk-pixbuf glib cairo pango bzrtp belcard
mbedtls libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
bctoolbox libmatroska gdk-pixbuf glib cairo pango bzrtp belcard bcg729
];
nativeBuildInputs = [
intltool pkgconfig makeWrapper cmake doxygen graphviz
intltool pkgconfig makeWrapper cmake bcunit doxygen graphviz
(python.withPackages (ps: [ ps.pystache ps.six ]))
];
NIX_CFLAGS_COMPILE = " -Wno-error -I${glib.dev}/include/glib-2.0
-I${glib.out}/lib/glib-2.0/include -I${gtk2.dev}/include/gtk-2.0/
-I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0
-I${gtk2}/lib/gtk-2.0/include
-DLIBLINPHONE_GIT_VERSION=\"v${version}\"
";
NIX_CFLAGS_COMPILE = [
"-Wno-error"
"-I${glib.dev}/include/glib-2.0"
"-I${glib.out}/lib/glib-2.0/include"
"-I${gtk2.dev}/include/gtk-2.0/"
"-I${cairo.dev}/include/cairo"
"-I${pango.dev}/include/pango-1.0"
"-I${gtk2}/lib/gtk-2.0/include"
"-DLIBLINPHONE_GIT_VERSION=\"v${version}\""
];
postInstall = ''
for i in $(cd $out/bin && ls); do
@ -50,8 +53,8 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
homepage = http://www.linphone.org/;
description = "Open Source video SIP softphone";
homepage = https://www.linphone.org/;
description = "Open source SIP phone for voice/video calls and instant messaging";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};

View file

@ -1,21 +1,22 @@
{ stdenv, buildGoModule, fetchurl
, go, ncurses, scdoc
, go, ncurses, notmuch, scdoc
, python3, perl, w3m, dante
}:
buildGoModule rec {
pname = "aerc";
version = "0.2.1";
version = "0.3.0";
src = fetchurl {
url = "https://git.sr.ht/~sircmpwn/aerc/archive/${version}.tar.gz";
sha256 = "1ky1nl5b54lf5jnac2kb5404fplwnwypjplas8imdlsf517fw32n";
sha256 = "188jln8hmgiqn5il5m54bns0wk4grj09di8y6mmid58ibw6spma4";
};
nativeBuildInputs = [
go
scdoc
python3.pkgs.wrapPython
notmuch
];
patches = [
@ -28,6 +29,8 @@ buildGoModule rec {
buildInputs = [ python3 perl ];
GOFLAGS="-tags=notmuch";
buildPhase = "
runHook preBuild
# we use make instead of go build
@ -43,12 +46,12 @@ buildGoModule rec {
postFixup = ''
wrapProgram $out/bin/aerc --prefix PATH ":" \
"$out/share/aerc/filters:${stdenv.lib.makeBinPath [ ncurses.dev ]}"
"$out/share/aerc/filters:${stdenv.lib.makeBinPath [ ncurses ]}"
wrapProgram $out/share/aerc/filters/html --prefix PATH ":" \
${stdenv.lib.makeBinPath [ w3m dante ]}
'';
modSha256 = "0fc9m1qb8innypc8cxzbqyrfkawawyaqq3gqy7lqwmyh32f300jh";
modSha256 = "0pxbv4zfhii0g41cy0ycfpkkxw6nnd4ibavic6zqw30j476jnm2x";
meta = with stdenv.lib; {
description = "aerc is an email client for your terminal";

View file

@ -1,18 +1,19 @@
From 7ea68a2eef026723903d72f54ca54b629881ec06 Mon Sep 17 00:00:00 2001
From 6cf3c2e42d219b9665a43ca65f321c653b0aa102 Mon Sep 17 00:00:00 2001
From: Tadeo Kondrak <me@tadeo.ca>
Date: Mon, 28 Oct 2019 08:36:36 -0600
Subject: [PATCH] Fix aerc breaking every time the package is rebuilt.
On NixOS, the SHAREDIR changes on every rebuild to the package, but aerc
fills it in as part of the default config. Fix this by not substituting
@SHAREDIR@ in the default config until runtime.
fills it in as part of the default config and then installs that config
to the users home folder. Fix this by not substituting @SHAREDIR@ in the
default config until runtime.
---
Makefile | 2 +-
config/config.go | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
config/config.go | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d3072d3..17ca0be 100644
index d1c755d..1185a96 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ aerc: $(GOSRC)
@ -25,10 +26,22 @@ index d3072d3..17ca0be 100644
DOCS := \
aerc.1 \
diff --git a/config/config.go b/config/config.go
index bfcbecf..2f4e703 100644
index 32d07fc..8ffd3e8 100644
--- a/config/config.go
+++ b/config/config.go
@@ -377,6 +377,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
@@ -355,6 +355,11 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
return nil, err
}
}
+ if sec, err := file.GetSection("templates"); err == nil {
+ if key, err := sec.GetKey("template-dirs"); err == nil {
+ sec.NewKey("template-dirs", strings.ReplaceAll(key.String(), "@SHAREDIR@", sharedir))
+ }
+ }
file.NameMapper = mapName
config := &AercConfig{
Bindings: BindingConfig{
@@ -423,6 +428,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
if err = config.LoadConfig(file); err != nil {
return nil, err
}

View file

@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
homepage = https://github.com/ingydotnet/git-subrepo;
description = "Git submodule alternative";
license = licenses.mit;
platforms = platforms.linux;
platforms = platforms.unix ++ platforms.darwin;
maintainers = [ maintainers.ryantrinkle ];
};
}

View file

@ -1,9 +1,9 @@
{
"version": "12.4.2",
"repo_hash": "00y8n0y7wydwxq62fyf7hcpx90zz5sw458m2773lz7pdgnpnrdc2",
"version": "12.4.3",
"repo_hash": "1qsd3qxvvb3rbyrlyrqvrday4c9s2krgics99ch7v74hprj3xfq9",
"owner": "gitlab-org",
"repo": "gitlab",
"rev": "v12.4.2-ee",
"rev": "v12.4.3-ee",
"passthru": {
"GITALY_SERVER_VERSION": "1.67.0",
"GITLAB_PAGES_VERSION": "1.11.0",

View file

@ -162,6 +162,15 @@
sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30";
};
}
{
goPackagePath = "github.com/golang/lint";
fetch = {
type = "git";
url = "https://github.com/golang/lint";
rev = "06c8688daad7";
sha256 = "0xi94dwvz50a66bq1hp9fyqkym5mcpdxdb1hrfvicldgjf37lc47";
};
}
{
goPackagePath = "github.com/golang/mock";
fetch = {
@ -252,6 +261,15 @@
sha256 = "1zcq480ig7wbg4378qcfxznp2gzqmk7x6rbxizflvg9v2f376vrw";
};
}
{
goPackagePath = "github.com/kisielk/gotool";
fetch = {
type = "git";
url = "https://github.com/kisielk/gotool";
rev = "v1.0.0";
sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn";
};
}
{
goPackagePath = "github.com/konsorten/go-windows-terminal-sequences";
fetch = {

View file

@ -5,10 +5,10 @@
mkDerivation rec {
pname = "clipgrab";
version = "3.8.5";
version = "3.8.6";
src = fetchurl {
sha256 = "0jfjnzwvz4ynlld0ih7f7d575s5w2dag0hvb02c6qan7xm5jdhv9";
sha256 = "1w2j1wk9sf22nnschlraxdbxabqblrxyb8kq0lkyk7dkfa5d0hdq";
# The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz!
url = "https://download.clipgrab.org/${pname}-${version}.tar.gz";
};

View file

@ -184,6 +184,7 @@ stdenv.mkDerivation {
else if targetPlatform.isMsp430 then "msp430"
else if targetPlatform.isAvr then "avr"
else if targetPlatform.isAlpha then "alpha"
else if targetPlatform.isVc4 then "vc4"
else throw "unknown emulation for platform: ${targetPlatform.config}";
in if targetPlatform.useLLVM or false then ""
else targetPlatform.platform.bfdEmulation or (fmt + sep + arch);

View file

@ -6,7 +6,7 @@ export CLASSPATH
addPkgToClassPath () {
local jar
for jar in $1/share/java/*.jar; do
export CLASSPATH=''${CLASSPATH}''${CLASSPATH:+:}''${jar}
export CLASSPATH=''${CLASSPATH-}''${CLASSPATH:+:}''${jar}
done
}

View file

@ -2,16 +2,16 @@
stdenv.mkDerivation rec {
pname = "adapta-kde-theme";
version = "20180512";
version = "20180828";
src = fetchFromGitHub {
owner = "PapirusDevelopmentTeam";
repo = "adapta-kde";
rev = version;
sha256 = "1lgpkylhzbayk892inql16sjyy9d3v126f9i1v7qgha1203rwcji";
sha256 = "1q85678sff8is2kwvgd703ckcns42gdga2c1rqlp61gb6bqf09j8";
};
makeFlags = ["PREFIX=$(out)" ];
makeFlags = [ "PREFIX=$(out)" ];
# Make this a fixed-output derivation
outputHashMode = "recursive";

View file

@ -1,17 +1,17 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "arc-kde-theme";
version = "2017-11-09";
version = "20180614";
src = fetchFromGitHub {
owner = "PapirusDevelopmentTeam";
repo = "arc-kde";
rev = "a0abe6fc5ebf74f9ae88b8a2035957cc16f706f5";
sha256 = "1p6f4ny97096nb054lrgyjwikmvg0qlbcnsjag7m5dfbclfnvzkg";
rev = version;
sha256 = "0wli16k9my7m8a9561545vjwfifmxm4w606z1h0j08msvlky40xw";
};
makeFlags = ["PREFIX=$(out)" ];
makeFlags = [ "PREFIX=$(out)" ];
# Make this a fixed-output derivation
outputHashMode = "recursive";

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl }:
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
version = "7.0.1";
pname = "clearlooks-phenix";
src = fetchurl {
src = fetchzip {
url = "https://github.com/jpfleury/clearlooks-phenix/archive/${version}.tar.gz";
sha256 = "1x2psfbhxc3bk3q795bafxv6p890yfsankfw64p44q4r1x0236ra";
sha256 = "1b6y4l3rf3c5r4v72fyj3ppvnvw13kvr2a1dyl63ni1jxnlk50kd";
};
dontBuild = true;

View file

@ -1,18 +1,17 @@
{ stdenv, fetchFromGitHub, mkDerivation
{ lib, fetchFromGitHub, mkDerivation
, cmake, extra-cmake-modules
, qtbase, kcoreaddons, kdecoration }:
, qtbase, kcoreaddons, kdecoration
}:
let
version = "2017-03-15";
in mkDerivation rec {
mkDerivation rec {
pname = "kde2-decoration";
inherit version;
version = "1.0";
src = fetchFromGitHub {
owner = "repos-holder";
repo = "kdecoration2-kde2";
rev = "2a9cf18ac0646b3532d4db2dd28bd73c4c229783";
sha256 = "0kilw6sd3blvm6gx9w4w5ivkjfxlv6wnyivw46pwwvhgxqymkbxk";
rev = version;
sha256 = "1766z9wscybcqvr828xih93b3rab3hb0ghsf818iflhp1xy0js08";
};
enableParallelBuilding = true;
@ -21,9 +20,9 @@ in mkDerivation rec {
buildInputs = [ qtbase kcoreaddons kdecoration ];
meta = with stdenv.lib; {
meta = with lib; {
description = "KDE 2 window decoration ported to Plasma 5";
homepage = src.meta.homepage;
homepage = "https://github.com/repos-holder/kdecoration2-kde2";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ gnidorah ];

View file

@ -11,7 +11,7 @@ in mkDerivation {
pname = "qtcurve";
inherit version;
src = fetchurl {
url = "http://download.kde.org/stable/qtcurve/qtcurve-${version}.tar.xz";
url = "https://download.kde.org/stable/qtcurve/qtcurve-${version}.tar.xz";
sha256 = "169gdny1cdld0qnx3nqvx568zjzdba4pwp3gxapc1hdh2cymw7r8";
};

View file

@ -17,13 +17,13 @@
python3.pkgs.buildPythonApplication rec {
name = "accerciser-${version}";
version = "3.34.1";
version = "3.34.2";
format = "other";
src = fetchurl {
url = "mirror://gnome/sources/accerciser/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1awf7fcm52r23s51gllyybhywf2kljqkaw4znblajph9sawnfs3l";
sha256 = "1n6sy95j0r0v01sc9rbbpzikq2z4z42j8ah73hzmjdmck4iniik4";
};
nativeBuildInputs = [

View file

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "file-roller";
version = "3.32.2";
version = "3.32.3";
src = fetchurl {
url = "mirror://gnome/sources/file-roller/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0w8s6hakgsvb2nqwbv0lr8ki4cbf1pz5z3qwkb0b2k7ppbh7j2n6";
sha256 = "0ap2hxvjljh4p6wsd9ikh2my3vsxp9r2nvjxxj3v87nwfyw1y4dy";
};
LANG = "en_US.UTF-8"; # postinstall.py

View file

@ -34,11 +34,11 @@
stdenv.mkDerivation rec {
pname = "epiphany";
version = "3.34.1";
version = "3.34.2";
src = fetchurl {
url = "mirror://gnome/sources/epiphany/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1nf1pqv3pdgrlq7fbic06rl3731dx5ihpfsphpai9grcmnbwjyx0";
sha256 = "18d48vcp2nxs63bddkdplslgbnlfq79pm2ivl8hk38kkggy3dahf";
};
# Tests need an X display

View file

@ -20,57 +20,57 @@ addEnvVars() {
local filename
for filename in $1/share/GNUstep/Makefiles/Additional/*.make ; do
if case "$NIX_GNUSTEP_MAKEFILES_ADDITIONAL" in *"{$filename}"*) false;; *) true;; esac; then
if case "${NIX_GNUSTEP_MAKEFILES_ADDITIONAL-}" in *"{$filename}"*) false;; *) true;; esac; then
export NIX_GNUSTEP_MAKEFILES_ADDITIONAL+=" $filename"
fi
done
local tmp="$1/lib/GNUstep/Applications"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_APPS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_APPS "$tmp"
fi
tmp="$1/lib/GNUstep/Applications"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_ADMIN_APPS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_ADMIN_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_APPS "$tmp"
fi
tmp="$1/lib/GNUstep/WebApplications"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_WEB_APPS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_WEB_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_WEB_APPS "$tmp"
fi
tmp="$1/bin"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_TOOLS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_TOOLS-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_TOOLS "$tmp"
fi
tmp="$1/sbin"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS "$tmp"
fi
tmp="$1/lib/GNUstep"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_LIBRARY" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_LIBRARY-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARY "$tmp"
fi
tmp="$1/include"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_HEADERS" in *"${tmp}"*) false;; *) true;; esac; then
if [ -z "$NIX_GNUSTEP_SYSTEM_HEADERS" ]; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_HEADERS-}" in *"${tmp}"*) false;; *) true;; esac; then
if [ -z "${NIX_GNUSTEP_SYSTEM_HEADERS-}" ]; then
export NIX_GNUSTEP_SYSTEM_HEADERS="$tmp"
else
export NIX_GNUSTEP_SYSTEM_HEADERS+=" $tmp"
fi
fi
tmp="$1/lib"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_LIBRARIES" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_LIBRARIES-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARIES "$tmp"
fi
tmp="$1/share/GNUstep/Documentation"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC "$tmp"
fi
tmp="$1/share/man"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC_MAN" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC_MAN-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_MAN "$tmp"
fi
tmp="$1/share/info"
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC_INFO" in *"${tmp}"*) false;; *) true;; esac; then
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC_INFO-}" in *"${tmp}"*) false;; *) true;; esac; then
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$tmp"
fi
}

View file

@ -43,11 +43,11 @@ let
propagate = out:
let setupHook = { writeScript }:
writeScript "setup-hook" ''
if [ "''${hookName:-}" != postHook ]; then
if [[ "''${hookName-}" != postHook ]]; then
postHooks+=("source @dev@/nix-support/setup-hook")
else
# Propagate $${out} output
propagatedUserEnvPkgs="$propagatedUserEnvPkgs @${out}@"
propagatedUserEnvPkgs+=" @${out}@"
if [ -z "$outputDev" ]; then
echo "error: \$outputDev is unset!" >&2
@ -57,7 +57,7 @@ let
# Propagate $dev so that this setup hook is propagated
# But only if there is a separate $dev output
if [ "$outputDev" != out ]; then
propagatedBuildInputs="$propagatedBuildInputs @dev@"
propagatedBuildInputs+=" @dev@"
fi
fi
'';

View file

@ -1,4 +1,4 @@
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
{ stdenv, targetPackages, fetchurl, fetchpatch, fetchFromGitHub, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? stdenv.targetPlatform.isDarwin
, langObjCpp ? stdenv.targetPlatform.isDarwin
@ -9,6 +9,7 @@
, enableShared ? true
, enableLTO ? true
, texinfo ? null
, flex
, perl ? null # optional, for texi2pod (then pod2man); required for Java
, gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO)
@ -108,7 +109,12 @@ stdenv.mkDerivation ({
builder = ../builder.sh;
src = fetchurl {
src = if stdenv.targetPlatform.isVc4 then fetchFromGitHub {
owner = "itszor";
repo = "gcc-vc4";
rev = "e90ff43f9671c760cf0d1dd62f569a0fb9bf8918";
sha256 = "0gxf66hwqk26h8f853sybphqa5ca0cva2kmrw5jsiv6139g0qnp8";
} else fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
};
@ -173,7 +179,8 @@ stdenv.mkDerivation ({
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
++ (optional javaAwtGtk pkgconfig)
++ (optional (stdenv.targetPlatform.isVc4) flex);
# For building runtime libs
depsBuildTarget =

View file

@ -16,7 +16,7 @@
}:
runCommand "configured-ghcjs-src" {
buildInputs = [
nativeBuildInputs = [
perl
autoconf
automake

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, ncurses }:
stdenv.mkDerivation rec {
version = "0.14.0-RC1";
version = "0.20.0-RC1";
pname = "dotty-bare";
src = fetchurl {
url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz";
sha256 = "0nrgsyhqjlpvnjqgb18pryr8q7knq3dq25jhp98s4wh76nssm1zr";
sha256 = "08qs3m32cbh6516gcwraa1b5k935awmjxls6kg6xll722hkdd9l6";
};
propagatedBuildInputs = [ jre ncurses.dev ] ;
@ -35,6 +35,6 @@ stdenv.mkDerivation rec {
homepage = http://dotty.epfl.ch/;
license = licenses.bsd3;
platforms = platforms.all;
maintainers = [maintainers.karolchmist];
maintainers = [maintainers.karolchmist maintainers.virusdave];
};
}

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "clojure";
version = "1.10.1.469";
version = "1.10.1.489";
src = fetchurl {
url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz";
sha256 = "0hpb6rixmgllss69vl9zlpb41svm4mx4xmfbq1q7y12jsxckzgpq";
sha256 = "12ks7adh5cx99l5vydppkqknk5nvv9vsj2k0afcwwxd897m794kz";
};
buildInputs = [ makeWrapper ];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "armadillo";
version = "9.800.1";
version = "9.800.2";
src = fetchurl {
url = "mirror://sourceforge/arma/armadillo-${version}.tar.xz";
sha256 = "1vnshgkz4d992kk2fwqigqfx7gx3145ryb8d2794hn2667h5gkzb";
sha256 = "0mslyfzwb8zdhchhj7szj25qi2ain7cnlsrzccrfm2mr4a6jv5h9";
};
nativeBuildInputs = [ cmake ];

View file

@ -0,0 +1,43 @@
{ stdenv
, fetchFromGitHub
, fetchpatch
, cmake
}:
stdenv.mkDerivation rec {
pname = "bcg729";
version = "1.0.4";
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = pname;
rev = version;
sha256 = "05s0c5ps3a763y0v34wg5zghj0cdjnq4ch7g81848xxry7q90fwa";
};
patches = [
(fetchpatch {
url = "https://github.com/BelledonneCommunications/bcg729/commit/a5907daf1b111e4ad7aab4f558f57e2af1e37e55.patch";
sha256 = "0445syfwj4w4chh8ak80rq77iqcr27924n1ld5snshk3d21nxd64";
})
(fetchpatch {
url = "https://github.com/BelledonneCommunications/bcg729/commit/697bf6653a8c7421f0e821ee8d42471246e6850f.patch";
sha256 = "1h3gf5sj2sg5cs5iv1lcav3lkqmd5jf4agvjzz83l89wd5f5hp5l";
})
(fetchpatch {
url = "https://github.com/BelledonneCommunications/bcg729/commit/d63ce04a93711820d9a6985b1d11d8d91ed8e6b6.patch";
sha256 = "1piwf63ci2gma6jd6b4adkvxirysvazf0vklb5pc6vx1g93nkgxs";
})
];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "Opensource implementation of both encoder and decoder of the ITU G729 Annex A/B speech codec";
homepage = "https://linphone.org/technical-corner/bcg729";
changelog = "https://gitlab.linphone.org/BC/public/bcg729/raw/${version}/NEWS";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ c0bw3b ];
platforms = platforms.all;
};
}

View file

@ -1,19 +1,23 @@
{stdenv, fetchFromGitHub, cmake, mbedtls, bcunit, srtp}:
{ stdenv, fetchFromGitHub, cmake, bcunit, mbedtls }:
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
baseName = "bctoolbox";
pname = "bctoolbox";
version = "0.6.0";
buildInputs = [cmake mbedtls bcunit srtp];
nativeBuildInputs = [ cmake bcunit ];
buildInputs = [ mbedtls ];
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = baseName;
repo = pname;
rev = version;
sha256 = "1cxx243wyzkd4xnvpyqf97n0rjhfckpvw1vhwnbwshq3q6fra909";
};
meta = {
inherit version;
description = ''Utilities library for Linphone'';
description = "Utilities library for Linphone";
homepage = "https://github.com/BelledonneCommunications/bctoolbox";
license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;

View file

@ -1,15 +1,14 @@
{ stdenv, antlr3_4, libantlr3c, jre, polarssl, fetchFromGitHub
{ stdenv, antlr3_4, libantlr3c, jre, mbedtls, fetchFromGitHub
, cmake, zlib, bctoolbox
}:
stdenv.mkDerivation rec {
baseName = "belle-sip";
pname = "belle-sip";
version = "1.6.3";
name = "${baseName}-${version}";
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = baseName;
repo = pname;
rev = version;
sha256 = "0q70db1klvhca1af29bm9paka3gyii5hfbzrj4178gclsg7cj8fk";
};
@ -24,18 +23,14 @@ stdenv.mkDerivation rec {
"-Wno-error=cast-function-type"
];
propagatedBuildInputs = [ antlr3_4 libantlr3c polarssl bctoolbox ];
configureFlags = [
"--with-polarssl=${polarssl}"
];
propagatedBuildInputs = [ antlr3_4 libantlr3c mbedtls bctoolbox ];
# Fails to build with lots of parallel jobs
enableParallelBuilding = false;
meta = with stdenv.lib; {
homepage = http://www.linphone.org/index.php/eng;
description = "A Voice-over-IP phone";
homepage = https://linphone.org/technical-corner/belle-sip;
description = "Modern library implementing SIP (RFC 3261) transport, transaction and dialog layers";
license = licenses.gpl2;
platforms = platforms.all;
};

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "catch2";
version = "2.10.2";
version = "2.11.0";
src = fetchFromGitHub {
owner = "catchorg";
repo = "Catch2";
rev = "v${version}";
sha256="01ldfv4337s3vdhsx415d49jchpvqy61c77dhnri30ip5af0ipjs";
sha256="1b07drrclvxj17s67ivypr9vr27rg0m36jqnrbci6f4wsp1b0gbl";
};
nativeBuildInputs = [ cmake ];

View file

@ -48,7 +48,7 @@ let
# Propagate $dev so that this setup hook is propagated
# But only if there is a separate $dev output
if [ "''${outputDev:?}" != out ]; then
propagatedBuildInputs="$propagatedBuildInputs @dev@"
propagatedBuildInputs="''${propagatedBuildInputs-} @dev@"
fi
fi
'';

View file

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "libmodule";
version = "4.2.0";
version = "5.0.0";
src = fetchFromGitHub {
owner = "FedeDP";
repo = "libmodule";
rev = version;
sha256 = "1qn54pysdm0q7v1gnisd43i5i4ylf8s8an77jk6jd8qimysv08mx";
sha256 = "1cf81sl33xmfn5g150iqcdrjn0lpjlgp53mganwi6x7jda2qk7r6";
};
nativeBuildInputs = [

View file

@ -1,17 +1,16 @@
{ stdenv, pkgconfig, intltool, alsaLib, libpulseaudio, speex, gsm
, libopus, ffmpeg, libX11, libXv, libGLU, libGL, glew, libtheora, libvpx, SDL, libupnp
, ortp, libv4l, libpcap, srtp, fetchFromGitHub, cmake, bctoolbox, doxygen
, python, libXext, libmatroska, openssl, fetchpatch
, python, libXext, libmatroska, fetchpatch
}:
stdenv.mkDerivation rec {
baseName = "mediastreamer2";
pname = "mediastreamer2";
version = "2.16.1";
name = "${baseName}-${version}";
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = baseName;
repo = pname;
rev = version;
sha256 = "02745bzl2r1jqvdqzyv94fjd4w92zr976la4c4nfvsy52waqah7j";
};
@ -31,19 +30,18 @@ stdenv.mkDerivation rec {
alsaLib libpulseaudio speex gsm libopus
ffmpeg libX11 libXv libGLU libGL glew libtheora libvpx SDL libupnp
ortp libv4l libpcap srtp bctoolbox libXext libmatroska
openssl
];
NIX_CFLAGS_COMPILE = [
"-DGIT_VERSION=\"v2.14.0\""
"-DGIT_VERSION=\"v${version}\""
"-Wno-error=deprecated-declarations"
"-Wno-error=cast-function-type"
];
NIX_LDFLAGS = "-lXext -lssl";
NIX_LDFLAGS = "-lXext";
meta = with stdenv.lib; {
description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications";
homepage = http://www.linphone.org/technical-corner/mediastreamer2/overview;
homepage = http://www.linphone.org/technical-corner/mediastreamer2;
license = licenses.gpl2;
platforms = platforms.linux;
};

View file

@ -1,23 +1,30 @@
{ stdenv, autoreconfHook, pkgconfig, mediastreamer, openh264
, fetchgit, cmake
, fetchurl, fetchpatch, cmake
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "mediastreamer-openh264";
version = "0.0pre20160801";
version = "1.2.1";
src = fetchgit {
url = "git://git.linphone.org/msopenh264.git";
rev = "4cb4b134bf0f1538fd0c2c928eee2d5388115abc";
sha256 = "001km4xy1ifwbg1c19ncc75h867fzfcxy9pxvl4pxqb64169xc1k";
src = fetchurl {
url = "https://www.linphone.org/releases/sources/plugins/msopenh264/msopenh264-${version}.tar.gz";
sha256 = "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8";
};
patches = [
(fetchpatch {
name = "msopenh264-build-with-openh264-v2.patch";
url = "https://git.pld-linux.org/?p=packages/mediastreamer-plugin-msopenh264.git;a=blob_plain;f=mediastreamer-plugin-msopenh264-openh264.patch;hb=344b8af379701a7e58b4ffb3cbac1517eff079fd";
sha256 = "10c24b0afchx78q28176pd8iz7i1nlf57f6v6lyqxpz60fm5nrcc";
})
];
nativeBuildInputs = [ autoreconfHook cmake pkgconfig ];
buildInputs = [ mediastreamer openh264 ];
meta = with stdenv.lib; {
description = "H.264 encoder/decoder plugin for mediastreamer2";
homepage = http://www.linphone.org/technical-corner/mediastreamer2/overview;
homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
license = licenses.gpl2;
platforms = platforms.linux;
};

View file

@ -1,13 +1,12 @@
{ stdenv, cmake, fetchFromGitHub, bctoolbox }:
stdenv.mkDerivation rec {
baseName = "ortp";
pname = "ortp";
version = "1.0.2";
name = "${baseName}-${version}";
src = fetchFromGitHub {
owner = "BelledonneCommunications";
repo = baseName;
repo = pname;
rev = version;
sha256 = "12cwv593bsdnxs0zfcp07vwyk7ghlz2wv7vdbs1ksv293w3vj2rv";
};
@ -17,8 +16,8 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A Real-Time Transport Protocol (RFC3550) stack";
homepage = http://www.linphone.org/index.php/eng/code_review/ortp;
license = licenses.lgpl21;
homepage = https://linphone.org/technical-corner/ortp;
license = licenses.gpl2Plus;
platforms = platforms.all;
};
}

Some files were not shown because too many files have changed in this diff Show more