Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-02-27 00:37:54 +00:00 committed by GitHub
commit e8162c62e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 2643 additions and 2530 deletions

@ -26,13 +26,13 @@ in {
systemd.services.enable-ksm = {
description = "Enable Kernel Same-Page Merging";
wantedBy = [ "multi-user.target" ];
after = [ "systemd-udev-settle.service" ];
script = ''
if [ -e /sys/kernel/mm/ksm ]; then
script =
''
echo 1 > /sys/kernel/mm/ksm/run
${optionalString (cfg.sleep != null) ''echo ${toString cfg.sleep} > /sys/kernel/mm/ksm/sleep_millisecs''}
fi
'';
'' + optionalString (cfg.sleep != null)
''
echo ${toString cfg.sleep} > /sys/kernel/mm/ksm/sleep_millisecs
'';
};
};
}

@ -382,6 +382,7 @@
./services/hardware/sane.nix
./services/hardware/sane_extra_backends/brscan4.nix
./services/hardware/sane_extra_backends/dsseries.nix
./services/hardware/spacenavd.nix
./services/hardware/tcsd.nix
./services/hardware/tlp.nix
./services/hardware/thinkfan.nix

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.hardware.spacenavd;
in {
options = {
hardware.spacenavd = {
enable = mkEnableOption "spacenavd to support 3DConnexion devices";
};
};
config = mkIf cfg.enable {
systemd.user.services.spacenavd = {
description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion";
after = [ "syslog.target" ];
wantedBy = [ "graphical.target" ];
serviceConfig = {
ExecStart = "${pkgs.spacenavd}/bin/spacenavd -d -l syslog";
StandardError = "syslog";
};
};
};
}

@ -436,7 +436,8 @@ let
"IPv4ProxyARP"
"IPv6ProxyNDP"
"IPv6ProxyNDPAddress"
"IPv6PrefixDelegation"
"IPv6SendRA"
"DHCPv6PrefixDelegation"
"IPv6MTUBytes"
"Bridge"
"Bond"
@ -477,7 +478,8 @@ let
(assertMinimum "IPv6HopLimit" 0)
(assertValueOneOf "IPv4ProxyARP" boolValues)
(assertValueOneOf "IPv6ProxyNDP" boolValues)
(assertValueOneOf "IPv6PrefixDelegation" ["static" "dhcpv6" "yes" "false"])
(assertValueOneOf "IPv6SendRA" boolValues)
(assertValueOneOf "DHCPv6PrefixDelegation" boolValues)
(assertByteFormat "IPv6MTUBytes")
(assertValueOneOf "ActiveSlave" boolValues)
(assertValueOneOf "PrimarySlave" boolValues)
@ -643,18 +645,63 @@ let
sectionDHCPv6 = checkUnitConfig "DHCPv6" [
(assertOnlyFields [
"UseAddress"
"UseDNS"
"UseNTP"
"RouteMetric"
"RapidCommit"
"MUDURL"
"RequestOptions"
"SendVendorOption"
"ForceDHCPv6PDOtherInformation"
"PrefixDelegationHint"
"RouteMetric"
"WithoutRA"
"SendOption"
"UserClass"
"VendorClass"
])
(assertValueOneOf "UseAddress" boolValues)
(assertValueOneOf "UseDNS" boolValues)
(assertValueOneOf "UseNTP" boolValues)
(assertInt "RouteMetric")
(assertValueOneOf "RapidCommit" boolValues)
(assertValueOneOf "ForceDHCPv6PDOtherInformation" boolValues)
(assertInt "RouteMetric")
(assertValueOneOf "WithoutRA" ["solicit" "information-request"])
(assertRange "SendOption" 1 65536)
];
sectionDHCPv6PrefixDelegation = checkUnitConfig "DHCPv6PrefixDelegation" [
(assertOnlyFields [
"SubnetId"
"Announce"
"Assign"
"Token"
])
(assertValueOneOf "Announce" boolValues)
(assertValueOneOf "Assign" boolValues)
];
sectionIPv6AcceptRA = checkUnitConfig "IPv6AcceptRA" [
(assertOnlyFields [
"UseDNS"
"UseDomains"
"RouteTable"
"UseAutonomousPrefix"
"UseOnLinkPrefix"
"RouterDenyList"
"RouterAllowList"
"PrefixDenyList"
"PrefixAllowList"
"RouteDenyList"
"RouteAllowList"
"DHCPv6Client"
])
(assertValueOneOf "UseDNS" boolValues)
(assertValueOneOf "UseDomains" (boolValues ++ ["route"]))
(assertRange "RouteTable" 0 4294967295)
(assertValueOneOf "UseAutonomousPrefix" boolValues)
(assertValueOneOf "UseOnLinkPrefix" boolValues)
(assertValueOneOf "DHCPv6Client" (boolValues ++ ["always"]))
];
sectionDHCPServer = checkUnitConfig "DHCPServer" [
@ -685,7 +732,7 @@ let
(assertValueOneOf "EmitTimezone" boolValues)
];
sectionIPv6PrefixDelegation = checkUnitConfig "IPv6PrefixDelegation" [
sectionIPv6SendRA = checkUnitConfig "IPv6SendRA" [
(assertOnlyFields [
"Managed"
"OtherInformation"
@ -1090,6 +1137,30 @@ let
'';
};
dhcpV6PrefixDelegationConfig = mkOption {
default = {};
example = { SubnetId = "auto"; Announce = true; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionDHCPv6PrefixDelegation;
description = ''
Each attribute in this set specifies an option in the
<literal>[DHCPv6PrefixDelegation]</literal> section of the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details.
'';
};
ipv6AcceptRAConfig = mkOption {
default = {};
example = { UseDNS = true; DHCPv6Client = "always"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPv6AcceptRA;
description = ''
Each attribute in this set specifies an option in the
<literal>[IPv6AcceptRA]</literal> section of the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details.
'';
};
dhcpServerConfig = mkOption {
default = {};
example = { PoolOffset = 50; EmitDNS = false; };
@ -1102,13 +1173,20 @@ let
'';
};
# systemd.network.networks.*.ipv6PrefixDelegationConfig has been deprecated
# in 247 in favor of systemd.network.networks.*.ipv6SendRAConfig.
ipv6PrefixDelegationConfig = mkOption {
visible = false;
apply = _: throw "The option `systemd.network.networks.*.ipv6PrefixDelegationConfig` has been replaced by `systemd.network.networks.*.ipv6SendRAConfig`.";
};
ipv6SendRAConfig = mkOption {
default = {};
example = { EmitDNS = true; Managed = true; OtherInformation = true; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPv6PrefixDelegation;
type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPv6SendRA;
description = ''
Each attribute in this set specifies an option in the
<literal>[IPv6PrefixDelegation]</literal> section of the unit. See
<literal>[IPv6SendRA]</literal> section of the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details.
'';
@ -1457,13 +1535,21 @@ let
[DHCPv6]
${attrsToSection def.dhcpV6Config}
''
+ optionalString (def.dhcpV6PrefixDelegationConfig != { }) ''
[DHCPv6PrefixDelegation]
${attrsToSection def.dhcpV6PrefixDelegationConfig}
''
+ optionalString (def.ipv6AcceptRAConfig != { }) ''
[IPv6AcceptRA]
${attrsToSection def.ipv6AcceptRAConfig}
''
+ optionalString (def.dhcpServerConfig != { }) ''
[DHCPServer]
${attrsToSection def.dhcpServerConfig}
''
+ optionalString (def.ipv6PrefixDelegationConfig != { }) ''
[IPv6PrefixDelegation]
${attrsToSection def.ipv6PrefixDelegationConfig}
+ optionalString (def.ipv6SendRAConfig != { }) ''
[IPv6SendRA]
${attrsToSection def.ipv6SendRAConfig}
''
+ flip concatMapStrings def.ipv6Prefixes (x: ''
[IPv6Prefix]
@ -1479,7 +1565,6 @@ let
in
{
options = {
systemd.network.enable = mkOption {

@ -271,8 +271,8 @@ let
DeviceAllow = map (d: "${d.node} ${d.modifier}") cfg.allowedDevices;
};
system = config.nixpkgs.localSystem.system;
kernelVersion = config.boot.kernelPackages.kernel.version;
bindMountOpts = { name, ... }: {
@ -321,7 +321,6 @@ let
};
};
mkBindFlag = d:
let flagPrefix = if d.isReadOnly then " --bind-ro=" else " --bind=";
mountstr = if d.hostPath != null then "${d.hostPath}:${d.mountPoint}" else "${d.mountPoint}";
@ -482,11 +481,16 @@ in
networking.useDHCP = false;
assertions = [
{
assertion = config.privateNetwork -> stringLength name < 12;
assertion =
(builtins.compareVersions kernelVersion "5.8" <= 0)
-> config.privateNetwork
-> stringLength name <= 11;
message = ''
Container name `${name}` is too long: When `privateNetwork` is enabled, container names can
not be longer than 11 characters, because the container's interface name is derived from it.
This might be fixed in the future. See https://github.com/NixOS/nixpkgs/issues/38509
You should either make the container name shorter or upgrade to a more recent kernel that
supports interface altnames (i.e. at least Linux 5.8 - please see https://github.com/NixOS/nixpkgs/issues/38509
for details).
'';
}
];

@ -55,6 +55,7 @@ in
cassandra_3_11 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_3_11; };
ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
ceph-single-node-bluestore = handleTestOn ["x86_64-linux"] ./ceph-single-node-bluestore.nix {};
certmgr = handleTest ./certmgr.nix {};
cfssl = handleTestOn ["x86_64-linux"] ./cfssl.nix {};
charliecloud = handleTest ./charliecloud.nix {};
@ -72,6 +73,7 @@ in
containers-imperative = handleTest ./containers-imperative.nix {};
containers-ip = handleTest ./containers-ip.nix {};
containers-macvlans = handleTest ./containers-macvlans.nix {};
containers-names = handleTest ./containers-names.nix {};
containers-physical_interfaces = handleTest ./containers-physical_interfaces.nix {};
containers-portforward = handleTest ./containers-portforward.nix {};
containers-reloadable = handleTest ./containers-reloadable.nix {};
@ -195,6 +197,7 @@ in
keymap = handleTest ./keymap.nix {};
knot = handleTest ./knot.nix {};
krb5 = discoverTests (import ./krb5 {});
ksm = handleTest ./ksm.nix {};
kubernetes.dns = handleTestOn ["x86_64-linux"] ./kubernetes/dns.nix {};
# kubernetes.e2e should eventually replace kubernetes.rbac when it works
#kubernetes.e2e = handleTestOn ["x86_64-linux"] ./kubernetes/e2e.nix {};

@ -0,0 +1,196 @@
import ./make-test-python.nix ({pkgs, lib, ...}:
let
cfg = {
clusterId = "066ae264-2a5d-4729-8001-6ad265f50b03";
monA = {
name = "a";
ip = "192.168.1.1";
};
osd0 = {
name = "0";
key = "AQBCEJNa3s8nHRAANvdsr93KqzBznuIWm2gOGg==";
uuid = "55ba2294-3e24-478f-bee0-9dca4c231dd9";
};
osd1 = {
name = "1";
key = "AQBEEJNac00kExAAXEgy943BGyOpVH1LLlHafQ==";
uuid = "5e97a838-85b6-43b0-8950-cb56d554d1e5";
};
osd2 = {
name = "2";
key = "AQAdyhZeIaUlARAAGRoidDAmS6Vkp546UFEf5w==";
uuid = "ea999274-13d0-4dd5-9af9-ad25a324f72f";
};
};
generateCephConfig = { daemonConfig }: {
enable = true;
global = {
fsid = cfg.clusterId;
monHost = cfg.monA.ip;
monInitialMembers = cfg.monA.name;
};
} // daemonConfig;
generateHost = { pkgs, cephConfig, networkConfig, ... }: {
virtualisation = {
memorySize = 512;
emptyDiskImages = [ 20480 20480 20480 ];
vlans = [ 1 ];
};
networking = networkConfig;
environment.systemPackages = with pkgs; [
bash
sudo
ceph
xfsprogs
];
boot.kernelModules = [ "xfs" ];
services.ceph = cephConfig;
};
networkMonA = {
dhcpcd.enable = false;
interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
{ address = cfg.monA.ip; prefixLength = 24; }
];
};
cephConfigMonA = generateCephConfig { daemonConfig = {
mon = {
enable = true;
daemons = [ cfg.monA.name ];
};
mgr = {
enable = true;
daemons = [ cfg.monA.name ];
};
osd = {
enable = true;
daemons = [ cfg.osd0.name cfg.osd1.name cfg.osd2.name ];
};
}; };
# Following deployment is based on the manual deployment described here:
# https://docs.ceph.com/docs/master/install/manual-deployment/
# For other ways to deploy a ceph cluster, look at the documentation at
# https://docs.ceph.com/docs/master/
testscript = { ... }: ''
start_all()
monA.wait_for_unit("network.target")
# Bootstrap ceph-mon daemon
monA.succeed(
"sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'",
"sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'",
"sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring",
"monmaptool --create --add ${cfg.monA.name} ${cfg.monA.ip} --fsid ${cfg.clusterId} /tmp/monmap",
"sudo -u ceph ceph-mon --mkfs -i ${cfg.monA.name} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring",
"sudo -u ceph touch /var/lib/ceph/mon/ceph-${cfg.monA.name}/done",
"systemctl start ceph-mon-${cfg.monA.name}",
)
monA.wait_for_unit("ceph-mon-${cfg.monA.name}")
monA.succeed("ceph mon enable-msgr2")
# Can't check ceph status until a mon is up
monA.succeed("ceph -s | grep 'mon: 1 daemons'")
# Start the ceph-mgr daemon, after copying in the keyring
monA.succeed(
"sudo -u ceph mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}/",
"ceph auth get-or-create mgr.${cfg.monA.name} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-${cfg.monA.name}/keyring",
"systemctl start ceph-mgr-${cfg.monA.name}",
)
monA.wait_for_unit("ceph-mgr-a")
monA.wait_until_succeeds("ceph -s | grep 'quorum ${cfg.monA.name}'")
monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
# Bootstrap OSDs
monA.succeed(
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
"echo bluestore > /var/lib/ceph/osd/ceph-${cfg.osd0.name}/type",
"ln -sf /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}/block",
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
"echo bluestore > /var/lib/ceph/osd/ceph-${cfg.osd1.name}/type",
"ln -sf /dev/vdc /var/lib/ceph/osd/ceph-${cfg.osd1.name}/block",
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd2.name}",
"echo bluestore > /var/lib/ceph/osd/ceph-${cfg.osd2.name}/type",
"ln -sf /dev/vdd /var/lib/ceph/osd/ceph-${cfg.osd2.name}/block",
"ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd0.name}/keyring --name osd.${cfg.osd0.name} --add-key ${cfg.osd0.key}",
"ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd1.name}/keyring --name osd.${cfg.osd1.name} --add-key ${cfg.osd1.key}",
"ceph-authtool --create-keyring /var/lib/ceph/osd/ceph-${cfg.osd2.name}/keyring --name osd.${cfg.osd2.name} --add-key ${cfg.osd2.key}",
'echo \'{"cephx_secret": "${cfg.osd0.key}"}\' | ceph osd new ${cfg.osd0.uuid} -i -',
'echo \'{"cephx_secret": "${cfg.osd1.key}"}\' | ceph osd new ${cfg.osd1.uuid} -i -',
'echo \'{"cephx_secret": "${cfg.osd2.key}"}\' | ceph osd new ${cfg.osd2.uuid} -i -',
)
# Initialize the OSDs with regular filestore
monA.succeed(
"ceph-osd -i ${cfg.osd0.name} --mkfs --osd-uuid ${cfg.osd0.uuid}",
"ceph-osd -i ${cfg.osd1.name} --mkfs --osd-uuid ${cfg.osd1.uuid}",
"ceph-osd -i ${cfg.osd2.name} --mkfs --osd-uuid ${cfg.osd2.uuid}",
"chown -R ceph:ceph /var/lib/ceph/osd",
"systemctl start ceph-osd-${cfg.osd0.name}",
"systemctl start ceph-osd-${cfg.osd1.name}",
"systemctl start ceph-osd-${cfg.osd2.name}",
)
monA.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'")
monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
monA.succeed(
"ceph osd pool create single-node-test 32 32",
"ceph osd pool ls | grep 'single-node-test'",
"ceph osd pool rename single-node-test single-node-other-test",
"ceph osd pool ls | grep 'single-node-other-test'",
)
monA.wait_until_succeeds("ceph -s | grep '2 pools, 33 pgs'")
monA.succeed(
"ceph osd getcrushmap -o crush",
"crushtool -d crush -o decrushed",
"sed 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' decrushed > modcrush",
"crushtool -c modcrush -o recrushed",
"ceph osd setcrushmap -i recrushed",
"ceph osd pool set single-node-other-test size 2",
)
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
monA.wait_until_succeeds("ceph -s | grep '33 active+clean'")
monA.fail(
"ceph osd pool ls | grep 'multi-node-test'",
"ceph osd pool delete single-node-other-test single-node-other-test --yes-i-really-really-mean-it",
)
# Shut down ceph by stopping ceph.target.
monA.succeed("systemctl stop ceph.target")
# Start it up
monA.succeed("systemctl start ceph.target")
monA.wait_for_unit("ceph-mon-${cfg.monA.name}")
monA.wait_for_unit("ceph-mgr-${cfg.monA.name}")
monA.wait_for_unit("ceph-osd-${cfg.osd0.name}")
monA.wait_for_unit("ceph-osd-${cfg.osd1.name}")
monA.wait_for_unit("ceph-osd-${cfg.osd2.name}")
# Ensure the cluster comes back up again
monA.succeed("ceph -s | grep 'mon: 1 daemons'")
monA.wait_until_succeeds("ceph -s | grep 'quorum ${cfg.monA.name}'")
monA.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'")
monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
'';
in {
name = "basic-single-node-ceph-cluster-bluestore";
meta = with pkgs.lib.maintainers; {
maintainers = [ lukegb ];
};
nodes = {
monA = generateHost { pkgs = pkgs; cephConfig = cephConfigMonA; networkConfig = networkMonA; };
};
testScript = testscript;
})

@ -1,5 +1,3 @@
# Test for NixOS' container support.
let
hostIp = "192.168.0.1";
containerIp = "192.168.0.100/24";
@ -7,10 +5,10 @@ let
containerIp6 = "fc00::2/7";
in
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-bridge";
meta = with pkgs.lib.maintainers; {
maintainers = [ aristid aszlig eelco kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
};
machine =

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, lib, ...} : let
import ./make-test-python.nix ({ pkgs, lib, ... }: let
customPkgs = pkgs.appendOverlays [ (self: super: {
hello = super.hello.overrideAttrs (old: {
@ -8,8 +8,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : let
in {
name = "containers-custom-pkgs";
meta = with lib.maintainers; {
maintainers = [ adisbladis earvstedt ];
meta = {
maintainers = with lib.maintainers; [ adisbladis earvstedt ];
};
machine = { config, ... }: {

@ -1,7 +1,8 @@
# Test for NixOS' container support.
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-ephemeral";
meta = {
maintainers = with lib.maintainers; [ patryk27 ];
};
machine = { pkgs, ... }: {
virtualisation.memorySize = 768;

@ -1,9 +1,7 @@
# Test for NixOS' container support.
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-extra_veth";
meta = with pkgs.lib.maintainers; {
maintainers = [ kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ];
};
machine =

@ -1,9 +1,7 @@
# Test for NixOS' container support.
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-hosts";
meta = with pkgs.lib.maintainers; {
maintainers = [ montag451 ];
meta = {
maintainers = with lib.maintainers; [ montag451 ];
};
machine =

@ -1,9 +1,7 @@
# Test for NixOS' container support.
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-imperative";
meta = with pkgs.lib.maintainers; {
maintainers = [ aristid aszlig eelco kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
};
machine =

@ -1,5 +1,3 @@
# Test for NixOS' container support.
let
webserverFor = hostAddress: localAddress: {
inherit hostAddress localAddress;
@ -13,10 +11,10 @@ let
};
};
in import ./make-test-python.nix ({ pkgs, ...} : {
in import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-ipv4-ipv6";
meta = with pkgs.lib.maintainers; {
maintainers = [ aristid aszlig eelco kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
};
machine =

@ -1,15 +1,13 @@
# Test for NixOS' container support.
let
# containers IP on VLAN 1
containerIp1 = "192.168.1.253";
containerIp2 = "192.168.1.254";
in
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-macvlans";
meta = with pkgs.lib.maintainers; {
maintainers = [ montag451 ];
meta = {
maintainers = with lib.maintainers; [ montag451 ];
};
nodes = {

@ -0,0 +1,37 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-names";
meta = {
maintainers = with lib.maintainers; [ patryk27 ];
};
machine = { ... }: {
# We're using the newest kernel, so that we can test containers with long names.
# Please see https://github.com/NixOS/nixpkgs/issues/38509 for details.
boot.kernelPackages = pkgs.linuxPackages_latest;
containers = let
container = subnet: {
autoStart = true;
privateNetwork = true;
hostAddress = "192.168.${subnet}.1";
localAddress = "192.168.${subnet}.2";
config = { };
};
in {
first = container "1";
second = container "2";
really-long-name = container "3";
really-long-long-name-2 = container "4";
};
};
testScript = ''
machine.wait_for_unit("default.target")
machine.succeed("ip link show | grep ve-first")
machine.succeed("ip link show | grep ve-second")
machine.succeed("ip link show | grep ve-really-lFYWO")
machine.succeed("ip link show | grep ve-really-l3QgY")
'';
})

@ -1,8 +1,7 @@
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-physical_interfaces";
meta = with pkgs.lib.maintainers; {
maintainers = [ kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ];
};
nodes = {

@ -1,5 +1,3 @@
# Test for NixOS' container support.
let
hostIp = "192.168.0.1";
hostPort = 10080;
@ -7,10 +5,10 @@ let
containerPort = 80;
in
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-portforward";
meta = with pkgs.lib.maintainers; {
maintainers = [ aristid aszlig eelco kampfschlaefer ianwookim ];
meta = {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ianwookim ];
};
machine =

@ -1,7 +1,6 @@
import ./make-test-python.nix ({ pkgs, lib, ...} :
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
client_base = {
containers.test1 = {
autoStart = true;
config = {
@ -16,8 +15,8 @@ let
};
in {
name = "containers-reloadable";
meta = with pkgs.lib.maintainers; {
maintainers = [ danbst ];
meta = {
maintainers = with lib.maintainers; [ danbst ];
};
nodes = {

@ -1,5 +1,3 @@
# Test for NixOS' container support.
let
client_base = {
networking.firewall.enable = false;
@ -16,11 +14,11 @@ let
};
};
};
in import ./make-test-python.nix ({ pkgs, ...} :
in import ./make-test-python.nix ({ pkgs, lib, ... }:
{
name = "containers-restart_networking";
meta = with pkgs.lib.maintainers; {
maintainers = [ kampfschlaefer ];
meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ];
};
nodes = {

@ -1,9 +1,7 @@
# Test for NixOS' container support.
import ./make-test-python.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "containers-tmpfs";
meta = with pkgs.lib.maintainers; {
maintainers = [ ];
meta = {
maintainers = with lib.maintainers; [ patryk27 ];
};
machine =

22
nixos/tests/ksm.nix Normal file

@ -0,0 +1,22 @@
import ./make-test-python.nix ({ lib, ...} :
{
name = "ksm";
meta = with lib.maintainers; {
maintainers = [ rnhmjoj ];
};
machine = { ... }: {
imports = [ ../modules/profiles/minimal.nix ];
hardware.ksm.enable = true;
hardware.ksm.sleep = 300;
};
testScript =
''
machine.start()
machine.wait_until_succeeds("test $(</sys/kernel/mm/ksm/run) -eq 1")
machine.wait_until_succeeds("test $(</sys/kernel/mm/ksm/sleep_millisecs) -eq 300")
'';
})

@ -165,7 +165,7 @@ import ./make-test-python.nix ({pkgs, ...}: {
# accept the delegated prefix.
PrefixDelegationHint = "::/48";
};
ipv6PrefixDelegationConfig = {
ipv6SendRAConfig = {
# Let networkd know that we would very much like to use DHCPv6
# to obtain the "managed" information. Not sure why they can't
# just take that from the upstream RAs.
@ -179,24 +179,20 @@ import ./make-test-python.nix ({pkgs, ...}: {
name = "eth2";
networkConfig = {
Description = "Client interface";
# the client shouldn't be allowed to send us RAs, that would be weird.
# The client shouldn't be allowed to send us RAs, that would be weird.
IPv6AcceptRA = false;
# Just delegate prefixes from the DHCPv6 PD pool.
# If you also want to distribute a local ULA prefix you want to
# set this to `yes` as that includes both static prefixes as well
# as PD prefixes.
IPv6PrefixDelegation = "dhcpv6";
# Delegate prefixes from the DHCPv6 PD pool.
DHCPv6PrefixDelegation = true;
IPv6SendRA = true;
};
# finally "act as router" (according to systemd.network(5))
ipv6PrefixDelegationConfig = {
RouterLifetimeSec = 300; # required as otherwise no RA's are being emitted
# In a production environment you should consider setting these as well:
# In a production environment you should consider setting these as well:
# ipv6SendRAConfig = {
#EmitDNS = true;
#EmitDomains = true;
#DNS= = "fe80::1"; # or whatever "well known" IP your router will have on the inside.
};
# };
# This adds a "random" ULA prefix to the interface that is being
# advertised to the clients.

@ -3,18 +3,19 @@
let
versions = {
atom = {
version = "1.48.0";
sha256 = "1693bxbylf6jhld9bdcr5pigk36wqlbj89praldpz9s96yxig9s1";
version = "1.54.0";
sha256 = "sha256-21AURgomEjuiTzeJ4MIx0mkyVi0b0mVdmFsFGNLXRP4";
};
atom-beta = {
version = "1.49.0";
version = "1.55.0";
beta = 0;
sha256 = "1fr6m4a7shdj3wpn6g4n95cqpkkg2x9srwjf7bqxv9f3d5jb1y33";
sha256 = "sha256-PICkTt54cPkDJVnXBTtSHUQVbmosOpZfVAiD5A3/n+Q=";
broken = true;
};
};
common = pname: {version, sha256, beta ? null}:
common = pname: {version, sha256, beta ? null, broken ? false}:
let fullVersion = version + lib.optionalString (beta != null) "-beta${toString beta}";
name = "${pname}-${fullVersion}";
in stdenv.mkDerivation {
@ -88,6 +89,7 @@ let
license = licenses.mit;
maintainers = with maintainers; [ offline ysndr ];
platforms = platforms.x86_64;
inherit broken;
};
};
in lib.mapAttrs common versions

@ -132,9 +132,24 @@ let
flycheck-rtags = fix-rtags super.flycheck-rtags;
pdf-tools = super.pdf-tools.overrideAttrs (old: {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = with pkgs; old.buildInputs ++ [ autoconf automake libpng zlib poppler ];
preBuild = "make server/epdfinfo";
nativeBuildInputs = [
pkgs.autoconf
pkgs.automake
pkgs.pkg-config
pkgs.removeReferencesTo
];
buildInputs = old.buildInputs ++ [ pkgs.libpng pkgs.zlib pkgs.poppler ];
preBuild = ''
make server/epdfinfo
remove-references-to \
-t ${pkgs.stdenv.cc.libc.dev} \
-t ${pkgs.glib.dev} \
-t ${pkgs.libpng.dev} \
-t ${pkgs.poppler.dev} \
-t ${pkgs.zlib.dev} \
-t ${pkgs.cairo.dev} \
server/epdfinfo
'';
recipe = pkgs.writeText "recipe" ''
(pdf-tools
:repo "politza/pdf-tools" :fetcher github

@ -1,9 +1,8 @@
{ lib, mkDerivation, fetchFromGitHub, fetchpatch, cmake, ninja, coin3d,
xercesc, ode, eigen, qtbase, qttools, qtwebengine, qtxmlpatterns, wrapQtAppsHook,
opencascade-occt, gts, hdf5, vtk, medfile, zlib, python3Packages, swig,
gfortran, libXmu, soqt, libf2c, libGLU, makeWrapper, pkg-config, mpi ? null }:
assert mpi != null;
gfortran, libXmu, soqt, libf2c, libGLU, makeWrapper, pkg-config, mpi,
spaceNavSupport ? true, libspnav, qtx11extras }:
let
pythonPackages = python3Packages;
@ -34,7 +33,7 @@ in mkDerivation rec {
matplotlib pycollada shiboken2 pyside2 pyside2-tools pivy python boost
GitPython # for addon manager
scipy pyyaml # (at least for) PyrateWorkbench
]);
]) ++ lib.optionals spaceNavSupport [ libspnav qtx11extras ];
cmakeFlags = [
"-DBUILD_QT5=ON"

@ -7,6 +7,7 @@
, jackaudioSupport ? false, libjack2
, cudaSupport ? config.cudaSupport or false, cudatoolkit
, colladaSupport ? true, opencollada
, spaceNavSupport ? false, libspnav
, makeWrapper
, pugixml, llvmPackages, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
, embree, gmp
@ -56,7 +57,8 @@ stdenv.mkDerivation rec {
])
++ optional jackaudioSupport libjack2
++ optional cudaSupport cudatoolkit
++ optional colladaSupport opencollada;
++ optional colladaSupport opencollada
++ optional spaceNavSupport libspnav;
postPatch = ''
# allow usage of dynamically linked embree

@ -0,0 +1,29 @@
{ stdenv, lib, libspnav, libX11, mesa_glu }:
stdenv.mkDerivation {
pname = "spacenav-cube-example";
version = libspnav.version;
src = libspnav.src;
sourceRoot = "source/examples/cube";
buildInputs = [ libX11 mesa_glu libspnav ];
configureFlags = [ "--disable-debug" ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp cube $out/bin/spacenav-cube-example
runHook postInstall
'';
meta = with lib; {
homepage = "http://spacenav.sourceforge.net/";
description = "An example application to test the spacenavd driver";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ sohalt ];
};
}

@ -1,18 +1,18 @@
{ lib, stdenv, fetchFromGitLab, fetchFromGitHub, pkg-config, meson, ninja,
git, criterion, wrapGAppsHook, gtk3, libconfig, gnuplot, opencv,
fftwFloat, cfitsio, gsl, exiv2, curl, librtprocess, ffmpeg,
libraw, libtiff, libpng, libjpeg, libheif, ffms
{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, wrapGAppsHook
, git, criterion, gtk3, libconfig, gnuplot, opencv, json-glib
, fftwFloat, cfitsio, gsl, exiv2, librtprocess, wcslib, ffmpeg
, libraw, libtiff, libpng, libjpeg, libheif, ffms
}:
stdenv.mkDerivation rec {
pname = "siril";
version = "0.99.6";
version = "0.99.8.1";
src = fetchFromGitLab {
owner = "free-astro";
repo = pname;
rev = version;
sha256 = "06vh8x45gv0gwlnqjwxglf12jmpdaxkiv5sixkqh20420wabx3ha";
sha256 = "0h3slgpj6zdc0rwmyr9zb0vgf53283hpwb7h26skdswmggsk90i5";
};
nativeBuildInputs = [
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
];
buildInputs = [
gtk3 cfitsio gsl exiv2 gnuplot curl opencv fftwFloat librtprocess
libconfig libraw libtiff libpng libjpeg libheif ffms ffmpeg
gtk3 cfitsio gsl exiv2 gnuplot opencv fftwFloat librtprocess wcslib
libconfig libraw libtiff libpng libjpeg libheif ffms ffmpeg json-glib
];
# Necessary because project uses default build dir for flatpaks/snaps
@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://www.siril.org/";
description = "Astronomical image processing tool";
license = licenses.gpl3;
description = "Astrophotographic image processing tool";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hjones2199 ];
platforms = [ "x86_64-linux" ];
};

@ -12,11 +12,11 @@
assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation rec {
name = "R-4.0.3";
name = "R-4.0.4";
src = fetchurl {
url = "https://cran.r-project.org/src/base/R-4/${name}.tar.gz";
sha256 = "03cypg2qf7v9mq9mr9alz9w5y9m5kdgwbc97bp26pyymg253m609";
sha256 = "0bl098xcv8v316kqnf43v6gb4kcsv31ydqfm1f7qr824jzb2fgsj";
};
dontUseImakeConfigure = true;

@ -90,12 +90,7 @@ rustPlatform.buildRustPackage rec {
--replace xdg-open ${xdg-utils}/bin/xdg-open
'';
installPhase = ''
runHook preInstall
install -D $releaseDir/alacritty $out/bin/alacritty
'' + (
postInstall = (
if stdenv.isDarwin then ''
mkdir $out/Applications
cp -r extra/osx/Alacritty.app $out/Applications
@ -126,8 +121,6 @@ rustPlatform.buildRustPackage rec {
tic -xe alacritty,alacritty-direct -o "$terminfo/share/terminfo" extra/alacritty.info
mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
runHook postInstall
'';
dontPatchELF = true;

@ -4,13 +4,13 @@ let
common = opts: callPackage (import ./common.nix opts);
in {
sublime-merge = common {
buildVersion = "2039";
sha256 = "0l82408jli7g6nc267bnnnz0zz015lvpwva5fxj53mval32ii4i8";
buildVersion = "2047";
sha256 = "03a0whifhx9py25l96xpqhb4p6hi9qmnrk2bxz6gh02sinsp3mia";
} {};
sublime-merge-dev = common {
buildVersion = "2037";
sha256 = "1s0g18l2msmnn6w7f126andh2dygm9l94fxxhsi64v74mkawqg82";
buildVersion = "2046";
sha256 = "04laygxr4vm6mawlfmdn2vj0dwj1swab39znsgb1d6rhysz62kjd";
dev = true;
} {};
}

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetch
, fetchpatch
, cmake
, llvm
, perl
@ -13,6 +14,15 @@ stdenv.mkDerivation rec {
src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
patches = [
# Fix compilation on aarch64-darwin, remove after the next release.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
stripLen = 1;
})
];
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

@ -64,7 +64,7 @@ self: super: {
name = "git-annex-${super.git-annex.version}-src";
url = "git://git-annex.branchable.com/";
rev = "refs/tags/" + super.git-annex.version;
sha256 = "1m9jfr5b0qwajwwmvcq02263bmnqgcqvpdr06sdwlfz3sxsjfp8r";
sha256 = "1lvl6i3ym7dyg215fkmslf3rnk29hz7f21jn91y1mghrhch7hvhl";
};
}).override {
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
@ -212,31 +212,11 @@ self: super: {
# base bound
digit = doJailbreak super.digit;
# 2020-06-05: HACK: does not pass own build suite - `dontCheck` We should
# generate optparse-applicative completions for the hnix executable. Sadly
# building of the executable has been disabled for ghc < 8.10 in hnix.
# Generating the completions should be activated again, once we default to
# ghc 8.10.
hnix = dontCheck (super.hnix.override {
# 2021-01-07: NOTE: hnix-store-core pinned at ==0.2 in Stackage Nightly.
# https://github.com/haskell-nix/hnix-store/issues/104
# Until unpin, which may hold off in time due to Stackage maintenence bottleneck
# the 0_4_0_0 is used
hnix-store-core = self.hnix-store-core_0_4_1_0; # at least 1.7
});
# 2021-01-07: NOTE: hnix-store-core pinned at ==0.2 in Stackage Nightly.
# https://github.com/haskell-nix/hnix-store/issues/104
# Until unpin, which may hold off in time due to Stackage maintenence bottleneck
# the 0_4_0_0 is used
hnix-store-remote = (super.hnix-store-remote.override {
hnix-store-core = self.hnix-store-core_0_4_1_0; # at least 1.7
});
# 2020-06-05: HACK: does not pass own build suite - `dontCheck`
hnix = generateOptparseApplicativeCompletion "hnix" (dontCheck super.hnix);
# https://github.com/haskell-nix/hnix-store/issues/127
hnix-store-core_0_4_1_0 = addTestToolDepend super.hnix-store-core_0_4_1_0 self.tasty-discover;
hnix-store-core = addTestToolDepend super.hnix-store-core self.tasty-discover;
# Fails for non-obvious reasons while attempting to use doctest.
search = dontCheck super.search;
@ -684,8 +664,26 @@ self: super: {
'';
});
# The standard libraries are compiled separately.
idris = generateOptparseApplicativeCompletion "idris" (dontCheck super.idris);
# * The standard libraries are compiled separately.
# * We need multiple patches from master to fix compilation with
# updated dependencies (haskeline and megaparsec) which can be
# removed when the next idris release (1.3.4 probably) comes
# around.
idris = generateOptparseApplicativeCompletion "idris"
(doJailbreak (dontCheck
(appendPatches super.idris [
# compatibility with haskeline >= 0.8
(pkgs.fetchpatch {
url = "https://github.com/idris-lang/Idris-dev/commit/89a87cf666eb8b27190c779e72d0d76eadc1bc14.patch";
sha256 = "0fv493zlpgjsf57w0sncd4vqfkabfczp3xazjjmqw54m9rsfix35";
})
# compatibility with megaparsec >= 0.9
(pkgs.fetchpatch {
url = "https://github.com/idris-lang/Idris-dev/commit/6ea9bc913877d765048d7cdb7fc5aec60b196fac.patch";
sha256 = "0yms74d1xdxd1c08dnp45nb1ddzq54n6hqgzxx0r494wy614ir8q";
})
])
));
# https://github.com/pontarius/pontarius-xmpp/issues/105
pontarius-xmpp = dontCheck super.pontarius-xmpp;
@ -845,8 +843,11 @@ self: super: {
# https://github.com/alphaHeavy/protobuf/issues/34
protobuf = dontCheck super.protobuf;
# https://github.com/bos/text-icu/issues/32
text-icu = dontCheck super.text-icu;
# Is this package still maintained? https://github.com/haskell/text-icu/issues/30
text-icu = overrideCabal super.text-icu (drv: {
doCheck = false; # https://github.com/bos/text-icu/issues/32
configureFlags = ["--ghc-option=-DU_DEFINE_FALSE_AND_TRUE=1"]; # https://github.com/haskell/text-icu/issues/49
});
# aarch64 and armv7l fixes.
happy = if (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) then dontCheck super.happy else super.happy; # Similar to https://ghc.haskell.org/trac/ghc/ticket/13062
@ -968,8 +969,10 @@ self: super: {
# musl fixes
# dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time;
# dontCheck: printf double rounding behavior
prettyprinter = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.prettyprinter else super.prettyprinter;
# The test suite runs for 20+ minutes on a very fast machine, which feels kinda disproportionate.
prettyprinter = dontCheck super.prettyprinter;
brittany = doJailbreak (dontCheck super.brittany); # Outdated upperbound on ghc-exactprint: https://github.com/lspitzner/brittany/issues/342
# Fix with Cabal 2.2, https://github.com/guillaume-nargeot/hpc-coveralls/pull/73
hpc-coveralls = appendPatch super.hpc-coveralls (pkgs.fetchpatch {
@ -1408,16 +1411,8 @@ self: super: {
# 2020-11-19: Checks nearly fixed, but still disabled because of flaky tests:
# https://github.com/haskell/haskell-language-server/issues/610
# https://github.com/haskell/haskell-language-server/issues/611
haskell-language-server = overrideCabal (dontCheck super.haskell-language-server) {
# 2020-02-19: Override is necessary because of wrong bound on upstream, remove after next hackage update
preConfigure = ''
substituteInPlace haskell-language-server.cabal --replace "hls-explicit-imports-plugin ==0.1.0.1" "hls-explicit-imports-plugin ==0.1.0.0"
'';
};
haskell-language-server = dontCheck super.haskell-language-server;
# 2021-02-08: Jailbreaking because of
# https://github.com/haskell/haskell-language-server/issues/1329
hls-tactics-plugin = doJailbreak super.hls-tactics-plugin;
# 2021-02-11: Jailbreaking because of syntax error on bound revision
hls-explicit-imports-plugin = doJailbreak super.hls-explicit-imports-plugin;
@ -1532,7 +1527,7 @@ self: super: {
# 2020-12-05: http-client is fixed on too old version
essence-of-live-coding-warp = super.essence-of-live-coding-warp.override {
http-client = self.http-client_0_7_5;
http-client = self.http-client_0_7_6;
};
# 2020-12-06: Restrictive upper bounds w.r.t. pandoc-types (https://github.com/owickstrom/pandoc-include-code/issues/27)
@ -1591,4 +1586,27 @@ self: super: {
# Overly strict version bounds: https://github.com/Profpatsch/yarn-lock/issues/8
yarn-lock = doJailbreak super.yarn-lock;
# Dependency to regex-tdfa-text can be removed for later regex-tdfa versions.
# Fix protolude compilation error by applying patch from pull-request.
# Override can be removed for the next release > 0.8.0.
yarn2nix = overrideCabal (super.yarn2nix.override {
regex-tdfa-text = null;
}) (attrs: {
jailbreak = true;
# remove dependency on regex-tdfa-text
# which has been merged into regex-tdfa
postPatch = ''
sed -i '/regex-tdfa-text/d' yarn2nix.cabal
'';
patches = (attrs.patches or []) ++ [
# fix a compilation error related to protolude 0.3
(pkgs.fetchpatch {
url = "https://github.com/Profpatsch/yarn2nix/commit/ca78cf06226819b2e78cb6cdbc157d27afb41532.patch";
sha256 = "1vkczwzhxilnp87apyb18nycn834y5nbw4yr1kpwlwhrhalvzw61";
includes = [ "*/ResolveLockfile.hs" ];
})
];
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

@ -42,20 +42,13 @@ self: super: {
unix = null;
xhtml = null;
# The proper 3.2.0.0 release does not compile with ghc-8.10.1, so we take the
# hitherto unreleased next version from the '3.2' branch of the upstream git
# repository for the time being.
cabal-install = assert super.cabal-install.version == "3.2.0.0";
overrideCabal super.cabal-install (drv: {
postUnpack = "sourceRoot+=/cabal-install; echo source root reset to $sourceRoot";
version = "3.2.0.0-git";
editedCabalFile = null;
src = pkgs.fetchgit {
url = "git://github.com/haskell/cabal.git";
rev = "9bd4cc0591616aeae78e17167338371a2542a475";
sha256 = "005q1shh7vqgykkp72hhmswmrfpz761x0q0jqfnl3wqim4xd9dg0";
};
});
cabal-install = super.cabal-install.override {
Cabal = super.Cabal_3_4_0_0;
hackage-security = super.hackage-security.override { Cabal = super.Cabal_3_4_0_0; };
# Usung dontCheck to break test dependency cycles
edit-distance = dontCheck (super.edit-distance.override { random = super.random_1_2_0; });
random = super.random_1_2_0;
};
# Jailbreak to fix the build.
base-noprelude = doJailbreak super.base-noprelude;

@ -43,19 +43,12 @@ self: super: {
unix = null;
xhtml = null;
# Take the 3.4.x release candidate.
cabal-install = assert super.cabal-install.version == "3.2.0.0";
overrideCabal (doJailbreak super.cabal-install) (drv: {
postUnpack = "sourceRoot+=/cabal-install; echo source root reset to $sourceRoot";
version = "cabal-install-3.4.0.0-rc4";
editedCabalFile = null;
src = pkgs.fetchgit {
url = "git://github.com/haskell/cabal.git";
rev = "cabal-install-3.4.0.0-rc4";
sha256 = "049hllk1d8jid9yg70hmcsdgb0n7hm24p39vavllaahfb0qfimrk";
};
executableHaskellDepends = drv.executableHaskellDepends ++ [ self.regex-base self.regex-posix ];
});
# Build cabal-install with the compiler's native Cabal.
cabal-install = (doJailbreak super.cabal-install).override {
# Use dontCheck to break test dependency cycles
edit-distance = dontCheck (super.edit-distance.override { random = super.random_1_2_0; });
random = super.random_1_2_0;
};
# Jailbreaks & Version Updates
async = doJailbreak super.async;
@ -99,10 +92,6 @@ self: super: {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/language-haskell-extract-0.2.4.patch";
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
});
regex-base = appendPatch (doJailbreak super.regex-base) (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/regex-base-0.94.0.0.patch";
sha256 = "0k5fglbl7nnhn8400c4cpnflxcbj9p3xi5prl9jfmszr31jwdy5d";
});
# The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x.
unordered-containers = dontCheck super.unordered-containers;

File diff suppressed because it is too large Load Diff

@ -17,36 +17,71 @@ stdenv.mkDerivation rec {
dontUnpack = true;
LC_ALL = "en_US.UTF-8";
nativeBuildInputs = [ graalvm11-ce glibcLocales ];
LC_ALL = "en_US.UTF-8";
BABASHKA_JAR = src;
BABASHKA_BINARY = "bb";
BABASHKA_XMX = "-J-Xmx4500m";
buildPhase = ''
native-image \
-jar ${src} \
-H:Name=bb \
${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \
-H:+ReportExceptionStackTraces \
-J-Dclojure.spec.skip-macros=true \
-J-Dclojure.compiler.direct-linking=true \
"-H:IncludeResources=BABASHKA_VERSION" \
"-H:IncludeResources=SCI_VERSION" \
-H:ReflectionConfigurationFiles=${reflectionJson} \
--initialize-at-build-time \
-H:Log=registerResource: \
-H:EnableURLProtocols=http,https \
--enable-all-security-services \
-H:+JNI \
--verbose \
--no-fallback \
--no-server \
--report-unsupported-elements-at-runtime \
"--initialize-at-run-time=org.postgresql.sspi.SSPIClient" \
"-J-Xmx4500m"
runHook preBuild
# https://github.com/babashka/babashka/blob/77daea7362d8e2562c89c315b1fbcefde6fa56a5/script/compile
args=("-jar" "$BABASHKA_JAR"
"-H:Name=$BABASHKA_BINARY"
"${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''}"
"-H:+ReportExceptionStackTraces"
"-J-Dclojure.spec.skip-macros=true"
"-J-Dclojure.compiler.direct-linking=true"
"-H:IncludeResources=BABASHKA_VERSION"
"-H:IncludeResources=SCI_VERSION"
"-H:ReflectionConfigurationFiles=${reflectionJson}"
"--initialize-at-build-time"
# "-H:+PrintAnalysisCallTree"
# "-H:+DashboardAll"
# "-H:DashboardDump=reports/dump"
# "-H:+DashboardPretty"
# "-H:+DashboardJson"
"-H:Log=registerResource:"
"-H:EnableURLProtocols=http,https,jar"
"--enable-all-security-services"
"-H:+JNI"
"--verbose"
"--no-fallback"
"--no-server"
"--report-unsupported-elements-at-runtime"
"--initialize-at-run-time=org.postgresql.sspi.SSPIClient"
"--native-image-info"
"--verbose"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiFileReader"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.MixerProvider"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.FormatConversionProvider"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileWriter"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiDeviceProvider"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.SoundbankReader"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.midi.spi.MidiFileWriter"
"$BABASHKA_XMX")
native-image ''${args[@]}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bb $out/bin/bb
runHook postInstall
'';
installCheckPhase = ''
$out/bin/bb --version | grep '${version}'
$out/bin/bb '(+ 1 2)' | grep '3'
$out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | grep '[1 2]'
'';
meta = with lib; {

@ -1,43 +0,0 @@
{ stdenv, fetchFromGitHub, fetchurl, glibc, libX11, libXt, perl }:
stdenv.mkDerivation rec {
pname = "rebol-nightly";
version = "3-alpha";
src = fetchFromGitHub {
rev = "bd45d0de512ff5953e098301c3d610f6024515d6";
owner = "earl";
repo = "r3";
sha256 = "0pirn6936rxi894xxdvj7xdwlwmmxq2wz36jyjnj26667v2n543c";
};
r3 = fetchurl {
url = "http://rebolsource.net/downloads/experimental/r3-linux-x64-gbf237fc";
sha256 = "0cm86kn4lcbvyy6pqg67x53y0wz353y0vg7pfqv65agxj1ynxnrx";
name = "r3";
};
buildInputs = [ glibc libX11 libXt perl ];
configurePhase = ''
cp ${r3} make/r3-make
chmod 777 make/r3-make
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./make/r3-make
cd make
perl -pi -e 's#-m32##g' makefile
perl -pi -e 's#sudo .*#echo#g' makefile
make prep
'';
buildPhase = ''
make
mkdir -p $out/bin
cp r3 $out/bin
'';
meta = with lib; {
description = "Relative expression based object language, a language where code is data";
maintainers = with maintainers; [ vrthra ];
platforms = [ "x86_64-linux" ];
license = licenses.asl20;
homepage = "http://www.rebol.com/";
};
}

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [
"-Dtegra=true"
"-Detnaviv=true"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-Dintel=false";
];
meta = with lib; {
homepage = "https://gitlab.freedesktop.org/mesa/drm";

@ -1,25 +1,13 @@
From f974fe07de9e6820bb1de50b31e480296d1d97b7 Mon Sep 17 00:00:00 2001
From: Christian Kampka <christian@kampka.net>
Date: Wed, 25 Nov 2020 20:09:50 +0100
Subject: [PATCH] Remove unsupported clang flags
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index f13a6bb..b305150 100644
index 2af4804..bcff809 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -69,7 +69,7 @@ PREFIX ?= /usr/local
@@ -80,7 +80,7 @@ PREFIX ?= /usr/local
LIBDIRNAME ?= /lib/faketime
PLATFORM ?=$(shell uname)
-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
+CFLAGS += -std=gnu99 -Wall -Wextra -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
+CFLAGS += -std=gnu99 -Wall -Wextra -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
ifeq ($(PLATFORM),SunOS)
CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
endif
--
2.28.0

@ -35,8 +35,11 @@ stdenv.mkDerivation rec {
"-Wno-error=array-bounds"
] ++ lib.optional stdenv.cc.isClang "-Wno-error");
# Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268
configureFlags = lib.optional stdenv.hostPlatform.isMusl "--disable-tls";
configureFlags = []
# Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268
++ lib.optional stdenv.hostPlatform.isMusl "--disable-tls"
# Remove when aarch64-darwin asm support is upstream: https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/216
++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "--disable-asm";
outputs = [ "out" "dev" ];

@ -0,0 +1,47 @@
diff --git a/spnav.c b/spnav.c
index f9e10f8..27149f7 100644
--- a/spnav.c
+++ b/spnav.c
@@ -36,7 +36,7 @@ OF SUCH DAMAGE.
#include <sys/select.h>
#include "spnav.h"
-#define SPNAV_SOCK_PATH "/var/run/spnav.sock"
+#define DEFAULT_SPNAV_SOCK_PATH "/run/spnav.sock"
#ifdef USE_X11
#include <X11/Xlib.h>
@@ -70,6 +70,24 @@ static struct event_node *ev_queue, *ev_queue_tail;
/* AF_UNIX socket used for alternative communication with daemon */
static int sock = -1;
+static char *spath = NULL;
+
+static char *socket_path()
+{
+ char *xdg_runtime_dir;
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
+ if ( spath == NULL ) {
+ spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
+ if ( spath != NULL ) {
+ sprintf(spath, sizeof(spath), "%s/spnav.sock", xdg_runtime_dir);
+ }
+ }
+ if(access(spath, F_OK)){
+ return spath;
+ }
+ }
+ return DEFAULT_SPNAV_SOCK_PATH;
+}
int spnav_open(void)
{
@@ -92,7 +110,7 @@ int spnav_open(void)
memset(&addr, 0, sizeof addr);
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, SPNAV_SOCK_PATH, sizeof(addr.sun_path));
+ strncpy(addr.sun_path, socket_path(), sizeof(addr.sun_path));
if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {

@ -0,0 +1,36 @@
{ stdenv, lib, fetchFromGitHub, libX11}:
stdenv.mkDerivation rec {
version = "0.2.3";
pname = "libspnav";
src = fetchFromGitHub {
owner = "FreeSpacenav";
repo = "libspnav";
rev = "${pname}-${version}";
sha256 = "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba";
};
buildInputs = [ libX11 ];
patches = [
# Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock
# to allow for a user service
./configure-socket-path.patch
];
configureFlags = [ "--disable-debug"];
preInstall = ''
mkdir -p $out/{lib,include}
'';
meta = with lib; {
homepage = "http://spacenav.sourceforge.net/";
description = "Device driver and SDK for 3Dconnexion 3D input devices";
longDescription = "A free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ sohalt ];
};
}

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "herwig";
version = "7.2.1";
version = "7.2.2";
src = fetchurl {
url = "https://www.hepforge.org/archive/herwig/Herwig-${version}.tar.bz2";
sha256 = "11m6xvardnk0i8x8b3dpwg4c4ncq0xmlfg2n5r5qmh6544pz7zyl";
sha256 = "10y3fb33zsinr0z3hzap9rsbcqhy1yjqnv4b4vz21g7mdlw6pq2k";
};
nativeBuildInputs = [ autoconf automake libtool ];
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A multi-purpose particle physics event generator";
homepage = "https://herwig.hepforge.org/";
license = licenses.gpl3;
license = licenses.gpl3Only;
maintainers = with maintainers; [ veprbl ];
platforms = platforms.unix;
broken = stdenv.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen...

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "thepeg";
version = "2.2.1";
version = "2.2.2";
src = fetchurl {
url = "https://www.hepforge.org/archive/thepeg/ThePEG-${version}.tar.bz2";
sha256 = "13x5gssv22mpa2w6i0vaalwcr57170vh3b4xrw8mrm3abqhwgav3";
sha256 = "0gif4vb9lw2px2qdywqm7x0frbv0h5gq9lq36c50f2hv77a5bgwp";
};
buildInputs = [ boost fastjet gsl hepmc2 lhapdf rivet zlib ];
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Toolkit for High Energy Physics Event Generation";
homepage = "https://herwig.hepforge.org/";
license = licenses.gpl3;
license = licenses.gpl3Only;
maintainers = with maintainers; [ veprbl ];
platforms = platforms.unix;
};

@ -155,6 +155,9 @@ stdenv.mkDerivation rec {
"-DPORT=GTK"
"-DUSE_LIBHYPHEN=OFF"
"-DUSE_WPE_RENDERER=OFF"
# ensure backward compatibility with the latest version of icu:
# http://linuxfromscratch.org/blfs/view/svn/x/webkitgtk.html
"-DCMAKE_CXX_FLAGS=-DU_DEFINE_FALSE_AND_TRUE=1"
] ++ optionals stdenv.isDarwin [
"-DENABLE_GRAPHICS_CONTEXT_3D=OFF"
"-DENABLE_GTKDOC=OFF"

@ -14,13 +14,13 @@
buildPythonPackage rec {
pname = "praw";
version = "7.1.4";
version = "7.2.0";
src = fetchFromGitHub {
owner = "praw-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-onxag3kmswqqSycbwW+orofrukry0pCaRSxVRq2u53A=";
sha256 = "sha256-/GV5ZhrJxeChcYwmH/9FsLceAYRSeTCDe4lMEwdTa8Y=";
};
propagatedBuildInputs = [

@ -6,12 +6,12 @@
buildPythonPackage rec {
pname = "prawcore";
version = "1.5.0";
version = "2.0.0";
disabled = isPy27; # see https://github.com/praw-dev/prawcore/pull/101
src = fetchPypi {
inherit pname version;
sha256 = "1f1eafc8a65d671f9892354f73142014fbb5d3a9ee621568c662d0a354e0578b";
sha256 = "sha256-tJjZtvVJkQBecn1SNcj0nqW6DJpteT+3Q7QPoInNNtE=";
};
propagatedBuildInputs = [

@ -1,31 +1,16 @@
{ lib
, stdenv
, fetchFromGitHub
, which
, curl
, makeWrapper
, jdk
, writeScript
, common-updater-scripts
, cacert
, git
, nixfmt
, nix
, jq
, coreutils
, gnused
}:
{ lib, stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk, writeScript
, common-updater-scripts, cacert, git, nixfmt, nix, jq, coreutils, gnused }:
stdenv.mkDerivation rec {
pname = "sbt-extras";
rev = "830b72140583e2790bbd3649890ac8ef5371d0c6";
version = "2021-02-04";
rev = "f080234ba899bb49b0cf977b3683e6446b38c477";
version = "2021-02-24";
src = fetchFromGitHub {
owner = "paulp";
repo = "sbt-extras";
inherit rev;
sha256 = "0wq2mf8s254ns0sss5q394c1j2rnvl42x9l6kkrav505hbx0gyq6";
sha256 = "01n25s60ssxls8lkwrni91k35622lyaizymmprcqh243dg3g2qiv";
};
dontBuild = true;

@ -1,4 +1,4 @@
{ lib, supportedGhcVersions ? [ "865" "884" "8103" ], stdenv, haskellPackages
{ lib, supportedGhcVersions ? [ "865" "884" "8104" ], stdenv, haskellPackages
, haskell }:
#
# The recommended way to override this package is

@ -3,14 +3,14 @@
let
pname = "anki-bin";
# Update hashes for both Linux and Darwin!
version = "2.1.38";
version = "2.1.40";
unpacked = stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2";
sha256 = "14zbz8k142djka3b5sld3368m98lj80c39m6xg87bz140h25ylz4";
sha256 = "0zcvjm0dv3mjln2npv415yfaa1fykif738qkis52x3pq1by2aiam";
};
installPhase = ''
@ -49,7 +49,7 @@ if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // {
src = fetchurl {
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg";
sha256 = "1krl014jhhby0zv4if9cgbcarmhcg6zccyhxw1yb6djiqap0zii7";
sha256 = "14f0sp9h963qix4wa0kg7z8a2nhch9aybv736rm55aqk6mady6vi";
};
nativeBuildInputs = [ undmg ];

@ -4,13 +4,13 @@
mkDerivation rec {
pname = "cockatrice";
version = "2020-08-23-Release-2.7.5";
version = "2021-01-26-Release-2.8.0";
src = fetchFromGitHub {
owner = "Cockatrice";
repo = "Cockatrice";
rev = version;
sha256 = "1yaxm7q0ja3rgx197hh8ynjc6ncc4hm0qdn9v7f0l4fbv0bdpv34";
sha256 = "0q8ffcklb2b7hcqhy3d2f9kz9aw22pp04pc9y4sslyqmf17pwnz9";
};
buildInputs = [

@ -0,0 +1,118 @@
diff --git a/src/proto_unix.c b/src/proto_unix.c
index 998f234..d38452c 100644
--- a/src/proto_unix.c
+++ b/src/proto_unix.c
@@ -36,11 +36,14 @@ enum {
static int lsock = -1;
+static char *spath = NULL;
+
int init_unix(void)
{
int s;
mode_t prev_umask;
struct sockaddr_un addr;
+ char *sock_path;
if(lsock >= 0) return 0;
@@ -49,16 +52,18 @@ int init_unix(void)
return -1;
}
- unlink(SOCK_NAME); /* in case it already exists */
+ sock_path = socket_path();
+
+ unlink(sock_path); /* in case it already exists */
memset(&addr, 0, sizeof addr);
addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, SOCK_NAME);
+ strcpy(addr.sun_path, sock_path);
prev_umask = umask(0);
if(bind(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
- logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", SOCK_NAME, strerror(errno));
+ logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", sock_path, strerror(errno));
close(s);
return -1;
}
@@ -68,7 +73,7 @@ int init_unix(void)
if(listen(s, 8) == -1) {
logmsg(LOG_ERR, "listen failed: %s\n", strerror(errno));
close(s);
- unlink(SOCK_NAME);
+ unlink(sock_path);
return -1;
}
@@ -82,7 +87,7 @@ void close_unix(void)
close(lsock);
lsock = -1;
- unlink(SOCK_NAME);
+ unlink(socket_path());
}
}
@@ -173,3 +178,19 @@ int handle_uevents(fd_set *rset)
return 0;
}
+
+char *socket_path(void)
+{
+ char *xdg_runtime_dir;
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
+ if ( spath == NULL ) {
+ spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
+ if ( spath != NULL ) {
+ sprintf(spath, "%s/spnav.sock", xdg_runtime_dir);
+ }
+ };
+ return spath;
+ } else {
+ return DEFAULT_SOCK_NAME;
+ }
+}
diff --git a/src/proto_unix.h b/src/proto_unix.h
index 045b379..ec4509c 100644
--- a/src/proto_unix.h
+++ b/src/proto_unix.h
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "event.h"
#include "client.h"
+char *socket_path(void);
int init_unix(void);
void close_unix(void);
int get_unix_socket(void);
diff --git a/src/spnavd.c b/src/spnavd.c
index cbea191..03080da 100644
--- a/src/spnavd.c
+++ b/src/spnavd.c
@@ -344,7 +344,7 @@ static int find_running_daemon(void)
}
memset(&addr, 0, sizeof addr);
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, SOCK_NAME, sizeof addr.sun_path);
+ strncpy(addr.sun_path, socket_path(), sizeof addr.sun_path);
if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
close(s);
diff --git a/src/spnavd.h b/src/spnavd.h
index fa0a916..deea4e0 100644
--- a/src/spnavd.h
+++ b/src/spnavd.h
@@ -26,7 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEF_CFGFILE "/etc/spnavrc"
#define DEF_LOGFILE "/var/log/spnavd.log"
-#define SOCK_NAME "/var/run/spnav.sock"
+#define DEFAULT_SOCK_NAME "/run/spnav.sock"
+#define SOCK_NAME_ENV "SPNAVD_SOCK_LOCATION"
#define PIDFILE "/var/run/spnavd.pid"
#define SYSLOG_ID "spnavd"

@ -0,0 +1,32 @@
{ stdenv, lib, fetchFromGitHub, libX11 }:
stdenv.mkDerivation rec {
version = "0.8";
pname = "spacenavd";
src = fetchFromGitHub {
owner = "FreeSpacenav";
repo = "spacenavd";
rev = "v${version}";
sha256 = "1zz0cm5cgvp9s5n4nzksl8rb11c7sw214bdafzra74smvqfjcjcf";
};
buildInputs = [ libX11 ];
patches = [
# Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock
# to allow for a user service
./configure-socket-path.patch
];
configureFlags = [ "--disable-debug"];
meta = with lib; {
homepage = "http://spacenav.sourceforge.net/";
description = "Device driver and SDK for 3Dconnexion 3D input devices";
longDescription = "A free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ sohalt ];
};
}

@ -69,6 +69,7 @@ in with builtins; {
patches = [
./patches/ldflags-6.0.patch
./patches/include-fixes-6.0.patch
];
};

@ -0,0 +1,137 @@
diff --git a/fdbrpc/ContinuousSample.h b/fdbrpc/ContinuousSample.h
index 54ff1b109..577c228ae 100644
--- a/fdbrpc/ContinuousSample.h
+++ b/fdbrpc/ContinuousSample.h
@@ -26,6 +26,7 @@
#include "flow/IRandom.h"
#include <vector>
#include <algorithm>
+#include <cmath>
template <class T>
class ContinuousSample {
diff --git a/fdbrpc/Smoother.h b/fdbrpc/Smoother.h
index 3ed8e6e98..f3e4504b6 100644
--- a/fdbrpc/Smoother.h
+++ b/fdbrpc/Smoother.h
@@ -23,6 +23,7 @@
#pragma once
#include "flow/flow.h"
+#include <cmath>
struct Smoother {
// Times (t) are expected to be nondecreasing
@@ -50,7 +51,7 @@ struct Smoother {
double elapsed = t - time;
if(elapsed) {
time = t;
- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime ));
+ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime ));
}
}
@@ -83,11 +84,11 @@ struct TimerSmoother {
void update(double t) {
double elapsed = t - time;
time = t;
- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime ));
+ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime ));
}
double eFoldingTime;
double time, total, estimate;
};
-#endif
\ No newline at end of file
+#endif
diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp
index a924bc905..0dc70e7ac 100644
--- a/fdbserver/Knobs.cpp
+++ b/fdbserver/Knobs.cpp
@@ -20,6 +20,7 @@
#include "Knobs.h"
#include "fdbrpc/Locality.h"
+#include <cmath>
ServerKnobs const* SERVER_KNOBS = new ServerKnobs();
diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp
index 2d706dddd..5dbe08861 100644
--- a/flow/Knobs.cpp
+++ b/flow/Knobs.cpp
@@ -20,6 +20,7 @@
#include "Knobs.h"
#include "flow/flow.h"
+#include <cmath>
FlowKnobs const* FLOW_KNOBS = new FlowKnobs();
@@ -128,7 +129,7 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) {
init( MAX_METRICS, 600 );
init( MAX_METRIC_SIZE, 2500 );
init( MAX_METRIC_LEVEL, 25 );
- init( METRIC_LEVEL_DIVISOR, log(4) );
+ init( METRIC_LEVEL_DIVISOR, std::log(4) );
init( METRIC_LIMIT_START_QUEUE_SIZE, 10 ); // The queue size at which to start restricting logging by disabling levels
init( METRIC_LIMIT_RESPONSE_FACTOR, 10 ); // The additional queue size at which to disable logging of another level (higher == less restrictive)
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
index a754c8747..4d47fad32 100644
--- a/flow/Platform.cpp
+++ b/flow/Platform.cpp
@@ -98,6 +98,8 @@
#include <sys/resource.h>
/* Needed for crash handler */
#include <signal.h>
+/* Needed for major() and minor() with recent glibc */
+#include <sys/sysmacros.h>
#endif
#ifdef __APPLE__
diff --git a/flow/Profiler.actor.cpp b/flow/Profiler.actor.cpp
index 4603dcb77..78eda7278 100644
--- a/flow/Profiler.actor.cpp
+++ b/flow/Profiler.actor.cpp
@@ -35,8 +35,6 @@
extern volatile int profilingEnabled;
-static uint64_t gettid() { return syscall(__NR_gettid); }
-
struct SignalClosure {
void (* func)(int, siginfo_t*, void*, void*);
void *userdata;
diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h
index 306352c39..fc63e12f9 100755
--- a/flow/TDMetric.actor.h
+++ b/flow/TDMetric.actor.h
@@ -35,6 +35,7 @@
#include "genericactors.actor.h"
#include "CompressedInt.h"
#include <algorithm>
+#include <cmath>
#include <functional>
struct MetricNameRef {
@@ -799,7 +800,7 @@ struct EventMetric : E, ReferenceCounted<EventMetric<E>>, MetricUtil<EventMetric
if (x == 0.0)
l = FLOW_KNOBS->MAX_METRIC_LEVEL-1;
else
- l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR));
+ l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(std::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR));
if(!canLog(l))
return 0;
@@ -1274,7 +1275,7 @@ public:
l = std::min(
FLOW_KNOBS->MAX_METRIC_LEVEL-1,
(int64_t)(
- log((toggleTime - tv.time) / x) /
+ std::log((toggleTime - tv.time) / x) /
FLOW_KNOBS->METRIC_LEVEL_DIVISOR
)
);

@ -7,11 +7,11 @@
}:
python3.pkgs.buildPythonApplication rec {
pname = "salt";
version = "3002.2";
version = "3002.5";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "vW0pYhzo4JlBJ3fNOWrzVHSqESuwmZtdqAQ4fYcpAHU=";
sha256 = "1bqranhanxcxjc1qcc6cm95f4xxag0ic9g61dq352hqh6m1l1ay8";
};
propagatedBuildInputs = with python3.pkgs; [

@ -9,10 +9,11 @@
, babeltrace, gperf
, gtest
, cunit, snappy
, rocksdb, makeWrapper
, makeWrapper
, leveldb, oathToolkit
, libnl, libcap_ng
, rdkafka
, nixosTests
# Optional Dependencies
, yasm ? null, fcgi ? null, expat ? null
@ -146,7 +147,7 @@ in rec {
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
malloc zlib openldap lttng-ust babeltrace gperf gtest cunit
snappy rocksdb lz4 oathToolkit leveldb libnl libcap_ng rdkafka
snappy lz4 oathToolkit leveldb libnl libcap_ng rdkafka
] ++ lib.optionals stdenv.isLinux [
linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs
# ceph 14
@ -171,12 +172,10 @@ in rec {
cmakeFlags = [
"-DWITH_PYTHON3=ON"
"-DWITH_SYSTEM_ROCKSDB=OFF"
"-DWITH_SYSTEM_ROCKSDB=OFF" # breaks Bluestore
"-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib"
"-DWITH_SYSTEM_BOOST=ON"
"-DWITH_SYSTEM_ROCKSDB=ON"
"-DWITH_SYSTEM_GTEST=ON"
"-DMGR_PYTHON_VERSION=${ceph-python-env.python.pythonVersion}"
"-DWITH_SYSTEMD=OFF"
@ -201,6 +200,7 @@ in rec {
meta = getMeta "Distributed storage system";
passthru.version = version;
passthru.tests = { inherit (nixosTests) ceph-single-node ceph-multi-node ceph-single-node-bluestore; };
};
ceph-client = runCommand "ceph-client-${version}" {

@ -21,14 +21,6 @@ buildRustPackage rec {
SODIUM_USE_PKG_CONFIG = "yes";
installPhase = ''
runHook preInstall
install -D $releaseDir/tox-node $out/bin/tox-node
runHook postInstall
'';
doCheck = false;
cargoSha256 = "sha256-kCT2ulB+c2OlsABkyXyzrHfD/G92EPCdTO34FR5oSws=";

@ -15245,6 +15245,8 @@ in
libspectre = callPackage ../development/libraries/libspectre { };
libspnav = callPackage ../development/libraries/libspnav { };
libgsf = callPackage ../development/libraries/libgsf { };
# GNU libc provides libiconv so systems with glibc don't need to build
@ -29509,6 +29511,10 @@ in
hasktags = haskellPackages.hasktags;
};
spacenavd = callPackage ../misc/drivers/spacenavd { };
spacenav-cube-example = callPackage ../applications/misc/spacenav-cube-example { };
splix = callPackage ../misc/cups/drivers/splix { };
steamcontroller = callPackage ../misc/drivers/steamcontroller { };