commit
78af98a068
684 changed files with 6305 additions and 3758 deletions
|
@ -123,7 +123,7 @@ depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|||
|
||||
Add the following to your `mkDerivation` invocation.
|
||||
```nix
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatfrom;
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
```
|
||||
|
||||
## Cross-building packages {#sec-cross-usage}
|
||||
|
|
|
@ -125,6 +125,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) ({
|
|||
fullName = ''BSD 4-clause "Original" or "Old" License'';
|
||||
};
|
||||
|
||||
bsdOriginalUC = spdx {
|
||||
spdxId = "BSD-4-Clause-UC";
|
||||
fullName = "BSD 4-Clause University of California-Specific";
|
||||
};
|
||||
|
||||
bsdProtection = spdx {
|
||||
spdxId = "BSD-Protection";
|
||||
fullName = "BSD Protection License";
|
||||
|
|
|
@ -112,6 +112,19 @@ rec {
|
|||
aarch64 = "arm64";
|
||||
}.${final.parsed.cpu.name} or final.parsed.cpu.name;
|
||||
|
||||
darwinPlatform =
|
||||
if final.isMacOS then "macos"
|
||||
else if final.isiOS then "ios"
|
||||
else null;
|
||||
# The canonical name for this attribute is darwinSdkVersion, but some
|
||||
# platforms define the old name "sdkVer".
|
||||
darwinSdkVersion = final.sdkVer or "10.12";
|
||||
darwinMinVersion = final.darwinSdkVersion;
|
||||
darwinMinVersionVariable =
|
||||
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
|
||||
else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
|
||||
else null;
|
||||
|
||||
emulator = pkgs: let
|
||||
qemu-user = pkgs.qemu.override {
|
||||
smartcardSupport = false;
|
||||
|
|
|
@ -217,6 +217,7 @@ rec {
|
|||
sdkVer = "14.3";
|
||||
xcodeVer = "12.3";
|
||||
xcodePlatform = "iPhoneSimulator";
|
||||
darwinPlatform = "ios-simulator";
|
||||
useiOSPrebuilt = true;
|
||||
};
|
||||
|
||||
|
@ -226,6 +227,7 @@ rec {
|
|||
sdkVer = "14.3";
|
||||
xcodeVer = "12.3";
|
||||
xcodePlatform = "iPhoneSimulator";
|
||||
darwinPlatform = "ios-simulator";
|
||||
useiOSPrebuilt = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -701,6 +701,9 @@
|
|||
./services/networking/iodine.nix
|
||||
./services/networking/iperf3.nix
|
||||
./services/networking/ircd-hybrid/default.nix
|
||||
./services/networking/iscsi/initiator.nix
|
||||
./services/networking/iscsi/root-initiator.nix
|
||||
./services/networking/iscsi/target.nix
|
||||
./services/networking/iwd.nix
|
||||
./services/networking/jicofo.nix
|
||||
./services/networking/jitsi-videobridge.nix
|
||||
|
|
|
@ -10,39 +10,37 @@ let
|
|||
paths = map (p: "${p}/pcsc/drivers") config.services.pcscd.plugins;
|
||||
};
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
options.services.pcscd = {
|
||||
enable = mkEnableOption "PCSC-Lite daemon";
|
||||
|
||||
services.pcscd = {
|
||||
enable = mkEnableOption "PCSC-Lite daemon";
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ pkgs.ccid ];
|
||||
defaultText = "[ pkgs.ccid ]";
|
||||
example = literalExample "[ pkgs.pcsc-cyberjack ]";
|
||||
description = "Plugin packages to be used for PCSC-Lite.";
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ pkgs.ccid ];
|
||||
defaultText = "[ pkgs.ccid ]";
|
||||
example = literalExample "[ pkgs.pcsc-cyberjack ]";
|
||||
description = "Plugin packages to be used for PCSC-Lite.";
|
||||
};
|
||||
readerConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
FRIENDLYNAME "Some serial reader"
|
||||
DEVICENAME /dev/ttyS0
|
||||
LIBPATH /path/to/serial_reader.so
|
||||
CHANNELID 1
|
||||
'';
|
||||
description = ''
|
||||
Configuration for devices that aren't hotpluggable.
|
||||
|
||||
readerConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
FRIENDLYNAME "Some serial reader"
|
||||
DEVICENAME /dev/ttyS0
|
||||
LIBPATH /path/to/serial_reader.so
|
||||
CHANNELID 1
|
||||
'';
|
||||
description = ''
|
||||
Configuration for devices that aren't hotpluggable.
|
||||
|
||||
See <citerefentry><refentrytitle>reader.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum></citerefentry> for valid options.
|
||||
'';
|
||||
};
|
||||
See <citerefentry><refentrytitle>reader.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum></citerefentry> for valid options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,20 +48,15 @@ in {
|
|||
|
||||
config = mkIf config.services.pcscd.enable {
|
||||
|
||||
systemd.sockets.pcscd = {
|
||||
description = "PCSC-Lite Socket";
|
||||
wantedBy = [ "sockets.target" ];
|
||||
before = [ "multi-user.target" ];
|
||||
socketConfig.ListenStream = "/run/pcscd/pcscd.comm";
|
||||
};
|
||||
environment.etc."reader.conf".source = cfgFile;
|
||||
|
||||
systemd.packages = [ (getBin pkgs.pcsclite) ];
|
||||
|
||||
systemd.sockets.pcscd.wantedBy = [ "sockets.target" ];
|
||||
|
||||
systemd.services.pcscd = {
|
||||
description = "PCSC-Lite daemon";
|
||||
environment.PCSCLITE_HP_DROPDIR = pluginEnv;
|
||||
serviceConfig = {
|
||||
ExecStart = "${getBin pkgs.pcsclite}/sbin/pcscd -f -x -c ${cfgFile}";
|
||||
ExecReload = "${getBin pkgs.pcsclite}/sbin/pcscd -H";
|
||||
};
|
||||
restartTriggers = [ "/etc/reader.conf" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
84
nixos/modules/services/networking/iscsi/initiator.nix
Normal file
84
nixos/modules/services/networking/iscsi/initiator.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{ config, lib, pkgs, ... }: with lib;
|
||||
let
|
||||
cfg = config.services.openiscsi;
|
||||
in
|
||||
{
|
||||
options.services.openiscsi = with types; {
|
||||
enable = mkEnableOption "the openiscsi iscsi daemon";
|
||||
enableAutoLoginOut = mkEnableOption ''
|
||||
automatic login and logout of all automatic targets.
|
||||
You probably do not want this.
|
||||
'';
|
||||
discoverPortal = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Portal to discover targets on";
|
||||
};
|
||||
name = mkOption {
|
||||
type = str;
|
||||
description = "Name of this iscsi initiator";
|
||||
example = "iqn.2020-08.org.linux-iscsi.initiatorhost:example";
|
||||
};
|
||||
package = mkOption {
|
||||
type = package;
|
||||
description = "openiscsi package to use";
|
||||
default = pkgs.openiscsi;
|
||||
defaultText = "pkgs.openiscsi";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
description = "Lines to append to default iscsid.conf";
|
||||
};
|
||||
|
||||
extraConfigFile = mkOption {
|
||||
description = ''
|
||||
Append an additional file's contents to /etc/iscsid.conf. Use a non-store path
|
||||
and store passwords in this file.
|
||||
'';
|
||||
default = null;
|
||||
type = nullOr str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.etc."iscsi/iscsid.conf.fragment".source = pkgs.runCommand "iscsid.conf" {} ''
|
||||
cat "${cfg.package}/etc/iscsi/iscsid.conf" > $out
|
||||
cat << 'EOF' >> $out
|
||||
${cfg.extraConfig}
|
||||
${optionalString cfg.enableAutoLoginOut "node.startup = automatic"}
|
||||
EOF
|
||||
'';
|
||||
environment.etc."iscsi/initiatorname.iscsi".text = "InitiatorName=${cfg.name}";
|
||||
|
||||
system.activationScripts.iscsid = let
|
||||
extraCfgDumper = optionalString (cfg.extraConfigFile != null) ''
|
||||
if [ -f "${cfg.extraConfigFile}" ]; then
|
||||
printf "\n# The following is from ${cfg.extraConfigFile}:\n"
|
||||
cat "${cfg.extraConfigFile}"
|
||||
else
|
||||
echo "Warning: services.openiscsi.extraConfigFile ${cfg.extraConfigFile} does not exist!" >&2
|
||||
fi
|
||||
'';
|
||||
in ''
|
||||
(
|
||||
cat ${config.environment.etc."iscsi/iscsid.conf.fragment".source}
|
||||
${extraCfgDumper}
|
||||
) > /etc/iscsi/iscsid.conf
|
||||
'';
|
||||
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
systemd.services."iscsid".wantedBy = [ "multi-user.target" ];
|
||||
systemd.sockets."iscsid".wantedBy = [ "sockets.target" ];
|
||||
|
||||
systemd.services."iscsi" = mkIf cfg.enableAutoLoginOut {
|
||||
wantedBy = [ "remote-fs.target" ];
|
||||
serviceConfig.ExecStartPre = mkIf (cfg.discoverPortal != null) "${cfg.package}/bin/iscsiadm --mode discoverydb --type sendtargets --portal ${escapeShellArg cfg.discoverPortal} --discover";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
boot.kernelModules = [ "iscsi_tcp" ];
|
||||
};
|
||||
}
|
181
nixos/modules/services/networking/iscsi/root-initiator.nix
Normal file
181
nixos/modules/services/networking/iscsi/root-initiator.nix
Normal file
|
@ -0,0 +1,181 @@
|
|||
{ config, lib, pkgs, ... }: with lib;
|
||||
let
|
||||
cfg = config.boot.iscsi-initiator;
|
||||
in
|
||||
{
|
||||
# If you're booting entirely off another machine you may want to add
|
||||
# this snippet to always boot the latest "system" version. It is not
|
||||
# enabled by default in case you have an initrd on a local disk:
|
||||
#
|
||||
# boot.initrd.postMountCommands = ''
|
||||
# ln -sfn /nix/var/nix/profiles/system/init /mnt-root/init
|
||||
# stage2Init=/init
|
||||
# '';
|
||||
#
|
||||
# Note: Theoretically you might want to connect to multiple portals and
|
||||
# log in to multiple targets, however the authors of this module so far
|
||||
# don't have the need or expertise to reasonably implement it. Also,
|
||||
# consider carefully before making your boot chain depend on multiple
|
||||
# machines to be up.
|
||||
options.boot.iscsi-initiator = with types; {
|
||||
name = mkOption {
|
||||
description = ''
|
||||
Name of the iSCSI initiator to boot from. Note, booting from iscsi
|
||||
requires networkd based networking.
|
||||
'';
|
||||
default = null;
|
||||
example = "iqn.2020-08.org.linux-iscsi.initiatorhost:example";
|
||||
type = nullOr str;
|
||||
};
|
||||
|
||||
discoverPortal = mkOption {
|
||||
description = ''
|
||||
iSCSI portal to boot from.
|
||||
'';
|
||||
default = null;
|
||||
example = "192.168.1.1:3260";
|
||||
type = nullOr str;
|
||||
};
|
||||
|
||||
target = mkOption {
|
||||
description = ''
|
||||
Name of the iSCSI target to boot from.
|
||||
'';
|
||||
default = null;
|
||||
example = "iqn.2020-08.org.linux-iscsi.targethost:example";
|
||||
type = nullOr str;
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
description = ''
|
||||
Higher numbers elicits more logs.
|
||||
'';
|
||||
default = 1;
|
||||
example = 8;
|
||||
type = int;
|
||||
};
|
||||
|
||||
loginAll = mkOption {
|
||||
description = ''
|
||||
Do not log into a specific target on the portal, but to all that we discover.
|
||||
This overrides setting target.
|
||||
'';
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
description = "Extra lines to append to /etc/iscsid.conf";
|
||||
default = null;
|
||||
type = nullOr lines;
|
||||
};
|
||||
|
||||
extraConfigFile = mkOption {
|
||||
description = ''
|
||||
Append an additional file's contents to `/etc/iscsid.conf`. Use a non-store path
|
||||
and store passwords in this file. Note: the file specified here must be available
|
||||
in the initrd, see: `boot.initrd.secrets`.
|
||||
'';
|
||||
default = null;
|
||||
type = nullOr str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.name != null) {
|
||||
# The "scripted" networking configuration (ie: non-networkd)
|
||||
# doesn't properly order the start and stop of the interfaces, and the
|
||||
# network interfaces are torn down before unmounting disks. Since this
|
||||
# module is specifically for very-early-boot network mounts, we need
|
||||
# the network to stay on.
|
||||
#
|
||||
# We could probably fix the scripted options to properly order, but I'm
|
||||
# not inclined to invest that time today. Hopefully this gets users far
|
||||
# enough along and they can just use networkd.
|
||||
networking.useNetworkd = true;
|
||||
networking.useDHCP = false; # Required to set useNetworkd = true
|
||||
|
||||
boot.initrd = {
|
||||
network.enable = true;
|
||||
|
||||
# By default, the stage-1 disables the network and resets the interfaces
|
||||
# on startup. Since our startup disks are on the network, we can't let
|
||||
# the network not work.
|
||||
network.flushBeforeStage2 = false;
|
||||
|
||||
kernelModules = [ "iscsi_tcp" ];
|
||||
|
||||
extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${pkgs.openiscsi}/bin/iscsid
|
||||
copy_bin_and_libs ${pkgs.openiscsi}/bin/iscsiadm
|
||||
${optionalString (!config.boot.initrd.network.ssh.enable) "cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib"}
|
||||
|
||||
mkdir -p $out/etc/iscsi
|
||||
cp ${config.environment.etc.hosts.source} $out/etc/hosts
|
||||
cp ${pkgs.openiscsi}/etc/iscsi/iscsid.conf $out/etc/iscsi/iscsid.fragment.conf
|
||||
chmod +w $out/etc/iscsi/iscsid.fragment.conf
|
||||
cat << 'EOF' >> $out/etc/iscsi/iscsid.fragment.conf
|
||||
${optionalString (cfg.extraConfig != null) cfg.extraConfig}
|
||||
EOF
|
||||
'';
|
||||
|
||||
extraUtilsCommandsTest = ''
|
||||
$out/bin/iscsiadm --version
|
||||
'';
|
||||
|
||||
preLVMCommands = let
|
||||
extraCfgDumper = optionalString (cfg.extraConfigFile != null) ''
|
||||
if [ -f "${cfg.extraConfigFile}" ]; then
|
||||
printf "\n# The following is from ${cfg.extraConfigFile}:\n"
|
||||
cat "${cfg.extraConfigFile}"
|
||||
else
|
||||
echo "Warning: boot.iscsi-initiator.extraConfigFile ${cfg.extraConfigFile} does not exist!" >&2
|
||||
fi
|
||||
'';
|
||||
in ''
|
||||
${optionalString (!config.boot.initrd.network.ssh.enable) ''
|
||||
# stolen from initrd-ssh.nix
|
||||
echo 'root:x:0:0:root:/root:/bin/ash' > /etc/passwd
|
||||
echo 'passwd: files' > /etc/nsswitch.conf
|
||||
''}
|
||||
|
||||
cp -f $extraUtils/etc/hosts /etc/hosts
|
||||
|
||||
mkdir -p /etc/iscsi /run/lock/iscsi
|
||||
echo "InitiatorName=${cfg.name}" > /etc/iscsi/initiatorname.iscsi
|
||||
|
||||
(
|
||||
cat "$extraUtils/etc/iscsi/iscsid.fragment.conf"
|
||||
printf "\n"
|
||||
${optionalString cfg.loginAll ''echo "node.startup = automatic"''}
|
||||
${extraCfgDumper}
|
||||
) > /etc/iscsi/iscsid.conf
|
||||
|
||||
iscsid --foreground --no-pid-file --debug ${toString cfg.logLevel} &
|
||||
iscsiadm --mode discoverydb \
|
||||
--type sendtargets \
|
||||
--discover \
|
||||
--portal ${escapeShellArg cfg.discoverPortal} \
|
||||
--debug ${toString cfg.logLevel}
|
||||
|
||||
${if cfg.loginAll then ''
|
||||
iscsiadm --mode node --loginall all
|
||||
'' else ''
|
||||
iscsiadm --mode node --targetname ${escapeShellArg cfg.target} --login
|
||||
''}
|
||||
pkill -9 iscsid
|
||||
'';
|
||||
};
|
||||
|
||||
services.openiscsi = {
|
||||
enable = true;
|
||||
inherit (cfg) name;
|
||||
};
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.loginAll -> cfg.target == null;
|
||||
message = "iSCSI target name is set while login on all portals is enabled.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
53
nixos/modules/services/networking/iscsi/target.nix
Normal file
53
nixos/modules/services/networking/iscsi/target.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.target;
|
||||
in
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.target = with types; {
|
||||
enable = mkEnableOption "the kernel's LIO iscsi target";
|
||||
|
||||
config = mkOption {
|
||||
type = attrs;
|
||||
default = {};
|
||||
description = ''
|
||||
Content of /etc/target/saveconfig.json
|
||||
This file is normally read and written by targetcli
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
environment.etc."target/saveconfig.json" = {
|
||||
text = builtins.toJSON cfg.config;
|
||||
mode = "0600";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ targetcli ];
|
||||
|
||||
boot.kernelModules = [ "configfs" "target_core_mod" "iscsi_target_mod" ];
|
||||
|
||||
systemd.services.iscsi-target = {
|
||||
enable = true;
|
||||
after = [ "network.target" "local-fs.target" ];
|
||||
requires = [ "sys-kernel-config.mount" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.python3.pkgs.rtslib}/bin/targetctl restore";
|
||||
ExecStop = "${pkgs.python3.pkgs.rtslib}/bin/targetctl clear";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /etc/target 0700 root root - -"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -161,9 +161,6 @@ in
|
|||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
# Make sure Domain 0 gets the required configuration
|
||||
#boot.kernelPackages = pkgs.boot.kernelPackages.override { features={xen_dom0=true;}; };
|
||||
|
||||
boot.kernelModules =
|
||||
[ "xen-evtchn" "xen-gntdev" "xen-gntalloc" "xen-blkback" "xen-netback"
|
||||
"xen-pciback" "evtchn" "gntdev" "netbk" "blkbk" "xen-scsibk"
|
||||
|
|
|
@ -186,6 +186,7 @@ in
|
|||
iodine = handleTest ./iodine.nix {};
|
||||
ipfs = handleTest ./ipfs.nix {};
|
||||
ipv6 = handleTest ./ipv6.nix {};
|
||||
iscsi-root = handleTest ./iscsi-root.nix {};
|
||||
jackett = handleTest ./jackett.nix {};
|
||||
jellyfin = handleTest ./jellyfin.nix {};
|
||||
jenkins = handleTest ./jenkins.nix {};
|
||||
|
|
161
nixos/tests/iscsi-root.nix
Normal file
161
nixos/tests/iscsi-root.nix
Normal file
|
@ -0,0 +1,161 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
initiatorName = "iqn.2020-08.org.linux-iscsi.initiatorhost:example";
|
||||
targetName = "iqn.2003-01.org.linux-iscsi.target.x8664:sn.acf8fd9c23af";
|
||||
in
|
||||
{
|
||||
name = "iscsi";
|
||||
meta = {
|
||||
maintainers = pkgs.lib.teams.deshaw.members
|
||||
++ (with pkgs.lib.maintainers; [ ajs124 ]);
|
||||
};
|
||||
|
||||
nodes = {
|
||||
target = { config, pkgs, lib, ... }: {
|
||||
services.target = {
|
||||
enable = true;
|
||||
config = {
|
||||
fabric_modules = [];
|
||||
storage_objects = [
|
||||
{
|
||||
dev = "/dev/vdb";
|
||||
name = "test";
|
||||
plugin = "block";
|
||||
write_back = true;
|
||||
wwn = "92b17c3f-6b40-4168-b082-ceeb7b495522";
|
||||
}
|
||||
];
|
||||
targets = [
|
||||
{
|
||||
fabric = "iscsi";
|
||||
tpgs = [
|
||||
{
|
||||
enable = true;
|
||||
attributes = {
|
||||
authentication = 0;
|
||||
generate_node_acls = 1;
|
||||
};
|
||||
luns = [
|
||||
{
|
||||
alias = "94dfe06967";
|
||||
alua_tg_pt_gp_name = "default_tg_pt_gp";
|
||||
index = 0;
|
||||
storage_object = "/backstores/block/test";
|
||||
}
|
||||
];
|
||||
node_acls = [
|
||||
{
|
||||
mapped_luns = [
|
||||
{
|
||||
alias = "d42f5bdf8a";
|
||||
index = 0;
|
||||
tpg_lun = 0;
|
||||
write_protect = false;
|
||||
}
|
||||
];
|
||||
node_wwn = initiatorName;
|
||||
}
|
||||
];
|
||||
portals = [
|
||||
{
|
||||
ip_address = "0.0.0.0";
|
||||
iser = false;
|
||||
offload = false;
|
||||
port = 3260;
|
||||
}
|
||||
];
|
||||
tag = 1;
|
||||
}
|
||||
];
|
||||
wwn = targetName;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3260 ];
|
||||
networking.firewall.allowedUDPPorts = [ 3260 ];
|
||||
|
||||
virtualisation.memorySize = 2048;
|
||||
virtualisation.emptyDiskImages = [ 2048 ];
|
||||
};
|
||||
|
||||
initiatorAuto = { nodes, config, pkgs, ... }: {
|
||||
services.openiscsi = {
|
||||
enable = true;
|
||||
enableAutoLoginOut = true;
|
||||
discoverPortal = "target";
|
||||
name = initiatorName;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xfsprogs
|
||||
];
|
||||
|
||||
system.extraDependencies = [ nodes.initiatorRootDisk.config.system.build.toplevel ];
|
||||
|
||||
nix.binaryCaches = lib.mkForce [];
|
||||
nix.extraOptions = ''
|
||||
hashed-mirrors =
|
||||
connect-timeout = 1
|
||||
'';
|
||||
};
|
||||
|
||||
initiatorRootDisk = { config, pkgs, modulesPath, lib, ... }: {
|
||||
boot.loader.grub.enable = false;
|
||||
boot.kernelParams = lib.mkOverride 5 (
|
||||
[
|
||||
"boot.shell_on_fail"
|
||||
"console=tty1"
|
||||
"ip=${config.networking.primaryIPAddress}:::255.255.255.0::ens9:none"
|
||||
]
|
||||
);
|
||||
|
||||
# defaults to true, puts some code in the initrd that tries to mount an overlayfs on /nix/store
|
||||
virtualisation.writableStore = false;
|
||||
|
||||
fileSystems = lib.mkOverride 5 {
|
||||
"/" = {
|
||||
fsType = "xfs";
|
||||
device = "/dev/sda";
|
||||
options = [ "_netdev" ];
|
||||
};
|
||||
};
|
||||
|
||||
boot.iscsi-initiator = {
|
||||
discoverPortal = "target";
|
||||
name = initiatorName;
|
||||
target = targetName;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
target.start()
|
||||
target.wait_for_unit("iscsi-target.service")
|
||||
|
||||
initiatorAuto.start()
|
||||
|
||||
initiatorAuto.wait_for_unit("iscsid.service")
|
||||
initiatorAuto.wait_for_unit("iscsi.service")
|
||||
initiatorAuto.get_unit_info("iscsi")
|
||||
|
||||
initiatorAuto.succeed("set -x; while ! test -e /dev/sda; do sleep 1; done")
|
||||
|
||||
initiatorAuto.succeed("mkfs.xfs /dev/sda")
|
||||
initiatorAuto.succeed("mkdir /mnt && mount /dev/sda /mnt")
|
||||
initiatorAuto.succeed(
|
||||
"nixos-install --no-bootloader --no-root-passwd --system ${nodes.initiatorRootDisk.config.system.build.toplevel}"
|
||||
)
|
||||
initiatorAuto.succeed("umount /mnt && rmdir /mnt")
|
||||
initiatorAuto.shutdown()
|
||||
|
||||
initiatorRootDisk.start()
|
||||
initiatorRootDisk.wait_for_unit("multi-user.target")
|
||||
initiatorRootDisk.wait_for_unit("iscsid")
|
||||
initiatorRootDisk.succeed("touch test")
|
||||
initiatorRootDisk.shutdown()
|
||||
'';
|
||||
}
|
||||
)
|
|
@ -30,7 +30,6 @@ python3.pkgs.buildPythonApplication rec {
|
|||
++ optionals withDbusPython [ dbus-python ]
|
||||
++ optionals withPyInotify [ pyinotify ]
|
||||
++ optionals withMusicBrainzNgs [ musicbrainzngs ]
|
||||
++ optionals stdenv.isDarwin [ pyobjc ]
|
||||
++ optionals withPahoMqtt [ paho-mqtt ];
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig
|
||||
, libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr
|
||||
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk
|
||||
, at-spi2-core, libdbusmenu
|
||||
, at-spi2-core, libdbusmenu, mesa
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -12,6 +12,7 @@ let
|
|||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
|
||||
xorg.libxcb libsecret libuuid at-spi2-atk at-spi2-core libdbusmenu
|
||||
mesa # required for libgbm
|
||||
];
|
||||
|
||||
libPathNative = lib.makeLibraryPath packages;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
, alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, dbus, cups, expat
|
||||
, gdk-pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor
|
||||
, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst
|
||||
, libxcb, libuuid, libxshmfence, nspr, nss, pango
|
||||
, libxcb, libuuid, libxshmfence, nspr, nss, pango, mesa
|
||||
|
||||
, systemd
|
||||
}:
|
||||
|
@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
|
|||
libXtst
|
||||
libxcb
|
||||
libuuid
|
||||
mesa # for libgbm
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
|
|
|
@ -1 +1 @@
|
|||
WGET_ARGS=( http://download.kde.org/stable/release-service/20.12.2/src -A '*.tar.xz' )
|
||||
WGET_ARGS=( http://download.kde.org/stable/release-service/20.12.3/src -A '*.tar.xz' )
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,6 +7,7 @@
|
|||
, glib
|
||||
, gtk3
|
||||
, libnotify
|
||||
, scandir ? null
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
|
|
|
@ -23,7 +23,7 @@ buildPythonApplication rec {
|
|||
dateutil gflags httplib2 parsedatetime six vobject
|
||||
google-api-python-client oauth2client uritemplate
|
||||
libnotify
|
||||
] ++ lib.optional (!isPy3k) futures;
|
||||
];
|
||||
|
||||
# There are no tests as of 4.0.0a4
|
||||
doCheck = false;
|
||||
|
|
|
@ -151,6 +151,7 @@ let
|
|||
bison gperf libkrb5
|
||||
glib gtk3 dbus-glib
|
||||
libXScrnSaver libXcursor libXtst libxshmfence libGLU libGL
|
||||
mesa # required for libgbm
|
||||
pciutils protobuf speechd libXdamage at-spi2-core
|
||||
jre
|
||||
pipewire
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
|
||||
, freetype, fontconfig, file, nspr, nss, nss_3_53
|
||||
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
|
||||
, hunspell, libXdamage, libevent, libstartup_notification
|
||||
, hunspell, libevent, libstartup_notification
|
||||
, libvpx_1_8
|
||||
, icu67, libpng, jemalloc, glib, pciutils
|
||||
, autoconf213, which, gnused, rustPackages, rustPackages_1_45
|
||||
|
@ -22,7 +22,7 @@
|
|||
, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
|
||||
, ffmpegSupport ? true
|
||||
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
|
||||
, waylandSupport ? true, libxkbcommon
|
||||
, waylandSupport ? true, libxkbcommon, libdrm
|
||||
, ltoSupport ? (stdenv.isLinux && stdenv.is64bit), overrideCC, buildPackages
|
||||
, gssSupport ? true, libkrb5
|
||||
, pipewireSupport ? waylandSupport && webrtcSupport, pipewire
|
||||
|
@ -161,6 +161,7 @@ buildStdenv.mkDerivation ({
|
|||
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
|
||||
xorg.pixman yasm libGLU libGL
|
||||
xorg.xorgproto
|
||||
xorg.libXdamage
|
||||
xorg.libXext makeWrapper
|
||||
libevent libstartup_notification /* cairo */
|
||||
libpng jemalloc glib
|
||||
|
@ -175,7 +176,7 @@ buildStdenv.mkDerivation ({
|
|||
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
|
||||
++ lib.optional gtk3Support gtk3
|
||||
++ lib.optional gssSupport libkrb5
|
||||
++ lib.optional waylandSupport libxkbcommon
|
||||
++ lib.optionals waylandSupport [ libxkbcommon libdrm ]
|
||||
++ lib.optional pipewireSupport pipewire
|
||||
++ lib.optional (lib.versionAtLeast ffversion "82") gnum4
|
||||
++ lib.optionals buildStdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pname, version, src, binaryName, desktopName
|
||||
, autoPatchelfHook, fetchurl, makeDesktopItem, lib, stdenv, wrapGAppsHook
|
||||
, autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook
|
||||
, alsaLib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
|
||||
, freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
|
||||
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
|
||||
|
@ -18,6 +18,7 @@ in stdenv.mkDerivation rec {
|
|||
cups
|
||||
libdrm
|
||||
libuuid
|
||||
libXdamage
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
, gnome2, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig
|
||||
, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
|
||||
, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib
|
||||
, cups, expat, libuuid, at-spi2-core, libappindicator-gtk3
|
||||
, cups, expat, libuuid, at-spi2-core, libappindicator-gtk3, mesa
|
||||
# Runtime dependencies:
|
||||
, systemd, libnotify, libdbusmenu, libpulseaudio
|
||||
# Unfortunately this also overwrites the UI language (not just the spell
|
||||
|
@ -73,6 +73,7 @@ in stdenv.mkDerivation rec {
|
|||
libappindicator-gtk3
|
||||
libnotify
|
||||
libuuid
|
||||
mesa # for libgbm
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
, alsaSupport ? stdenv.isLinux, alsaLib
|
||||
, pulseaudioSupport ? stdenv.isLinux, libpulseaudio
|
||||
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
|
||||
, waylandSupport ? true
|
||||
, waylandSupport ? true, libdrm
|
||||
, libxkbcommon, calendarSupport ? true
|
||||
|
||||
# Use official trademarked branding. Permission obtained at:
|
||||
|
@ -137,12 +137,13 @@ stdenv.mkDerivation rec {
|
|||
xorg.libXt
|
||||
xorg.pixman
|
||||
xorg.xorgproto
|
||||
xorg.libXdamage
|
||||
zip
|
||||
zlib
|
||||
] ++ lib.optional alsaSupport alsaLib
|
||||
++ lib.optional gtk3Support gtk3
|
||||
++ lib.optional pulseaudioSupport libpulseaudio
|
||||
++ lib.optional waylandSupport libxkbcommon;
|
||||
++ lib.optionals waylandSupport [ libxkbcommon libdrm ];
|
||||
|
||||
NIX_CFLAGS_COMPILE =[
|
||||
"-I${glib.dev}/include/gio-unix-2.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, lib, fetchurl, dpkg
|
||||
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype
|
||||
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3
|
||||
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, mesa
|
||||
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
|
||||
}:
|
||||
|
||||
|
@ -20,6 +20,7 @@ let deps = [
|
|||
gtk3
|
||||
libappindicator
|
||||
libnotify
|
||||
mesa
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcomposite
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
, gtk3
|
||||
, libpulseaudio
|
||||
, libudev0-shim
|
||||
, libdrm
|
||||
, makeWrapper
|
||||
, nspr
|
||||
, nss
|
||||
|
@ -101,6 +102,7 @@ in stdenv.mkDerivation rec {
|
|||
gtk2
|
||||
gtk3
|
||||
libpulseaudio
|
||||
libdrm
|
||||
nspr
|
||||
nss
|
||||
qt5.qtbase
|
||||
|
|
|
@ -11,6 +11,14 @@ let
|
|||
|
||||
python3 = pkgs.python3.override {
|
||||
packageOverrides = self: super: {
|
||||
cypari2 = super.cypari2.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "2.1.1";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db";
|
||||
};
|
||||
});
|
||||
|
||||
# `sagelib`, i.e. all of sage except some wrappers and runtime dependencies
|
||||
sagelib = self.callPackage ./sagelib.nix {
|
||||
inherit flint arb;
|
||||
|
|
|
@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
|||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ which gnome3.gnome-common glib intltool libtool cairo gtk3 xorg.xwininfo ]
|
||||
buildInputs = [ which gnome3.gnome-common glib intltool libtool cairo gtk3 xorg.xwininfo xorg.libXdamage ]
|
||||
++ (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good gst-plugins-ugly gst-libav wrapGAppsHook ]);
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -127,6 +127,7 @@ in stdenv.mkDerivation {
|
|||
bluez giflib glib harfbuzz lcms2 libpthreadstubs
|
||||
ffmpeg flatbuffers fmt fstrcmp rapidjson
|
||||
lirc
|
||||
mesa # for libEGL
|
||||
]
|
||||
++ lib.optional x11Support [
|
||||
libX11 xorgproto libXt libXmu libXext.dev libXdmcp
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
, gtk3-x11
|
||||
, libudev0-shim
|
||||
, libuuid
|
||||
, mesa
|
||||
, nss
|
||||
, nspr
|
||||
, xorg
|
||||
|
@ -63,6 +64,7 @@ stdenv.mkDerivation rec {
|
|||
glib
|
||||
pango
|
||||
gtk3-x11
|
||||
mesa
|
||||
nss
|
||||
nspr
|
||||
libuuid
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, meson, ninja, pkg-config, wayland, scdoc, makeWrapper
|
||||
, wlroots, wayland-protocols, pixman, libxkbcommon
|
||||
, systemd, libGL, libX11
|
||||
, systemd, libGL, libX11, mesa
|
||||
, xwayland ? null
|
||||
, nixosTests
|
||||
}:
|
||||
|
@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [
|
||||
wlroots wayland wayland-protocols pixman libxkbcommon
|
||||
mesa # for libEGL headers
|
||||
systemd libGL libX11
|
||||
];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, meson, ninja, pkg-config, wayland, scdoc, makeWrapper
|
||||
, wlroots, wayland-protocols, pixman, libxkbcommon
|
||||
, cairo , pango, fontconfig, pandoc, systemd
|
||||
, cairo , pango, fontconfig, pandoc, systemd, mesa
|
||||
, withXwayland ? true, xwayland
|
||||
, nixosTests
|
||||
}:
|
||||
|
@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [
|
||||
wlroots wayland wayland-protocols pixman libxkbcommon cairo
|
||||
pango fontconfig pandoc systemd
|
||||
mesa # for libEGL headers
|
||||
];
|
||||
|
||||
outputs = [ "out" "contrib" ];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, stdenv, fetchzip,
|
||||
pkg-config, bmake,
|
||||
cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman,
|
||||
libucl, wayland, wayland-protocols, wlroots,
|
||||
libucl, wayland, wayland-protocols, wlroots, mesa,
|
||||
features ? {
|
||||
gammacontrol = true;
|
||||
layershell = true;
|
||||
|
@ -35,6 +35,7 @@ stdenv.mkDerivation {
|
|||
pango
|
||||
pixman
|
||||
libucl
|
||||
mesa # for libEGL
|
||||
wayland
|
||||
wayland-protocols
|
||||
wlroots
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
, pixman
|
||||
, udev
|
||||
, libGL
|
||||
, mesa
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -33,6 +34,7 @@ stdenv.mkDerivation rec {
|
|||
pixman
|
||||
udev
|
||||
libGL
|
||||
mesa # for libEGL
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, lib, fetchurl, meson, ninja, pkg-config, git
|
||||
, cairo, libdrm, libexecinfo, libinput, libjpeg, libxkbcommon, wayland
|
||||
, wayland-protocols, wf-config, wlroots
|
||||
, wayland-protocols, wf-config, wlroots, mesa
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ meson ninja pkg-config wayland ];
|
||||
buildInputs = [
|
||||
cairo libdrm libexecinfo libinput libjpeg libxkbcommon wayland
|
||||
wayland-protocols wf-config wlroots
|
||||
wayland-protocols wf-config wlroots mesa
|
||||
];
|
||||
|
||||
mesonFlags = [ "--sysconfdir" "/etc" ];
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
, wayland
|
||||
, wayland-protocols
|
||||
, wlroots
|
||||
, mesa
|
||||
, xwayland
|
||||
, makeWrapper
|
||||
}:
|
||||
|
@ -32,6 +33,7 @@ stdenv.mkDerivation rec {
|
|||
wayland
|
||||
wayland-protocols
|
||||
wlroots
|
||||
mesa # for libEGL
|
||||
xwayland
|
||||
];
|
||||
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
# Unconditionally adding in platform version flags will result in warnings that
|
||||
# will be treated as errors by some packages. Add any missing flags here.
|
||||
|
||||
# There are two things to be configured: the "platform version" (oldest
|
||||
# supported version of macos, ios, etc), and the "sdk version".
|
||||
#
|
||||
# The modern way of configuring these is to use:
|
||||
# -platform_version $platform $platform_version $sdk_version"
|
||||
#
|
||||
# The old way is still supported, and uses flags like:
|
||||
# -${platform}_version_min $platform_version
|
||||
# -sdk_version $sdk_version
|
||||
#
|
||||
# If both styles are specified ld will combine them. If multiple versions are
|
||||
# specified for the same platform, ld will emit an error.
|
||||
#
|
||||
# The following adds flags for whichever properties have not already been
|
||||
# provided.
|
||||
|
||||
havePlatformVersionFlag=
|
||||
haveDarwinSDKVersion=
|
||||
haveDarwinPlatformVersion=
|
||||
|
||||
# Roles will set by add-flags.sh, but add-flags.sh can be skipped when the
|
||||
# cc-wrapper has added the linker flags. Both the cc-wrapper and the binutils
|
||||
# wrapper mangle the same variable (MACOSX_DEPLOYMENT_TARGET), so if roles are
|
||||
# empty due to being run through the cc-wrapper then the mangle here is a no-op
|
||||
# and we still do the right thing.
|
||||
#
|
||||
# To be robust, make sure we always have the correct set of roles.
|
||||
accumulateRoles
|
||||
|
||||
mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"}
|
||||
|
||||
n=0
|
||||
nParams=${#params[@]}
|
||||
while (( n < nParams )); do
|
||||
p=${params[n]}
|
||||
case "$p" in
|
||||
# the current platform
|
||||
-@darwinPlatform@_version_min)
|
||||
haveDarwinPlatformVersion=1
|
||||
;;
|
||||
|
||||
# legacy aliases
|
||||
-macosx_version_min|-iphoneos_version_min|-iosmac_version_min|-uikitformac_version_min)
|
||||
haveDarwinPlatformVersion=1
|
||||
;;
|
||||
|
||||
-sdk_version)
|
||||
haveDarwinSDKVersion=1
|
||||
;;
|
||||
|
||||
-platform_version)
|
||||
havePlatformVersionFlag=1
|
||||
|
||||
# If clang can't determine the sdk version it will pass 0.0.0. This
|
||||
# has runtime effects so we override this to use the known sdk
|
||||
# version.
|
||||
if [ "${params[n+3]-}" = 0.0.0 ]; then
|
||||
params[n+3]=@darwinSdkVersion@
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
n=$((n + 1))
|
||||
done
|
||||
|
||||
# If the caller has set -platform_version, trust they're doing the right thing.
|
||||
# This will be the typical case for clang in nixpkgs.
|
||||
if [ ! "$havePlatformVersionFlag" ]; then
|
||||
if [ ! "$haveDarwinSDKVersion" ] && [ ! "$haveDarwinPlatformVersion" ]; then
|
||||
# Nothing provided. Use the modern "-platform_version" to set both.
|
||||
extraBefore+=(-platform_version @darwinPlatform@ "${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@}" @darwinSdkVersion@)
|
||||
elif [ ! "$haveDarwinSDKVersion" ]; then
|
||||
# Add missing sdk version
|
||||
extraBefore+=(-sdk_version @darwinSdkVersion@)
|
||||
elif [ ! "$haveDarwinPlatformVersion" ]; then
|
||||
# Add missing platform version
|
||||
extraBefore+=(-@darwinPlatform@_version_min "${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@}")
|
||||
fi
|
||||
fi
|
|
@ -252,11 +252,6 @@ stdenv.mkDerivation {
|
|||
fi
|
||||
'')
|
||||
|
||||
# Ensure consistent LC_VERSION_MIN_MACOSX and remove LC_UUID.
|
||||
+ optionalString stdenv.targetPlatform.isMacOS ''
|
||||
echo "-sdk_version 10.12 -no_uuid" >> $out/nix-support/libc-ldflags-before
|
||||
''
|
||||
|
||||
##
|
||||
## User env support
|
||||
##
|
||||
|
@ -310,6 +305,13 @@ stdenv.mkDerivation {
|
|||
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags
|
||||
''
|
||||
|
||||
###
|
||||
### Remove LC_UUID
|
||||
###
|
||||
+ optionalString (stdenv.targetPlatform.isDarwin && !(stdenv.cc.bintools.bintools.isGNU or false)) ''
|
||||
echo "-no_uuid" >> $out/nix-support/libc-ldflags-before
|
||||
''
|
||||
|
||||
+ ''
|
||||
for flags in "$out/nix-support"/*flags*; do
|
||||
substituteInPlace "$flags" --replace $'\n' ' '
|
||||
|
@ -320,6 +322,23 @@ stdenv.mkDerivation {
|
|||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
''
|
||||
|
||||
###
|
||||
### Ensure consistent LC_VERSION_MIN_MACOSX
|
||||
###
|
||||
+ optionalString stdenv.targetPlatform.isDarwin (
|
||||
let
|
||||
inherit (stdenv.targetPlatform)
|
||||
darwinPlatform darwinSdkVersion
|
||||
darwinMinVersion darwinMinVersionVariable;
|
||||
in ''
|
||||
export darwinPlatform=${darwinPlatform}
|
||||
export darwinMinVersion=${darwinMinVersion}
|
||||
export darwinSdkVersion=${darwinSdkVersion}
|
||||
export darwinMinVersionVariable=${darwinMinVersionVariable}
|
||||
substituteAll ${./add-darwin-ldflags-before.sh} $out/nix-support/add-local-ldflags-before.sh
|
||||
''
|
||||
)
|
||||
|
||||
##
|
||||
## Extra custom steps
|
||||
##
|
||||
|
|
|
@ -78,6 +78,14 @@ fi
|
|||
|
||||
extraAfter+=($NIX_LDFLAGS_AFTER_@suffixSalt@)
|
||||
|
||||
# These flags *must not* be pulled up to -Wl, flags, so they can't go in
|
||||
# add-flags.sh. They must always be set, so must not be disabled by
|
||||
# NIX_LDFLAGS_SET.
|
||||
if [ -e @out@/nix-support/add-local-ldflags-before.sh ]; then
|
||||
source @out@/nix-support/add-local-ldflags-before.sh
|
||||
fi
|
||||
|
||||
|
||||
# Specify the target emulation if nothing is passed in ("-m" overrides this
|
||||
# environment variable). Ensures we never blindly fallback on targeting the host
|
||||
# platform.
|
||||
|
|
|
@ -65,5 +65,13 @@ if [ -e @out@/nix-support/cc-cflags-before ]; then
|
|||
NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="$(< @out@/nix-support/cc-cflags-before) $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@"
|
||||
fi
|
||||
|
||||
# Only add darwin min version flag if a default darwin min version is set,
|
||||
# which is a signal that we're targetting darwin.
|
||||
if [ "@darwinMinVersion@" ]; then
|
||||
mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"}
|
||||
|
||||
NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="-m@darwinPlatformForCC@-version-min=${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@} $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@"
|
||||
fi
|
||||
|
||||
# That way forked processes will not extend these environment variables again.
|
||||
export NIX_CC_WRAPPER_FLAGS_SET_@suffixSalt@=1
|
||||
|
|
|
@ -100,6 +100,18 @@ let
|
|||
else
|
||||
false;
|
||||
|
||||
|
||||
darwinPlatformForCC = optionalString stdenv.targetPlatform.isDarwin (
|
||||
if (targetPlatform.darwinPlatform == "macos" && isGNU) then "macosx"
|
||||
else targetPlatform.darwinPlatform
|
||||
);
|
||||
|
||||
darwinMinVersion = optionalString stdenv.targetPlatform.isDarwin (
|
||||
stdenv.targetPlatform.darwinMinVersion
|
||||
);
|
||||
|
||||
darwinMinVersionVariable = optionalString stdenv.targetPlatform.isDarwin
|
||||
stdenv.targetPlatform.darwinMinVersionVariable;
|
||||
in
|
||||
|
||||
# Ensure bintools matches
|
||||
|
@ -122,6 +134,7 @@ stdenv.mkDerivation {
|
|||
gnugrep_bin = if nativeTools then "" else gnugrep;
|
||||
|
||||
inherit targetPrefix suffixSalt;
|
||||
inherit darwinPlatformForCC darwinMinVersion darwinMinVersionVariable;
|
||||
|
||||
outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ];
|
||||
|
||||
|
@ -474,6 +487,10 @@ stdenv.mkDerivation {
|
|||
done
|
||||
''
|
||||
|
||||
+ optionalString stdenv.targetPlatform.isDarwin ''
|
||||
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags
|
||||
''
|
||||
|
||||
# There are a few tools (to name one libstdcxx5) which do not work
|
||||
# well with multi line flags, so make the flags single line again
|
||||
+ ''
|
||||
|
@ -486,10 +503,6 @@ stdenv.mkDerivation {
|
|||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
''
|
||||
|
||||
+ optionalString stdenv.targetPlatform.isDarwin ''
|
||||
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags
|
||||
''
|
||||
|
||||
##
|
||||
## Extra custom steps
|
||||
##
|
||||
|
|
|
@ -49,6 +49,35 @@ mangleVarBool() {
|
|||
done
|
||||
}
|
||||
|
||||
# Combine a singular value from all roles. If multiple roles are being served,
|
||||
# and the value differs in these roles then the request is impossible to
|
||||
# satisfy and we abort immediately.
|
||||
mangleVarSingle() {
|
||||
local var="$1"
|
||||
shift
|
||||
local -a role_suffixes=("$@")
|
||||
|
||||
local outputVar="${var}_@suffixSalt@"
|
||||
for suffix in "${role_suffixes[@]}"; do
|
||||
local inputVar="${var}${suffix}"
|
||||
if [ -v "$inputVar" ]; then
|
||||
if [ -v "$outputVar" ]; then
|
||||
if [ "${!outputVar}" != "${!inputVar}" ]; then
|
||||
{
|
||||
echo "Multiple conflicting values defined for $outputVar"
|
||||
echo "Existing value is ${!outputVar}"
|
||||
echo "Attempting to set to ${!inputVar} via $inputVar"
|
||||
} >&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
declare -gx ${outputVar}="${!inputVar}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
skip () {
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
echo "skipping impure path $1" >&2
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{ lib, fetchzip }:
|
||||
|
||||
let
|
||||
version = "2.1.48";
|
||||
version = "2.1.52";
|
||||
|
||||
in fetchzip {
|
||||
name = "mailcap-${version}";
|
||||
|
||||
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
|
||||
sha256 = "08d0avz8971hkggd60dk9yyd14izz24yag3prpfafbvm670jlmqg";
|
||||
sha256 = "sha256-2GRNg3zoMPMaOk2zoAx5sVIzjbQhnYJuaO8nrzWujVc=";
|
||||
|
||||
postFetch = ''
|
||||
tar -xavf $downloadedFile --strip-components=1
|
||||
substituteInPlace mailcap --replace "/usr/bin/" ""
|
||||
gzip mailcap.4
|
||||
gzip mailcap.5
|
||||
sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types
|
||||
|
||||
install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types
|
||||
install -D -m0644 -t $out/etc mailcap mime.types
|
||||
install -D -m0644 -t $out/share/man/man4 mailcap.4.gz
|
||||
install -D -m0644 -t $out/share/man/man5 mailcap.5.gz
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
, libsoup
|
||||
, libstartup_notification
|
||||
, libXtst
|
||||
, libXdamage
|
||||
, muffin
|
||||
, networkmanager
|
||||
, pkg-config
|
||||
|
@ -79,6 +80,7 @@ stdenv.mkDerivation rec {
|
|||
libsoup
|
||||
libstartup_notification
|
||||
libXtst
|
||||
libXdamage
|
||||
muffin
|
||||
networkmanager
|
||||
pkg-config
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
, gnome-autoar
|
||||
, asciidoc-full
|
||||
, bash-completion
|
||||
, mesa
|
||||
}:
|
||||
|
||||
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/gnome-shell-3.10.2.1.ebuild?revision=1.3&view=markup
|
||||
|
@ -147,6 +148,7 @@ stdenv.mkDerivation rec {
|
|||
gnome-desktop
|
||||
gnome-settings-daemon
|
||||
gobject-introspection
|
||||
mesa
|
||||
|
||||
# recording
|
||||
pipewire
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
, ninja
|
||||
, xkeyboard_config
|
||||
, libxkbfile
|
||||
, libXdamage
|
||||
, libxkbcommon
|
||||
, libXtst
|
||||
, libinput
|
||||
, libdrm
|
||||
, gsettings-desktop-schemas
|
||||
, glib
|
||||
, gtk3
|
||||
|
@ -27,6 +29,7 @@
|
|||
, libgudev
|
||||
, libwacom
|
||||
, xwayland
|
||||
, mesa
|
||||
, meson
|
||||
, gnome-settings-daemon
|
||||
, xorgserver
|
||||
|
@ -84,6 +87,7 @@ let self = stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
gettext
|
||||
mesa # needed for gbm
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
|
@ -102,12 +106,14 @@ let self = stdenv.mkDerivation rec {
|
|||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
libcanberra
|
||||
libdrm
|
||||
libgudev
|
||||
libinput
|
||||
libstartup_notification
|
||||
libwacom
|
||||
libxkbcommon
|
||||
libxkbfile
|
||||
libXdamage
|
||||
pango
|
||||
pipewire
|
||||
sysprof
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
, writeTextFile
|
||||
, writeShellScriptBin
|
||||
, xkeyboard_config
|
||||
, xorg
|
||||
, runCommand
|
||||
}:
|
||||
let
|
||||
|
@ -101,6 +102,7 @@ let
|
|||
libcanberra-gtk3
|
||||
libpulseaudio
|
||||
libxkbfile
|
||||
xorg.libXxf86vm
|
||||
polkit
|
||||
gdm
|
||||
gnome-panel
|
||||
|
|
|
@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [
|
||||
xorg.libXres
|
||||
xorg.libXpresent
|
||||
xorg.libXdamage
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, gettext, itstool, libxml2, libcanberra-gtk3, libgtop
|
||||
, libstartup_notification, gnome3, gtk3, mate-settings-daemon, wrapGAppsHook, mateUpdateScript }:
|
||||
, libXdamage, libXpresent, libstartup_notification, gnome3, gtk3, mate-settings-daemon, wrapGAppsHook, mateUpdateScript }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "marco";
|
||||
|
@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
|
|||
libxml2
|
||||
libcanberra-gtk3
|
||||
libgtop
|
||||
libXdamage
|
||||
libXpresent
|
||||
libstartup_notification
|
||||
gtk3
|
||||
gnome3.zenity
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
, granite
|
||||
, gettext
|
||||
, mutter
|
||||
, mesa
|
||||
, json-glib
|
||||
, python3
|
||||
, elementary-gtk-theme
|
||||
|
@ -55,6 +56,7 @@ stdenv.mkDerivation rec {
|
|||
json-glib
|
||||
libgee
|
||||
mutter
|
||||
mesa # for libEGL
|
||||
];
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -13,5 +13,4 @@ mkDerivation {
|
|||
ki18n kio kwindowsystem plasma-framework kcoreaddons kdbusaddons kded
|
||||
kiconthemes knotifications kwidgetsaddons
|
||||
];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -30,6 +30,13 @@ existing packages here and modify it as necessary.
|
|||
}:
|
||||
|
||||
let
|
||||
minQtVersion = "5.15";
|
||||
broken = lib.versionOlder libsForQt5.qtbase.version minQtVersion;
|
||||
maintainers = with lib.maintainers; [ ttuegel nyanloutre ];
|
||||
license = with lib.licenses; [
|
||||
lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
|
||||
];
|
||||
|
||||
srcs = import ./srcs.nix {
|
||||
inherit fetchurl;
|
||||
mirror = "mirror://kde";
|
||||
|
@ -81,14 +88,15 @@ let
|
|||
defaultSetupHook = if hasBin && hasDev then propagateBin else null;
|
||||
setupHook = args.setupHook or defaultSetupHook;
|
||||
|
||||
meta = {
|
||||
license = with lib.licenses; [
|
||||
lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ ttuegel nyanloutre ];
|
||||
homepage = "http://www.kde.org";
|
||||
} // (args.meta or {});
|
||||
meta =
|
||||
let meta = args.meta or {}; in
|
||||
meta // {
|
||||
homepage = meta.homepage or "http://www.kde.org";
|
||||
license = meta.license or license;
|
||||
maintainers = (meta.maintainers or []) ++ maintainers;
|
||||
platforms = meta.platforms or lib.platforms.linux;
|
||||
broken = meta.broken or broken;
|
||||
};
|
||||
in
|
||||
mkDerivation (args // {
|
||||
name = "${name}-${version}";
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "discover";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules gettext kdoctools python3 ];
|
||||
buildInputs = [
|
||||
# discount is needed for libmarkdown
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kactivitymanagerd";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
boost kconfig kcoreaddons kdbusaddons kglobalaccel ki18n kio kwindowsystem
|
||||
|
|
|
@ -5,5 +5,4 @@ mkDerivation {
|
|||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ qtbase ki18n ];
|
||||
outputs = [ "out" "dev" ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -8,5 +8,4 @@ mkDerivation {
|
|||
name = "kgamma5";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [ kconfig kconfigwidgets ki18n qtx11extras libXxf86vm ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15";
|
||||
}
|
||||
|
|
|
@ -14,5 +14,4 @@ mkDerivation {
|
|||
plasma-framework plasma-workspace qtx11extras
|
||||
];
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.14";
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kinfocenter";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [
|
||||
kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kscreenlocker";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [
|
||||
kcmutils kcrash kdeclarative kdelibs4support kglobalaccel kidletime kwayland
|
||||
|
|
|
@ -8,5 +8,4 @@ mkDerivation {
|
|||
name = "ksshaskpass";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [ kcoreaddons ki18n kwallet kwidgetsaddons qtbase ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "ksysguard";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [
|
||||
kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard
|
||||
|
|
|
@ -8,5 +8,4 @@ mkDerivation {
|
|||
name = "kwayland-integration";
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ kguiaddons kidletime kwindowsystem kwayland qtbase ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -15,5 +15,4 @@ mkDerivation {
|
|||
kwayland plasma-wayland-protocols wayland wayland-protocols
|
||||
];
|
||||
patches = [ ./0001-Use-KDE_INSTALL_TARGETS_DEFAULT_ARGS-when-installing.patch ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -8,5 +8,4 @@ mkDerivation {
|
|||
name = "kwrited";
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ kcoreaddons kdbusaddons ki18n knotifications kpty qtbase ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "libkscreen";
|
||||
meta = {
|
||||
broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ kwayland libXrandr qtx11extras ];
|
||||
outputs = [ "out" "dev" ];
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "libksysguard";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.14.0";
|
||||
patches = [
|
||||
./0001-qdiriterator-follow-symlinks.patch
|
||||
];
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "milou";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
kcoreaddons kdeclarative ki18n kitemmodels krunner kservice plasma-framework
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "plasma-nm";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ];
|
||||
buildInputs = [
|
||||
kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework
|
||||
|
|
|
@ -17,5 +17,4 @@ mkDerivation {
|
|||
|
||||
qtbase qtdeclarative
|
||||
];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "plasma-systemmonitor";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [
|
||||
qtquickcontrols2
|
||||
|
|
|
@ -12,5 +12,4 @@ mkDerivation {
|
|||
knotifications kwindowsystem polkit-qt
|
||||
];
|
||||
outputs = [ "out" "dev" ];
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "sddm-kcm";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
|
||||
buildInputs = [
|
||||
libpthreadstubs
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "xdg-desktop-portal-kde";
|
||||
meta.broken = lib.versionOlder qtbase.version "5.15.0";
|
||||
nativeBuildInputs = [ extra-cmake-modules gettext kdoctools ];
|
||||
buildInputs = [
|
||||
cups epoxy mesa pcre pipewire wayland wayland-protocols
|
||||
|
|
|
@ -45,6 +45,7 @@ import ./default.nix {
|
|||
aarch64-unknown-linux-gnu = "1db7a4fbddc68cd29eb9bca9fa7d0d2d9e3d59ede7ddaad66222fb4336a6bacf";
|
||||
aarch64-unknown-linux-musl = "adcc6c76a8967bacb6687b565d3cf739e35fde066b03edb745b05b52fa8b5b36";
|
||||
x86_64-apple-darwin = "1bf5a7ecf6468ce1bf9fe49c8083b3f648b40c16fbfb7539d106fe28eb0e792e";
|
||||
aarch64-apple-darwin = "1ed91a867e7b86cc4bc84c0838240f1c25acd007100ec9f7a14c4873e4b56561";
|
||||
powerpc64le-unknown-linux-gnu = "e0472589d3f9ba7ebf27f033af320e0d5cfb70222955bd8ed73ce2c9a70ae535";
|
||||
};
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ PLATFORMS=(
|
|||
aarch64-unknown-linux-gnu
|
||||
aarch64-unknown-linux-musl
|
||||
x86_64-apple-darwin
|
||||
aarch64-apple-darwin
|
||||
powerpc64le-unknown-linux-gnu
|
||||
)
|
||||
BASEURL=https://static.rust-lang.org/dist
|
||||
|
|
|
@ -0,0 +1,390 @@
|
|||
From e7b005c05dbdbce967a409abd71641281a8604bf Mon Sep 17 00:00:00 2001
|
||||
From: Senthil Kumaran <senthil@uthcode.com>
|
||||
Date: Mon, 15 Feb 2021 11:16:43 -0800
|
||||
Subject: [PATCH 24/26] [3.6] bpo-42967: only use '&' as a query string
|
||||
separator (GH-24297) (GH-24532)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
bpo-42967: [security] Address a web cache-poisoning issue reported in
|
||||
urllib.parse.parse_qsl().
|
||||
|
||||
urllib.parse will only us "&" as query string separator by default
|
||||
instead of both ";" and "&" as allowed in earlier versions. An optional
|
||||
argument seperator with default value "&" is added to specify the
|
||||
separator.
|
||||
|
||||
Co-authored-by: Éric Araujo <merwok@netwok.org>
|
||||
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
||||
Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>
|
||||
|
||||
Rebased for Python 2.7 by Michał Górny
|
||||
---
|
||||
Doc/library/cgi.rst | 7 +++-
|
||||
Doc/library/urlparse.rst | 23 ++++++++++-
|
||||
Lib/cgi.py | 20 +++++++---
|
||||
Lib/test/test_cgi.py | 29 +++++++++++---
|
||||
Lib/test/test_urlparse.py | 38 +++++++++----------
|
||||
Lib/urlparse.py | 22 ++++++++---
|
||||
.../2021-02-14-15-59-16.bpo-42967.YApqDS.rst | 1 +
|
||||
7 files changed, 100 insertions(+), 40 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2021-02-14-15-59-16.bpo-42967.YApqDS.rst
|
||||
|
||||
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
|
||||
index ecd62c8c01..b85cdd8b61 100644
|
||||
--- a/Doc/library/cgi.rst
|
||||
+++ b/Doc/library/cgi.rst
|
||||
@@ -285,10 +285,10 @@ These are useful if you want more control, or if you want to employ some of the
|
||||
algorithms implemented in this module in other circumstances.
|
||||
|
||||
|
||||
-.. function:: parse(fp[, environ[, keep_blank_values[, strict_parsing]]])
|
||||
+.. function:: parse(fp[, environ[, keep_blank_values[, strict_parsing]]], separator="&")
|
||||
|
||||
Parse a query in the environment or from a file (the file defaults to
|
||||
- ``sys.stdin`` and environment defaults to ``os.environ``). The *keep_blank_values* and *strict_parsing* parameters are
|
||||
+ ``sys.stdin`` and environment defaults to ``os.environ``). The *keep_blank_values*, *strict_parsing* and *separator* parameters are
|
||||
passed to :func:`urlparse.parse_qs` unchanged.
|
||||
|
||||
|
||||
@@ -316,6 +316,9 @@ algorithms implemented in this module in other circumstances.
|
||||
Note that this does not parse nested multipart parts --- use
|
||||
:class:`FieldStorage` for that.
|
||||
|
||||
+ .. versionchanged:: 3.6.13
|
||||
+ Added the *separator* parameter.
|
||||
+
|
||||
|
||||
.. function:: parse_header(string)
|
||||
|
||||
diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
|
||||
index 0989c88c30..2f8e4c5a44 100644
|
||||
--- a/Doc/library/urlparse.rst
|
||||
+++ b/Doc/library/urlparse.rst
|
||||
@@ -136,7 +136,7 @@ The :mod:`urlparse` module defines the following functions:
|
||||
now raise :exc:`ValueError`.
|
||||
|
||||
|
||||
-.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]], separator='&')
|
||||
|
||||
Parse a query string given as a string argument (data of type
|
||||
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a
|
||||
@@ -157,6 +157,9 @@ The :mod:`urlparse` module defines the following functions:
|
||||
read. If set, then throws a :exc:`ValueError` if there are more than
|
||||
*max_num_fields* fields read.
|
||||
|
||||
+ The optional argument *separator* is the symbol to use for separating the
|
||||
+ query arguments. It defaults to ``&``.
|
||||
+
|
||||
Use the :func:`urllib.urlencode` function to convert such dictionaries into
|
||||
query strings.
|
||||
|
||||
@@ -166,7 +169,14 @@ The :mod:`urlparse` module defines the following functions:
|
||||
.. versionchanged:: 2.7.16
|
||||
Added *max_num_fields* parameter.
|
||||
|
||||
-.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+ .. versionchanged:: 2.7.18-gentoo
|
||||
+ Added *separator* parameter with the default value of ``&``. Earlier
|
||||
+ Python versions allowed using both ``;`` and ``&`` as query parameter
|
||||
+ separator. This has been changed to allow only a single separator key,
|
||||
+ with ``&`` as the default separator.
|
||||
+
|
||||
+
|
||||
+.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]], separator='&')
|
||||
|
||||
Parse a query string given as a string argument (data of type
|
||||
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of
|
||||
@@ -186,6 +196,9 @@ The :mod:`urlparse` module defines the following functions:
|
||||
read. If set, then throws a :exc:`ValueError` if there are more than
|
||||
*max_num_fields* fields read.
|
||||
|
||||
+ The optional argument *separator* is the symbol to use for separating the
|
||||
+ query arguments. It defaults to ``&``.
|
||||
+
|
||||
Use the :func:`urllib.urlencode` function to convert such lists of pairs into
|
||||
query strings.
|
||||
|
||||
@@ -195,6 +208,12 @@ The :mod:`urlparse` module defines the following functions:
|
||||
.. versionchanged:: 2.7.16
|
||||
Added *max_num_fields* parameter.
|
||||
|
||||
+ .. versionchanged:: 2.7.18-gentoo
|
||||
+ Added *separator* parameter with the default value of ``&``. Earlier
|
||||
+ Python versions allowed using both ``;`` and ``&`` as query parameter
|
||||
+ separator. This has been changed to allow only a single separator key,
|
||||
+ with ``&`` as the default separator.
|
||||
+
|
||||
.. function:: urlunparse(parts)
|
||||
|
||||
Construct a URL from a tuple as returned by ``urlparse()``. The *parts* argument
|
||||
diff --git a/Lib/cgi.py b/Lib/cgi.py
|
||||
index 5b903e0347..9d0848b6b1 100755
|
||||
--- a/Lib/cgi.py
|
||||
+++ b/Lib/cgi.py
|
||||
@@ -121,7 +121,8 @@ log = initlog # The current logging function
|
||||
# 0 ==> unlimited input
|
||||
maxlen = 0
|
||||
|
||||
-def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
+def parse(fp=None, environ=os.environ, keep_blank_values=0,
|
||||
+ strict_parsing=0, separator='&'):
|
||||
"""Parse a query in the environment or from a file (default stdin)
|
||||
|
||||
Arguments, all optional:
|
||||
@@ -140,6 +141,9 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
strict_parsing: flag indicating what to do with parsing errors.
|
||||
If false (the default), errors are silently ignored.
|
||||
If true, errors raise a ValueError exception.
|
||||
+
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
"""
|
||||
if fp is None:
|
||||
fp = sys.stdin
|
||||
@@ -171,7 +175,8 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
else:
|
||||
qs = ""
|
||||
environ['QUERY_STRING'] = qs # XXX Shouldn't, really
|
||||
- return urlparse.parse_qs(qs, keep_blank_values, strict_parsing)
|
||||
+ return urlparse.parse_qs(qs, keep_blank_values, strict_parsing,
|
||||
+ separator=separator)
|
||||
|
||||
|
||||
# parse query string function called from urlparse,
|
||||
@@ -395,7 +400,7 @@ class FieldStorage:
|
||||
|
||||
def __init__(self, fp=None, headers=None, outerboundary="",
|
||||
environ=os.environ, keep_blank_values=0, strict_parsing=0,
|
||||
- max_num_fields=None):
|
||||
+ max_num_fields=None, separator='&'):
|
||||
"""Constructor. Read multipart/* until last part.
|
||||
|
||||
Arguments, all optional:
|
||||
@@ -430,6 +435,7 @@ class FieldStorage:
|
||||
self.keep_blank_values = keep_blank_values
|
||||
self.strict_parsing = strict_parsing
|
||||
self.max_num_fields = max_num_fields
|
||||
+ self.separator = separator
|
||||
if 'REQUEST_METHOD' in environ:
|
||||
method = environ['REQUEST_METHOD'].upper()
|
||||
self.qs_on_post = None
|
||||
@@ -613,7 +619,8 @@ class FieldStorage:
|
||||
if self.qs_on_post:
|
||||
qs += '&' + self.qs_on_post
|
||||
query = urlparse.parse_qsl(qs, self.keep_blank_values,
|
||||
- self.strict_parsing, self.max_num_fields)
|
||||
+ self.strict_parsing, self.max_num_fields,
|
||||
+ separator=self.separator)
|
||||
self.list = [MiniFieldStorage(key, value) for key, value in query]
|
||||
self.skip_lines()
|
||||
|
||||
@@ -629,7 +636,8 @@ class FieldStorage:
|
||||
query = urlparse.parse_qsl(self.qs_on_post,
|
||||
self.keep_blank_values,
|
||||
self.strict_parsing,
|
||||
- self.max_num_fields)
|
||||
+ self.max_num_fields,
|
||||
+ separator=self.separator)
|
||||
self.list.extend(MiniFieldStorage(key, value)
|
||||
for key, value in query)
|
||||
FieldStorageClass = None
|
||||
@@ -649,7 +657,7 @@ class FieldStorage:
|
||||
headers = rfc822.Message(self.fp)
|
||||
part = klass(self.fp, headers, ib,
|
||||
environ, keep_blank_values, strict_parsing,
|
||||
- max_num_fields)
|
||||
+ max_num_fields, separator=self.separator)
|
||||
|
||||
if max_num_fields is not None:
|
||||
max_num_fields -= 1
|
||||
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
|
||||
index 743c2afbd4..f414faa23b 100644
|
||||
--- a/Lib/test/test_cgi.py
|
||||
+++ b/Lib/test/test_cgi.py
|
||||
@@ -61,12 +61,9 @@ parse_strict_test_cases = [
|
||||
("", ValueError("bad query field: ''")),
|
||||
("&", ValueError("bad query field: ''")),
|
||||
("&&", ValueError("bad query field: ''")),
|
||||
- (";", ValueError("bad query field: ''")),
|
||||
- (";&;", ValueError("bad query field: ''")),
|
||||
# Should the next few really be valid?
|
||||
("=", {}),
|
||||
("=&=", {}),
|
||||
- ("=;=", {}),
|
||||
# This rest seem to make sense
|
||||
("=a", {'': ['a']}),
|
||||
("&=a", ValueError("bad query field: ''")),
|
||||
@@ -81,8 +78,6 @@ parse_strict_test_cases = [
|
||||
("a=a+b&b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
("a=a+b&a=b+a", {'a': ['a b', 'b a']}),
|
||||
("x=1&y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
- ("x=1;y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
- ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
("Hbc5161168c542333633315dee1182227:key_store_seqid=400006&cuyer=r&view=bustomer&order_id=0bb2e248638833d48cb7fed300000f1b&expire=964546263&lobale=en-US&kid=130003.300038&ss=env",
|
||||
{'Hbc5161168c542333633315dee1182227:key_store_seqid': ['400006'],
|
||||
'cuyer': ['r'],
|
||||
@@ -188,6 +183,30 @@ class CgiTests(unittest.TestCase):
|
||||
self.assertEqual(expect[k], v)
|
||||
self.assertItemsEqual(expect.values(), d.values())
|
||||
|
||||
+ def test_separator(self):
|
||||
+ parse_semicolon = [
|
||||
+ ("x=1;y=2.0", {'x': ['1'], 'y': ['2.0']}),
|
||||
+ ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
+ (";", ValueError("bad query field: ''")),
|
||||
+ (";;", ValueError("bad query field: ''")),
|
||||
+ ("=;a", ValueError("bad query field: 'a'")),
|
||||
+ (";b=a", ValueError("bad query field: ''")),
|
||||
+ ("b;=a", ValueError("bad query field: 'b'")),
|
||||
+ ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
+ ("a=a+b;a=b+a", {'a': ['a b', 'b a']}),
|
||||
+ ]
|
||||
+ for orig, expect in parse_semicolon:
|
||||
+ env = {'QUERY_STRING': orig}
|
||||
+ fs = cgi.FieldStorage(separator=';', environ=env)
|
||||
+ if isinstance(expect, dict):
|
||||
+ for key in expect.keys():
|
||||
+ expect_val = expect[key]
|
||||
+ self.assertIn(key, fs)
|
||||
+ if len(expect_val) > 1:
|
||||
+ self.assertEqual(fs.getvalue(key), expect_val)
|
||||
+ else:
|
||||
+ self.assertEqual(fs.getvalue(key), expect_val[0])
|
||||
+
|
||||
def test_log(self):
|
||||
cgi.log("Testing")
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
index 86c4a0595c..0b2107339a 100644
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -24,16 +24,20 @@ parse_qsl_test_cases = [
|
||||
("&a=b", [('a', 'b')]),
|
||||
("a=a+b&b=b+c", [('a', 'a b'), ('b', 'b c')]),
|
||||
("a=1&a=2", [('a', '1'), ('a', '2')]),
|
||||
- (";", []),
|
||||
- (";;", []),
|
||||
- (";a=b", [('a', 'b')]),
|
||||
- ("a=a+b;b=b+c", [('a', 'a b'), ('b', 'b c')]),
|
||||
- ("a=1;a=2", [('a', '1'), ('a', '2')]),
|
||||
- (b";", []),
|
||||
- (b";;", []),
|
||||
- (b";a=b", [(b'a', b'b')]),
|
||||
- (b"a=a+b;b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
|
||||
- (b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]),
|
||||
+ (b"", []),
|
||||
+ (b"&", []),
|
||||
+ (b"&&", []),
|
||||
+ (b"=", [(b'', b'')]),
|
||||
+ (b"=a", [(b'', b'a')]),
|
||||
+ (b"a", [(b'a', b'')]),
|
||||
+ (b"a=", [(b'a', b'')]),
|
||||
+ (b"&a=b", [(b'a', b'b')]),
|
||||
+ (b"a=a+b&b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
|
||||
+ (b"a=1&a=2", [(b'a', b'1'), (b'a', b'2')]),
|
||||
+ (";a=b", [(';a', 'b')]),
|
||||
+ ("a=a+b;b=b+c", [('a', 'a b;b=b c')]),
|
||||
+ (b";a=b", [(b';a', b'b')]),
|
||||
+ (b"a=a+b;b=b+c", [(b'a', b'a b;b=b c')]),
|
||||
]
|
||||
|
||||
parse_qs_test_cases = [
|
||||
@@ -57,16 +61,10 @@ parse_qs_test_cases = [
|
||||
(b"&a=b", {b'a': [b'b']}),
|
||||
(b"a=a+b&b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
|
||||
(b"a=1&a=2", {b'a': [b'1', b'2']}),
|
||||
- (";", {}),
|
||||
- (";;", {}),
|
||||
- (";a=b", {'a': ['b']}),
|
||||
- ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
- ("a=1;a=2", {'a': ['1', '2']}),
|
||||
- (b";", {}),
|
||||
- (b";;", {}),
|
||||
- (b";a=b", {b'a': [b'b']}),
|
||||
- (b"a=a+b;b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
|
||||
- (b"a=1;a=2", {b'a': [b'1', b'2']}),
|
||||
+ (";a=b", {';a': ['b']}),
|
||||
+ ("a=a+b;b=b+c", {'a': ['a b;b=b c']}),
|
||||
+ (b";a=b", {b';a': [b'b']}),
|
||||
+ (b"a=a+b;b=b+c", {b'a':[ b'a b;b=b c']}),
|
||||
]
|
||||
|
||||
class UrlParseTestCase(unittest.TestCase):
|
||||
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
|
||||
index 798b467b60..6c32727fce 100644
|
||||
--- a/Lib/urlparse.py
|
||||
+++ b/Lib/urlparse.py
|
||||
@@ -382,7 +382,8 @@ def unquote(s):
|
||||
append(item)
|
||||
return ''.join(res)
|
||||
|
||||
-def parse_qs(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
+def parse_qs(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None,
|
||||
+ separator='&'):
|
||||
"""Parse a query given as a string argument.
|
||||
|
||||
Arguments:
|
||||
@@ -402,17 +403,22 @@ def parse_qs(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
|
||||
max_num_fields: int. If set, then throws a ValueError if there
|
||||
are more than n fields read by parse_qsl().
|
||||
+
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
+
|
||||
"""
|
||||
dict = {}
|
||||
for name, value in parse_qsl(qs, keep_blank_values, strict_parsing,
|
||||
- max_num_fields):
|
||||
+ max_num_fields, separator=separator):
|
||||
if name in dict:
|
||||
dict[name].append(value)
|
||||
else:
|
||||
dict[name] = [value]
|
||||
return dict
|
||||
|
||||
-def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
+def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None,
|
||||
+ separator='&'):
|
||||
"""Parse a query given as a string argument.
|
||||
|
||||
Arguments:
|
||||
@@ -432,17 +438,23 @@ def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
max_num_fields: int. If set, then throws a ValueError if there
|
||||
are more than n fields read by parse_qsl().
|
||||
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
+
|
||||
Returns a list, as G-d intended.
|
||||
"""
|
||||
+ if not separator or (not isinstance(separator, (str, bytes))):
|
||||
+ raise ValueError("Separator must be of type string or bytes.")
|
||||
+
|
||||
# If max_num_fields is defined then check that the number of fields
|
||||
# is less than max_num_fields. This prevents a memory exhaustion DOS
|
||||
# attack via post bodies with many fields.
|
||||
if max_num_fields is not None:
|
||||
- num_fields = 1 + qs.count('&') + qs.count(';')
|
||||
+ num_fields = 1 + qs.count(separator)
|
||||
if max_num_fields < num_fields:
|
||||
raise ValueError('Max number of fields exceeded')
|
||||
|
||||
- pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')]
|
||||
+ pairs = [s1 for s1 in qs.split(separator)]
|
||||
r = []
|
||||
for name_value in pairs:
|
||||
if not name_value and not strict_parsing:
|
||||
diff --git a/Misc/NEWS.d/next/Security/2021-02-14-15-59-16.bpo-42967.YApqDS.rst b/Misc/NEWS.d/next/Security/2021-02-14-15-59-16.bpo-42967.YApqDS.rst
|
||||
new file mode 100644
|
||||
index 0000000000..f08489b414
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2021-02-14-15-59-16.bpo-42967.YApqDS.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Fix web cache poisoning vulnerability by defaulting the query args separator to ``&``, and allowing the user to choose a custom separator.
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -123,6 +123,8 @@ let
|
|||
|
||||
./CVE-2021-3177.patch
|
||||
|
||||
./CVE-2021-23336.patch
|
||||
|
||||
# The workaround is for unittests on Win64, which we don't support.
|
||||
# It does break aarch64-darwin, which we do support. See:
|
||||
# * https://bugs.python.org/issue35523
|
||||
|
|
|
@ -69,12 +69,15 @@ with pkgs;
|
|||
recursivePthLoader
|
||||
;
|
||||
};
|
||||
optionalExtensions = cond: as: if cond then as else [];
|
||||
python2Extension = import ../../../top-level/python2-packages.nix;
|
||||
extensions = lib.composeManyExtensions ((optionalExtensions (!self.isPy3k) [python2Extension]) ++ [ overrides ]);
|
||||
in lib.makeScopeWithSplicing
|
||||
pkgs.splicePackages
|
||||
pkgs.newScope
|
||||
otherSplices
|
||||
keep
|
||||
(lib.extends overrides pythonPackagesFun))
|
||||
(lib.extends extensions pythonPackagesFun))
|
||||
{
|
||||
overrides = packageOverrides;
|
||||
};
|
||||
|
@ -114,10 +117,10 @@ with pkgs;
|
|||
sourceVersion = {
|
||||
major = "3";
|
||||
minor = "8";
|
||||
patch = "8";
|
||||
patch = "9";
|
||||
suffix = "";
|
||||
};
|
||||
sha256 = "fGZCSf935EPW6g5M8OWH6ukYyjxI0IHRkV/iofG8xcw=";
|
||||
sha256 = "XjkfPsRdopVEGcqwvq79i+OIlepc4zV3w+wUlAxLlXI=";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -173,10 +176,10 @@ in {
|
|||
sourceVersion = {
|
||||
major = "3";
|
||||
minor = "9";
|
||||
patch = "2";
|
||||
patch = "4";
|
||||
suffix = "";
|
||||
};
|
||||
sha256 = "PCA0xU+BFEj1FmaNzgnSQAigcWw6eU3YY5tTiMveJH0=";
|
||||
sha256 = "Sw5mRKdvjfhkriSsUApRu/aL0Jj2oXPifTthzcqaoTQ=";
|
||||
inherit (darwin) configd;
|
||||
inherit passthruFun;
|
||||
};
|
||||
|
|
|
@ -104,11 +104,13 @@ else
|
|||
let
|
||||
inherit (python) stdenv;
|
||||
|
||||
name_ = name;
|
||||
|
||||
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
|
||||
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
]) // {
|
||||
|
||||
name = namePrefix + name;
|
||||
name = namePrefix + name_;
|
||||
|
||||
nativeBuildInputs = [
|
||||
python
|
||||
|
|
|
@ -249,18 +249,18 @@ let
|
|||
|
||||
in {
|
||||
ruby_2_6 = generic {
|
||||
version = rubyVersion "2" "6" "6" "";
|
||||
version = rubyVersion "2" "6" "7" "";
|
||||
sha256 = {
|
||||
src = "1492x795qzgp3zhpl580kd1sdp50n5hfsmpbfhdsq2rnxwyi8jrn";
|
||||
git = "1jr9v99a7awssqmw7531afbx4a8i9x5yfqyffha545g7r4s7kj50";
|
||||
src = "17m9qxalwhk95dw1qhgxbvr3kkcxs3h86yirfg5mwj35gy5pw8p4";
|
||||
git = "08gvknanwdfsaj3lmcv1bdqjf9lldphzi7gmlv3cfa8ligx2vbap";
|
||||
};
|
||||
};
|
||||
|
||||
ruby_2_7 = generic {
|
||||
version = rubyVersion "2" "7" "2" "";
|
||||
version = rubyVersion "2" "7" "3" "";
|
||||
sha256 = {
|
||||
src = "1m63461mxi3fg4y3bspbgmb0ckbbb1ldgf9xi0piwkpfsk80cmvf";
|
||||
git = "0kbgznf1yprfp9645k31ra5f4757b7fichzi0hdg6nxkj90853s0";
|
||||
src = "0f2kwn98n9h9hy1fd547s7d0a7ga8jjm4nh294bwiwnq65gaj9c9";
|
||||
git = "0vxg9w4dgpw2ig5snxmkahvzdp2yh71w8qm49g35d5hqdsql7yrx";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ patchSet, useRailsExpress, ops, patchLevel, fetchpatch }:
|
||||
|
||||
{
|
||||
"2.6.6" = ops useRailsExpress [
|
||||
"2.6.7" = ops useRailsExpress [
|
||||
"${patchSet}/patches/ruby/2.6/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
|
||||
"${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch"
|
||||
"${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch"
|
||||
];
|
||||
"2.7.2" = ops useRailsExpress [
|
||||
"2.7.3" = ops useRailsExpress [
|
||||
"${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
|
||||
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"
|
||||
"${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
, tracker
|
||||
, x11Support ? stdenv.isLinux
|
||||
, waylandSupport ? stdenv.isLinux
|
||||
, mesa
|
||||
, libGL
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, xineramaSupport ? stdenv.isLinux
|
||||
|
@ -143,7 +143,7 @@ stdenv.mkDerivation rec {
|
|||
# explicitly propagated, always needed
|
||||
Cocoa
|
||||
] ++ lib.optionals waylandSupport [
|
||||
mesa
|
||||
libGL
|
||||
wayland
|
||||
wayland-protocols
|
||||
] ++ lib.optionals xineramaSupport [
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
, tracker
|
||||
, x11Support ? stdenv.isLinux
|
||||
, waylandSupport ? stdenv.isLinux
|
||||
, mesa
|
||||
, libGL
|
||||
, vulkan-loader
|
||||
, vulkan-headers
|
||||
, wayland
|
||||
|
@ -124,7 +124,7 @@ stdenv.mkDerivation rec {
|
|||
] ++ lib.optionals trackerSupport [
|
||||
tracker
|
||||
] ++ lib.optionals waylandSupport [
|
||||
mesa
|
||||
libGL
|
||||
wayland
|
||||
wayland-protocols
|
||||
] ++ lib.optionals xineramaSupport [
|
||||
|
|
|
@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc-arch=generic" # don't guess -march=/mtune=
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{ mkDerivation, lib, extra-cmake-modules, qtbase }:
|
||||
{ mkDerivation, extra-cmake-modules, qtbase }:
|
||||
|
||||
mkDerivation {
|
||||
name = "attica";
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
broken = builtins.compareVersions qtbase.version "5.14.0" < 0;
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ qtbase ];
|
||||
outputs = [ "out" "dev" ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
kauth, kconfig, kcoreaddons, kcrash, kdbusaddons, kfilemetadata, ki18n,
|
||||
kidletime, kio, lmdb, qtbase, qtdeclarative, solid,
|
||||
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "baloo";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
kauth kconfig kcrash kdbusaddons ki18n kio kidletime lmdb qtdeclarative
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
{ mkDerivation, lib
|
||||
{ mkDerivation
|
||||
, extra-cmake-modules
|
||||
, qtbase, qtdeclarative
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "bluez-qt";
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
broken = builtins.compareVersions qtbase.version "5.7.0" < 0;
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ qtdeclarative ];
|
||||
propagatedBuildInputs = [ qtbase ];
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ mkDerivation, lib, extra-cmake-modules, gtk3, qtsvg, hicolor-icon-theme }:
|
||||
{ mkDerivation, extra-cmake-modules, gtk3, qtsvg, hicolor-icon-theme }:
|
||||
|
||||
mkDerivation {
|
||||
name = "breeze-icons";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules gtk3 ];
|
||||
buildInputs = [ qtsvg ];
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -28,6 +28,13 @@ existing packages here and modify it as necessary.
|
|||
|
||||
let
|
||||
|
||||
minQtVersion = "5.14";
|
||||
broken = lib.versionOlder libsForQt5.qtbase.version minQtVersion;
|
||||
maintainers = with lib.maintainers; [ ttuegel nyanloutre ];
|
||||
license = with lib.licenses; [
|
||||
lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
|
||||
];
|
||||
|
||||
srcs = import ./srcs.nix {
|
||||
inherit fetchurl;
|
||||
mirror = "mirror://kde";
|
||||
|
@ -72,14 +79,15 @@ let
|
|||
defaultSetupHook = if hasSeparateDev then propagateBin else null;
|
||||
setupHook = args.setupHook or defaultSetupHook;
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.kde.org";
|
||||
license = with lib.licenses; [
|
||||
lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
|
||||
];
|
||||
maintainers = with lib.maintainers; [ ttuegel nyanloutre ];
|
||||
platforms = lib.platforms.linux;
|
||||
} // (args.meta or {});
|
||||
meta =
|
||||
let meta = args.meta or {}; in
|
||||
meta // {
|
||||
homepage = meta.homepage or "http://www.kde.org";
|
||||
license = meta.license or license;
|
||||
maintainers = (meta.maintainers or []) ++ maintainers;
|
||||
platforms = meta.platforms or lib.platforms.linux;
|
||||
broken = meta.broken or broken;
|
||||
};
|
||||
|
||||
in mkDerivation (args // {
|
||||
name = "${name}-${version}";
|
||||
|
@ -158,7 +166,7 @@ let
|
|||
kiconthemes = callPackage ./kiconthemes {};
|
||||
kinit = callPackage ./kinit {};
|
||||
kio = callPackage ./kio {};
|
||||
knewstuff = callPackage ./knewstuff.nix {};
|
||||
knewstuff = callPackage ./knewstuff {};
|
||||
knotifyconfig = callPackage ./knotifyconfig.nix {};
|
||||
kparts = callPackage ./kparts.nix {};
|
||||
kpeople = callPackage ./kpeople.nix {};
|
||||
|
|
|
@ -17,6 +17,5 @@ mkDerivation {
|
|||
platforms = platforms.linux ++ platforms.darwin;
|
||||
homepage = "http://www.kde.org";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.ttuegel ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
WGET_ARGS=( https://download.kde.org/stable/frameworks/5.79/ -A '*.tar.xz' )
|
||||
WGET_ARGS=( https://download.kde.org/stable/frameworks/5.80/ -A '*.tar.xz' )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
kbookmarks, kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kio,
|
||||
knewstuff, knotifications, kpackage, kwidgetsaddons, libXcursor, qtx11extras
|
||||
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "frameworkintegration";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
kbookmarks kcompletion kconfig ki18n kio knewstuff knotifications kpackage
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
boost, kactivities, kconfig, qtbase,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "kactivities-stats";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ boost kactivities kconfig ];
|
||||
propagatedBuildInputs = [ qtbase ];
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
boost, kconfig, kcoreaddons, kio, kwindowsystem, qtbase, qtdeclarative,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "kactivities";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
boost kconfig kcoreaddons kio kwindowsystem qtdeclarative
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kapidox";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules python3 python3.pkgs.setuptools ];
|
||||
postFixup = ''
|
||||
moveToOutput bin $bin
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
bzip2, xz, qtbase, zlib,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "karchive";
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
broken = builtins.compareVersions qtbase.version "5.14.0" < 0;
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ bzip2 xz zlib ];
|
||||
propagatedBuildInputs = [ qtbase ];
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
mkDerivation, lib, propagate,
|
||||
mkDerivation, propagate,
|
||||
extra-cmake-modules, kcoreaddons, polkit-qt, qttools
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "kauth";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ polkit-qt qttools ];
|
||||
propagatedBuildInputs = [ kcoreaddons ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules, qttools,
|
||||
kcodecs, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kwidgetsaddons,
|
||||
kxmlgui, qtbase,
|
||||
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kbookmarks";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules qttools ];
|
||||
buildInputs = [
|
||||
kcodecs kconfig kconfigwidgets kcoreaddons kiconthemes kxmlgui
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
{
|
||||
mkDerivation,
|
||||
lib,
|
||||
extra-cmake-modules,
|
||||
libical
|
||||
libical,
|
||||
qtbase
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
name = "kcalendarcore";
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.nyanloutre ];
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ libical ];
|
||||
outputs = [ "out" "dev" ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
mkDerivation,
|
||||
extra-cmake-modules,
|
||||
kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews,
|
||||
kpackage, kservice, kxmlgui, qtdeclarative,
|
||||
|
@ -7,7 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
name = "kcmutils";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [
|
||||
kcoreaddons kdeclarative ki18n kiconthemes kitemviews kpackage kxmlgui
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue