Merge branch 'master' into staging-next
This commit is contained in:
commit
1b5a8a2cc6
@ -2884,6 +2884,15 @@
|
|||||||
githubId = 137306;
|
githubId = 137306;
|
||||||
name = "Michele Catalano";
|
name = "Michele Catalano";
|
||||||
};
|
};
|
||||||
|
isgy = {
|
||||||
|
email = "isgy@teiyg.com";
|
||||||
|
github = "isgy";
|
||||||
|
githubId = 13622947;
|
||||||
|
keys = [{
|
||||||
|
longkeyid = "rsa4096/0xD3E1B013B4631293";
|
||||||
|
fingerprint = "1412 816B A9FA F62F D051 1975 D3E1 B013 B463 1293";
|
||||||
|
}];
|
||||||
|
};
|
||||||
ivan = {
|
ivan = {
|
||||||
email = "ivan@ludios.org";
|
email = "ivan@ludios.org";
|
||||||
github = "ivan";
|
github = "ivan";
|
||||||
|
@ -381,15 +381,17 @@ class Machine:
|
|||||||
|
|
||||||
def succeed(self, *commands):
|
def succeed(self, *commands):
|
||||||
"""Execute each command and check that it succeeds."""
|
"""Execute each command and check that it succeeds."""
|
||||||
|
output = ""
|
||||||
for command in commands:
|
for command in commands:
|
||||||
with self.nested("must succeed: {}".format(command)):
|
with self.nested("must succeed: {}".format(command)):
|
||||||
status, output = self.execute(command)
|
(status, out) = self.execute(command)
|
||||||
if status != 0:
|
if status != 0:
|
||||||
self.log("output: {}".format(output))
|
self.log("output: {}".format(out))
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"command `{}` failed (exit code {})".format(command, status)
|
"command `{}` failed (exit code {})".format(command, status)
|
||||||
)
|
)
|
||||||
return output
|
output += out
|
||||||
|
return output
|
||||||
|
|
||||||
def fail(self, *commands):
|
def fail(self, *commands):
|
||||||
"""Execute each command and check that it fails."""
|
"""Execute each command and check that it fails."""
|
||||||
|
@ -22,17 +22,7 @@ with lib;
|
|||||||
});
|
});
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver.enable = true;
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# Automatically login as nixos.
|
|
||||||
displayManager.slim = {
|
|
||||||
enable = true;
|
|
||||||
defaultUser = "nixos";
|
|
||||||
autoLogin = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# Provide networkmanager for easy wireless configuration.
|
# Provide networkmanager for easy wireless configuration.
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
@ -10,8 +10,6 @@ with lib;
|
|||||||
|
|
||||||
services.xserver.desktopManager.gnome3.enable = true;
|
services.xserver.desktopManager.gnome3.enable = true;
|
||||||
|
|
||||||
services.xserver.displayManager.slim.enable = mkForce false;
|
|
||||||
|
|
||||||
# Auto-login as root.
|
# Auto-login as root.
|
||||||
services.xserver.displayManager.gdm.autoLogin = {
|
services.xserver.displayManager.gdm.autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,6 +13,15 @@ with lib;
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableQt4Support = false;
|
enableQt4Support = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Automatically login as nixos.
|
||||||
|
displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "nixos";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -9,12 +9,14 @@ let
|
|||||||
expandCamelCase = replaceStrings upperChars (map (s: " ${s}") lowerChars);
|
expandCamelCase = replaceStrings upperChars (map (s: " ${s}") lowerChars);
|
||||||
expandCamelCaseAttrs = mapAttrs' (name: value: nameValuePair (expandCamelCase name) value);
|
expandCamelCaseAttrs = mapAttrs' (name: value: nameValuePair (expandCamelCase name) value);
|
||||||
|
|
||||||
makeServices = (daemonType: daemonIds: extraServiceConfig:
|
makeServices = (daemonType: daemonIds:
|
||||||
mkMerge (map (daemonId:
|
mkMerge (map (daemonId:
|
||||||
{ "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName pkgs.ceph extraServiceConfig; })
|
{ "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName pkgs.ceph; })
|
||||||
daemonIds));
|
daemonIds));
|
||||||
|
|
||||||
makeService = (daemonType: daemonId: clusterName: ceph: extraServiceConfig: {
|
makeService = (daemonType: daemonId: clusterName: ceph:
|
||||||
|
let
|
||||||
|
stateDirectory = "ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}"; in {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}";
|
description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}";
|
||||||
after = [ "network-online.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
|
after = [ "network-online.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
|
||||||
@ -22,6 +24,11 @@ let
|
|||||||
partOf = [ "ceph-${daemonType}.target" ];
|
partOf = [ "ceph-${daemonType}.target" ];
|
||||||
wantedBy = [ "ceph-${daemonType}.target" ];
|
wantedBy = [ "ceph-${daemonType}.target" ];
|
||||||
|
|
||||||
|
path = [ pkgs.getopt ];
|
||||||
|
|
||||||
|
# Don't start services that are not yet initialized
|
||||||
|
unitConfig.ConditionPathExists = "/var/lib/${stateDirectory}/keyring";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
LimitNOFILE = 1048576;
|
LimitNOFILE = 1048576;
|
||||||
LimitNPROC = 1048576;
|
LimitNPROC = 1048576;
|
||||||
@ -34,22 +41,22 @@ let
|
|||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
StartLimitBurst = "5";
|
StartLimitBurst = "5";
|
||||||
StartLimitInterval = "30min";
|
StartLimitInterval = "30min";
|
||||||
|
StateDirectory = stateDirectory;
|
||||||
|
User = "ceph";
|
||||||
|
Group = if daemonType == "osd" then "disk" else "ceph";
|
||||||
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
||||||
-f --cluster ${clusterName} --id ${daemonId} --setuser ceph \
|
-f --cluster ${clusterName} --id ${daemonId}'';
|
||||||
--setgroup ${if daemonType == "osd" then "disk" else "ceph"}'';
|
} // optionalAttrs (daemonType == "osd") {
|
||||||
} // extraServiceConfig
|
ExecStartPre = ''${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}'';
|
||||||
// optionalAttrs (daemonType == "osd") { ExecStartPre = ''${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh \
|
StartLimitBurst = "30";
|
||||||
--id ${daemonId} --cluster ${clusterName}''; };
|
RestartSec = "20s";
|
||||||
} // optionalAttrs (builtins.elem daemonType [ "mds" "mon" "rgw" "mgr" ]) {
|
PrivateDevices = "no"; # osd needs disk access
|
||||||
preStart = ''
|
} // optionalAttrs ( daemonType == "mon") {
|
||||||
daemonPath="/var/lib/ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}"
|
RestartSec = "10";
|
||||||
if [ ! -d $daemonPath ]; then
|
} // optionalAttrs (lib.elem daemonType ["mgr" "mds"]) {
|
||||||
mkdir -m 755 -p $daemonPath
|
StartLimitBurst = "3";
|
||||||
chown -R ceph:ceph $daemonPath
|
};
|
||||||
fi
|
});
|
||||||
'';
|
|
||||||
} // optionalAttrs (daemonType == "osd") { path = [ pkgs.getopt ]; }
|
|
||||||
);
|
|
||||||
|
|
||||||
makeTarget = (daemonType:
|
makeTarget = (daemonType:
|
||||||
{
|
{
|
||||||
@ -58,6 +65,7 @@ let
|
|||||||
partOf = [ "ceph.target" ];
|
partOf = [ "ceph.target" ];
|
||||||
wantedBy = [ "ceph.target" ];
|
wantedBy = [ "ceph.target" ];
|
||||||
before = [ "ceph.target" ];
|
before = [ "ceph.target" ];
|
||||||
|
unitConfig.StopWhenUnneeded = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -377,22 +385,22 @@ in
|
|||||||
|
|
||||||
systemd.services = let
|
systemd.services = let
|
||||||
services = []
|
services = []
|
||||||
++ optional cfg.mon.enable (makeServices "mon" cfg.mon.daemons { RestartSec = "10"; })
|
++ optional cfg.mon.enable (makeServices "mon" cfg.mon.daemons)
|
||||||
++ optional cfg.mds.enable (makeServices "mds" cfg.mds.daemons { StartLimitBurst = "3"; })
|
++ optional cfg.mds.enable (makeServices "mds" cfg.mds.daemons)
|
||||||
++ optional cfg.osd.enable (makeServices "osd" cfg.osd.daemons { StartLimitBurst = "30";
|
++ optional cfg.osd.enable (makeServices "osd" cfg.osd.daemons)
|
||||||
RestartSec = "20s";
|
++ optional cfg.rgw.enable (makeServices "rgw" cfg.rgw.daemons)
|
||||||
PrivateDevices = "no"; # osd needs disk access
|
++ optional cfg.mgr.enable (makeServices "mgr" cfg.mgr.daemons);
|
||||||
})
|
|
||||||
++ optional cfg.rgw.enable (makeServices "rgw" cfg.rgw.daemons { })
|
|
||||||
++ optional cfg.mgr.enable (makeServices "mgr" cfg.mgr.daemons { StartLimitBurst = "3"; });
|
|
||||||
in
|
in
|
||||||
mkMerge services;
|
mkMerge services;
|
||||||
|
|
||||||
systemd.targets = let
|
systemd.targets = let
|
||||||
targets = [
|
targets = [
|
||||||
{ ceph = { description = "Ceph target allowing to start/stop all ceph service instances at once";
|
{ ceph = {
|
||||||
wantedBy = [ "multi-user.target" ]; }; }
|
description = "Ceph target allowing to start/stop all ceph service instances at once";
|
||||||
] ++ optional cfg.mon.enable (makeTarget "mon")
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
unitConfig.StopWhenUnneeded = true;
|
||||||
|
}; } ]
|
||||||
|
++ optional cfg.mon.enable (makeTarget "mon")
|
||||||
++ optional cfg.mds.enable (makeTarget "mds")
|
++ optional cfg.mds.enable (makeTarget "mds")
|
||||||
++ optional cfg.osd.enable (makeTarget "osd")
|
++ optional cfg.osd.enable (makeTarget "osd")
|
||||||
++ optional cfg.rgw.enable (makeTarget "rgw")
|
++ optional cfg.rgw.enable (makeTarget "rgw")
|
||||||
@ -401,7 +409,11 @@ in
|
|||||||
mkMerge targets;
|
mkMerge targets;
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /etc/ceph - ceph ceph - -"
|
||||||
"d /run/ceph 0770 ceph ceph -"
|
"d /run/ceph 0770 ceph ceph -"
|
||||||
];
|
"d /var/lib/ceph - ceph ceph - -"]
|
||||||
|
++ optionals cfg.mgr.enable [ "d /var/lib/ceph/mgr - ceph ceph - -"]
|
||||||
|
++ optionals cfg.mon.enable [ "d /var/lib/ceph/mon - ceph ceph - -"]
|
||||||
|
++ optionals cfg.osd.enable [ "d /var/lib/ceph/osd - ceph ceph - -"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ let
|
|||||||
'';
|
'';
|
||||||
passAsFile = [ "nixDefaults" "phpOptions" ];
|
passAsFile = [ "nixDefaults" "phpOptions" ];
|
||||||
} ''
|
} ''
|
||||||
cat $phpPackage/etc/php.ini $nixDefaultsPath $phpOptionsPath > $out
|
cat ${poolOpts.phpPackage}/etc/php.ini $nixDefaultsPath $phpOptionsPath > $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
poolOpts = { name, ... }:
|
poolOpts = { name, ... }:
|
||||||
@ -69,8 +69,6 @@ let
|
|||||||
|
|
||||||
phpOptions = mkOption {
|
phpOptions = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = cfg.phpOptions;
|
|
||||||
defaultText = "config.services.phpfpm.phpOptions";
|
|
||||||
description = ''
|
description = ''
|
||||||
"Options appended to the PHP configuration file <filename>php.ini</filename> used for this PHP-FPM pool."
|
"Options appended to the PHP configuration file <filename>php.ini</filename> used for this PHP-FPM pool."
|
||||||
'';
|
'';
|
||||||
@ -137,6 +135,7 @@ let
|
|||||||
config = {
|
config = {
|
||||||
socket = if poolOpts.listen == "" then "${runtimeDir}/${name}.sock" else poolOpts.listen;
|
socket = if poolOpts.listen == "" then "${runtimeDir}/${name}.sock" else poolOpts.listen;
|
||||||
group = mkDefault poolOpts.user;
|
group = mkDefault poolOpts.user;
|
||||||
|
phpOptions = mkBefore cfg.phpOptions;
|
||||||
|
|
||||||
settings = mapAttrs (name: mkDefault){
|
settings = mapAttrs (name: mkDefault){
|
||||||
listen = poolOpts.socket;
|
listen = poolOpts.socket;
|
||||||
|
@ -49,9 +49,6 @@ let
|
|||||||
boot.kernelModules = [ "xfs" ];
|
boot.kernelModules = [ "xfs" ];
|
||||||
|
|
||||||
services.ceph = cephConfig;
|
services.ceph = cephConfig;
|
||||||
|
|
||||||
# So that we don't have to battle systemd when bootstraping
|
|
||||||
systemd.targets.ceph.wantedBy = lib.mkForce [];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networkMonA = {
|
networkMonA = {
|
||||||
@ -107,6 +104,10 @@ let
|
|||||||
};
|
};
|
||||||
}; };
|
}; };
|
||||||
|
|
||||||
|
# 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 = { ... }: ''
|
testscript = { ... }: ''
|
||||||
startAll;
|
startAll;
|
||||||
|
|
||||||
@ -114,27 +115,6 @@ let
|
|||||||
$osd0->waitForUnit("network.target");
|
$osd0->waitForUnit("network.target");
|
||||||
$osd1->waitForUnit("network.target");
|
$osd1->waitForUnit("network.target");
|
||||||
|
|
||||||
# Create the ceph-related directories
|
|
||||||
$monA->mustSucceed(
|
|
||||||
"mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}",
|
|
||||||
"mkdir -p /var/lib/ceph/mon/ceph-${cfg.monA.name}",
|
|
||||||
"chown ceph:ceph -R /var/lib/ceph/",
|
|
||||||
"mkdir -p /etc/ceph",
|
|
||||||
"chown ceph:ceph -R /etc/ceph"
|
|
||||||
);
|
|
||||||
$osd0->mustSucceed(
|
|
||||||
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
|
||||||
"chown ceph:ceph -R /var/lib/ceph/",
|
|
||||||
"mkdir -p /etc/ceph",
|
|
||||||
"chown ceph:ceph -R /etc/ceph"
|
|
||||||
);
|
|
||||||
$osd1->mustSucceed(
|
|
||||||
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
|
||||||
"chown ceph:ceph -R /var/lib/ceph/",
|
|
||||||
"mkdir -p /etc/ceph",
|
|
||||||
"chown ceph:ceph -R /etc/ceph"
|
|
||||||
);
|
|
||||||
|
|
||||||
# Bootstrap ceph-mon daemon
|
# Bootstrap ceph-mon daemon
|
||||||
$monA->mustSucceed(
|
$monA->mustSucceed(
|
||||||
"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 /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'",
|
||||||
@ -142,6 +122,7 @@ let
|
|||||||
"sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring",
|
"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",
|
"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 ceph-mon --mkfs -i ${cfg.monA.name} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring",
|
||||||
|
"sudo -u ceph mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}/",
|
||||||
"sudo -u ceph touch /var/lib/ceph/mon/ceph-${cfg.monA.name}/done",
|
"sudo -u ceph touch /var/lib/ceph/mon/ceph-${cfg.monA.name}/done",
|
||||||
"systemctl start ceph-mon-${cfg.monA.name}"
|
"systemctl start ceph-mon-${cfg.monA.name}"
|
||||||
);
|
);
|
||||||
@ -168,12 +149,14 @@ let
|
|||||||
# Bootstrap both OSDs
|
# Bootstrap both OSDs
|
||||||
$osd0->mustSucceed(
|
$osd0->mustSucceed(
|
||||||
"mkfs.xfs /dev/vdb",
|
"mkfs.xfs /dev/vdb",
|
||||||
|
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
||||||
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
||||||
"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.osd0.name}/keyring --name osd.${cfg.osd0.name} --add-key ${cfg.osd0.key}",
|
||||||
"echo '{\"cephx_secret\": \"${cfg.osd0.key}\"}' | ceph osd new ${cfg.osd0.uuid} -i -",
|
"echo '{\"cephx_secret\": \"${cfg.osd0.key}\"}' | ceph osd new ${cfg.osd0.uuid} -i -",
|
||||||
);
|
);
|
||||||
$osd1->mustSucceed(
|
$osd1->mustSucceed(
|
||||||
"mkfs.xfs /dev/vdb",
|
"mkfs.xfs /dev/vdb",
|
||||||
|
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
||||||
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
||||||
"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.osd1.name}/keyring --name osd.${cfg.osd1.name} --add-key ${cfg.osd1.key}",
|
||||||
"echo '{\"cephx_secret\": \"${cfg.osd1.key}\"}' | ceph osd new ${cfg.osd1.uuid} -i -"
|
"echo '{\"cephx_secret\": \"${cfg.osd1.key}\"}' | ceph osd new ${cfg.osd1.uuid} -i -"
|
||||||
@ -209,22 +192,17 @@ let
|
|||||||
"ceph osd pool delete multi-node-other-test multi-node-other-test --yes-i-really-really-mean-it"
|
"ceph osd pool delete multi-node-other-test multi-node-other-test --yes-i-really-really-mean-it"
|
||||||
);
|
);
|
||||||
|
|
||||||
# As we disable the target in the config, we still want to test that it works as intended
|
# Shut down ceph on all machines in a very unpolite way
|
||||||
$osd0->mustSucceed("systemctl stop ceph-osd-${cfg.osd0.name}");
|
$monA->crash;
|
||||||
$osd1->mustSucceed("systemctl stop ceph-osd-${cfg.osd1.name}");
|
$osd0->crash;
|
||||||
$monA->mustSucceed(
|
$osd1->crash;
|
||||||
"systemctl stop ceph-mgr-${cfg.monA.name}",
|
|
||||||
"systemctl stop ceph-mon-${cfg.monA.name}"
|
# Start it up
|
||||||
);
|
$osd0->start;
|
||||||
|
$osd1->start;
|
||||||
$monA->succeed("systemctl start ceph.target");
|
$monA->start;
|
||||||
$monA->waitForUnit("ceph-mon-${cfg.monA.name}");
|
|
||||||
$monA->waitForUnit("ceph-mgr-${cfg.monA.name}");
|
# Ensure the cluster comes back up again
|
||||||
$osd0->succeed("systemctl start ceph.target");
|
|
||||||
$osd0->waitForUnit("ceph-osd-${cfg.osd0.name}");
|
|
||||||
$osd1->succeed("systemctl start ceph.target");
|
|
||||||
$osd1->waitForUnit("ceph-osd-${cfg.osd1.name}");
|
|
||||||
|
|
||||||
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
||||||
$monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'");
|
$monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'");
|
||||||
$monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
|
$monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
|
||||||
|
@ -46,9 +46,6 @@ let
|
|||||||
boot.kernelModules = [ "xfs" ];
|
boot.kernelModules = [ "xfs" ];
|
||||||
|
|
||||||
services.ceph = cephConfig;
|
services.ceph = cephConfig;
|
||||||
|
|
||||||
# So that we don't have to battle systemd when bootstraping
|
|
||||||
systemd.targets.ceph.wantedBy = lib.mkForce [];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networkMonA = {
|
networkMonA = {
|
||||||
@ -72,22 +69,15 @@ let
|
|||||||
};
|
};
|
||||||
}; };
|
}; };
|
||||||
|
|
||||||
|
# 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 = { ... }: ''
|
testscript = { ... }: ''
|
||||||
startAll;
|
startAll;
|
||||||
|
|
||||||
$monA->waitForUnit("network.target");
|
$monA->waitForUnit("network.target");
|
||||||
|
|
||||||
# Create the ceph-related directories
|
|
||||||
$monA->mustSucceed(
|
|
||||||
"mkdir -p /var/lib/ceph/mgr/ceph-${cfg.monA.name}",
|
|
||||||
"mkdir -p /var/lib/ceph/mon/ceph-${cfg.monA.name}",
|
|
||||||
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
|
||||||
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
|
||||||
"mkdir -p /etc/ceph",
|
|
||||||
"chown ceph:ceph -R /etc/ceph",
|
|
||||||
"chown ceph:ceph -R /var/lib/ceph/",
|
|
||||||
);
|
|
||||||
|
|
||||||
# Bootstrap ceph-mon daemon
|
# Bootstrap ceph-mon daemon
|
||||||
$monA->mustSucceed(
|
$monA->mustSucceed(
|
||||||
"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 /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'",
|
||||||
@ -104,8 +94,9 @@ let
|
|||||||
# Can't check ceph status until a mon is up
|
# Can't check ceph status until a mon is up
|
||||||
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
||||||
|
|
||||||
# Start the ceph-mgr daemon, it has no deps and hardly any setup
|
# Start the ceph-mgr daemon, after copying in the keyring
|
||||||
$monA->mustSucceed(
|
$monA->mustSucceed(
|
||||||
|
"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",
|
"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}"
|
"systemctl start ceph-mgr-${cfg.monA.name}"
|
||||||
);
|
);
|
||||||
@ -117,7 +108,9 @@ let
|
|||||||
$monA->mustSucceed(
|
$monA->mustSucceed(
|
||||||
"mkfs.xfs /dev/vdb",
|
"mkfs.xfs /dev/vdb",
|
||||||
"mkfs.xfs /dev/vdc",
|
"mkfs.xfs /dev/vdc",
|
||||||
|
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
||||||
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
"mount /dev/vdb /var/lib/ceph/osd/ceph-${cfg.osd0.name}",
|
||||||
|
"mkdir -p /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
||||||
"mount /dev/vdc /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
"mount /dev/vdc /var/lib/ceph/osd/ceph-${cfg.osd1.name}",
|
||||||
"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.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.osd1.name}/keyring --name osd.${cfg.osd1.name} --add-key ${cfg.osd1.key}",
|
||||||
@ -159,20 +152,17 @@ let
|
|||||||
"ceph osd pool delete single-node-other-test single-node-other-test --yes-i-really-really-mean-it"
|
"ceph osd pool delete single-node-other-test single-node-other-test --yes-i-really-really-mean-it"
|
||||||
);
|
);
|
||||||
|
|
||||||
# As we disable the target in the config, we still want to test that it works as intended
|
# Shut down ceph by stopping ceph.target.
|
||||||
$monA->mustSucceed(
|
$monA->mustSucceed("systemctl stop ceph.target");
|
||||||
"systemctl stop ceph-osd-${cfg.osd0.name}",
|
|
||||||
"systemctl stop ceph-osd-${cfg.osd1.name}",
|
# Start it up
|
||||||
"systemctl stop ceph-mgr-${cfg.monA.name}",
|
|
||||||
"systemctl stop ceph-mon-${cfg.monA.name}"
|
|
||||||
);
|
|
||||||
|
|
||||||
$monA->succeed("systemctl start ceph.target");
|
$monA->succeed("systemctl start ceph.target");
|
||||||
$monA->waitForUnit("ceph-mon-${cfg.monA.name}");
|
$monA->waitForUnit("ceph-mon-${cfg.monA.name}");
|
||||||
$monA->waitForUnit("ceph-mgr-${cfg.monA.name}");
|
$monA->waitForUnit("ceph-mgr-${cfg.monA.name}");
|
||||||
$monA->waitForUnit("ceph-osd-${cfg.osd0.name}");
|
$monA->waitForUnit("ceph-osd-${cfg.osd0.name}");
|
||||||
$monA->waitForUnit("ceph-osd-${cfg.osd1.name}");
|
$monA->waitForUnit("ceph-osd-${cfg.osd1.name}");
|
||||||
|
|
||||||
|
# Ensure the cluster comes back up again
|
||||||
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
$monA->succeed("ceph -s | grep 'mon: 1 daemons'");
|
||||||
$monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'");
|
$monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'");
|
||||||
$monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
|
$monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "xmonad";
|
name = "xmonad";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ nequissimus ];
|
maintainers = [ nequissimus ];
|
||||||
@ -21,19 +21,21 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = { ... }: ''
|
testScript = { nodes, ... }: let
|
||||||
$machine->waitForX;
|
user = nodes.machine.config.users.users.alice;
|
||||||
$machine->waitForFile("/home/alice/.Xauthority");
|
in ''
|
||||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
machine.wait_for_x()
|
||||||
$machine->sendKeys("alt-ctrl-x");
|
machine.wait_for_file("${user.home}/.Xauthority")
|
||||||
$machine->waitForWindow(qr/alice.*machine/);
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
||||||
$machine->sleep(1);
|
machine.send_chars("alt-ctrl-x")
|
||||||
$machine->screenshot("terminal");
|
machine.wait_for_window("${user.name}.*machine")
|
||||||
$machine->waitUntilSucceeds("xmonad --restart");
|
machine.sleep(1)
|
||||||
$machine->sleep(3);
|
machine.screenshot("terminal")
|
||||||
$machine->sendKeys("alt-shift-ret");
|
machine.wait_until_succeeds("xmonad --restart")
|
||||||
$machine->waitForWindow(qr/alice.*machine/);
|
machine.sleep(3)
|
||||||
$machine->sleep(1);
|
machine.send_chars("alt-shift-ret")
|
||||||
$machine->screenshot("terminal");
|
machine.wait_for_window("${user.name}.*machine")
|
||||||
|
machine.sleep(1)
|
||||||
|
machine.screenshot("terminal")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "drawio";
|
pname = "drawio";
|
||||||
version = "12.1.7";
|
version = "12.2.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
||||||
sha256 = "1vac0cz99yjlz7b186wyy4wk4sxkvlirpjmh3vw65xaxamn8spn3";
|
sha256 = "04h11gdy78py9zrs3v6y0hhhc2n1h4s0ymbvf6qn4vv4r3r9vbaw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -7,23 +7,21 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "wtf";
|
pname = "wtf";
|
||||||
version = "0.23.0";
|
version = "0.24.0";
|
||||||
|
|
||||||
overrideModAttrs = _oldAttrs : _oldAttrs // {
|
|
||||||
preBuild = ''export GOPROXY="https://gocenter.io"'';
|
|
||||||
};
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "wtfutil";
|
owner = "wtfutil";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0bhk81jmv6rq8h898lmvrh9v356310fbi82lvakmgay7nvzk9a1c";
|
sha256 = "0jz7hjcm0hfxcih2zplp47wx6lyvhhzj9ka4ljqrx0i4l7cm9ahs";
|
||||||
};
|
};
|
||||||
|
|
||||||
modSha256 = "1ndb7zbhaq0cnd8fd05fvb62qi0mxilgydz42qqz2z4fkbx9gp3m";
|
modSha256 = "04d8hvd90f7v853p23xcx38qz3ryv7kz7zjk9b131cjnd4mcv0sm";
|
||||||
|
|
||||||
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
||||||
|
|
||||||
|
subPackages = [ "." ];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -9,24 +9,26 @@
|
|||||||
, gom
|
, gom
|
||||||
, gsound
|
, gsound
|
||||||
, evolution-data-server
|
, evolution-data-server
|
||||||
|
, folks
|
||||||
, desktop-file-utils
|
, desktop-file-utils
|
||||||
, libpeas
|
, libpeas
|
||||||
, dbus
|
, dbus
|
||||||
|
, vala
|
||||||
, xorg
|
, xorg
|
||||||
, xvfb_run
|
, xvfb_run
|
||||||
, libxml2
|
, libxml2
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "calls-unstable";
|
pname = "calls";
|
||||||
version = "2019-10-09";
|
version = "unstable-2019-10-29";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "source.puri.sm";
|
domain = "source.puri.sm";
|
||||||
owner = "Librem5";
|
owner = "Librem5";
|
||||||
repo = pname;
|
repo = "calls";
|
||||||
rev = "4b4cfa04266ebbe2f3da5abd9624ea07aa159fea";
|
rev = "9fe575053d8f01c3a76a6c20d39f0816166d5afd";
|
||||||
sha256 = "0qvnddjpkh6gsywzdi24lmjlbwi0q54m1xa6hiaf1ch1j7kcv8fr";
|
sha256 = "01inx4mvrzvklwrfryw5hw9p89v8cn78m3qmv97g7a3v0h5c0n35";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -34,27 +36,29 @@ stdenv.mkDerivation rec {
|
|||||||
ninja
|
ninja
|
||||||
pkgconfig
|
pkgconfig
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
|
vala
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
modemmanager
|
modemmanager
|
||||||
libhandy
|
libhandy
|
||||||
evolution-data-server
|
evolution-data-server
|
||||||
|
folks
|
||||||
gom
|
gom
|
||||||
gsound
|
gsound
|
||||||
gtk3
|
gtk3
|
||||||
libhandy
|
libhandy
|
||||||
libpeas
|
libpeas
|
||||||
libxml2
|
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
dbus
|
dbus
|
||||||
xvfb_run
|
xvfb_run
|
||||||
xorg.xauth
|
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
|
# docs fail to build
|
||||||
|
# https://source.puri.sm/Librem5/calls/issues/99
|
||||||
"-Dgtk_doc=false"
|
"-Dgtk_doc=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -43,13 +43,13 @@ index c87565d..88b3db4 100644
|
|||||||
+ghc = fromMaybe GHC_PATHS_GHC nixGhc
|
+ghc = fromMaybe GHC_PATHS_GHC nixGhc
|
||||||
+ghc_pkg = fromMaybe GHC_PATHS_GHC_PKG nixGhcPkg
|
+ghc_pkg = fromMaybe GHC_PATHS_GHC_PKG nixGhcPkg
|
||||||
diff --git a/Setup.hs b/Setup.hs
|
diff --git a/Setup.hs b/Setup.hs
|
||||||
index fad5026..1651650 100644
|
index f2d1733..ca4792e 100644
|
||||||
--- a/Setup.hs
|
--- a/Setup.hs
|
||||||
+++ b/Setup.hs
|
+++ b/Setup.hs
|
||||||
@@ -27,13 +27,13 @@ main = defaultMainWithHooks simpleUserHooks {
|
@@ -39,13 +39,13 @@ main = defaultMainWithHooks simpleUserHooks {
|
||||||
defaultPostConf :: Args -> ConfigFlags -> PackageDescription -> LocalBuildInfo -> IO ()
|
#else
|
||||||
defaultPostConf args flags pkgdescr lbi = do
|
|
||||||
libdir_ <- rawSystemProgramStdoutConf (fromFlag (configVerbosity flags))
|
libdir_ <- rawSystemProgramStdoutConf (fromFlag (configVerbosity flags))
|
||||||
|
#endif
|
||||||
- ghcProgram (withPrograms lbi) ["--print-libdir"]
|
- ghcProgram (withPrograms lbi) ["--print-libdir"]
|
||||||
+ ghcjsProgram (withPrograms lbi) ["--print-libdir"]
|
+ ghcjsProgram (withPrograms lbi) ["--print-libdir"]
|
||||||
let libdir = reverse $ dropWhile isSpace $ reverse libdir_
|
let libdir = reverse $ dropWhile isSpace $ reverse libdir_
|
||||||
|
@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
|
|||||||
"-DWITH_ZLIB=1"
|
"-DWITH_ZLIB=1"
|
||||||
"-DWITH_ZSTD=1"
|
"-DWITH_ZSTD=1"
|
||||||
"-DWITH_GFLAGS=0"
|
"-DWITH_GFLAGS=0"
|
||||||
|
"-DUSE_RTTI=1"
|
||||||
(lib.optional
|
(lib.optional
|
||||||
(stdenv.hostPlatform.system == "i686-linux"
|
(stdenv.hostPlatform.system == "i686-linux"
|
||||||
|| stdenv.hostPlatform.system == "x86_64-linux")
|
|| stdenv.hostPlatform.system == "x86_64-linux")
|
||||||
|
@ -20,16 +20,16 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "datasette";
|
pname = "datasette";
|
||||||
version = "0.29.3";
|
version = "0.30.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "datasette";
|
repo = "datasette";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0cib7pd4z240ncck0pskzvizblhwkr42fsjpd719wdxy4scs7yqa";
|
sha256 = "07swnpz4c7vzlc69vavs1xvbhr5fa8g63kyfj1hf3zafskgjnzwy";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pytestrunner ];
|
nativeBuildInputs = [ pytestrunner ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
click
|
click
|
||||||
@ -57,15 +57,19 @@ buildPythonPackage rec {
|
|||||||
--replace "Sanic==0.7.0" "Sanic" \
|
--replace "Sanic==0.7.0" "Sanic" \
|
||||||
--replace "hupper==1.0" "hupper" \
|
--replace "hupper==1.0" "hupper" \
|
||||||
--replace "pint~=0.8.1" "pint" \
|
--replace "pint~=0.8.1" "pint" \
|
||||||
|
--replace "pluggy~=0.12.0" "pint" \
|
||||||
--replace "Jinja2==2.10.1" "Jinja2" \
|
--replace "Jinja2==2.10.1" "Jinja2" \
|
||||||
--replace "uvicorn~=0.8.4" "uvicorn"
|
--replace "uvicorn~=0.8.4" "uvicorn"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# many tests require network access
|
# many tests require network access
|
||||||
|
# test_black fails on darwin
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest --ignore tests/test_api.py \
|
pytest --ignore tests/test_api.py \
|
||||||
--ignore tests/test_csv.py \
|
--ignore tests/test_csv.py \
|
||||||
--ignore tests/test_html.py
|
--ignore tests/test_html.py \
|
||||||
|
--ignore tests/test_black.py \
|
||||||
|
-k 'not facet'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
, fetchPypi
|
, fetchPypi
|
||||||
, enum34
|
, enum34
|
||||||
, google_api_core
|
, google_api_core
|
||||||
, pytest
|
|
||||||
, mock
|
, mock
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -16,11 +15,13 @@ buildPythonPackage rec {
|
|||||||
sha256 = "f33aea6721d453901ded268dee61a01ab77d4cd215a76edc3cc61b6028299d3e";
|
sha256 = "f33aea6721d453901ded268dee61a01ab77d4cd215a76edc3cc61b6028299d3e";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest mock ];
|
checkInputs = [ mock ];
|
||||||
propagatedBuildInputs = [ enum34 google_api_core ];
|
propagatedBuildInputs = [ enum34 google_api_core ];
|
||||||
|
|
||||||
|
# pytest seems to pick up some file which overrides PYTHONPATH
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest tests/unit
|
cd tests/unit
|
||||||
|
python -m unittest discover
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
28
pkgs/development/python-modules/jsonlines/default.nix
Normal file
28
pkgs/development/python-modules/jsonlines/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ lib, fetchFromGitHub, buildPythonPackage, six
|
||||||
|
, flake8, pep8-naming, pytest, pytestcov, pytestpep8 }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "jsonlines";
|
||||||
|
version = "1.2.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "wbolster";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1f8zsqy8p9a41gqg2a5x7sppc5qhhq7gw58id2aigb270yxzs7jw";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ six ];
|
||||||
|
|
||||||
|
checkInputs = [ flake8 pep8-naming pytest pytestcov pytestpep8 ];
|
||||||
|
checkPhase = ''
|
||||||
|
pytest
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python library to simplify working with jsonlines and ndjson data";
|
||||||
|
homepage = https://github.com/wbolster/jsonlines;
|
||||||
|
maintainers = with maintainers; [ sondr3 ];
|
||||||
|
license = licenses.bsd3;
|
||||||
|
};
|
||||||
|
}
|
@ -6,6 +6,7 @@
|
|||||||
, pythonOlder
|
, pythonOlder
|
||||||
, requests
|
, requests
|
||||||
, pytest
|
, pytest
|
||||||
|
, pyjson5
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -19,7 +20,7 @@ buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ requests pytest ];
|
checkInputs = [ requests pytest ];
|
||||||
propagatedBuildInputs = [ notebook jsonschema ];
|
propagatedBuildInputs = [ notebook jsonschema pyjson5 ];
|
||||||
|
|
||||||
# test_listing test fails
|
# test_listing test fails
|
||||||
# this is a new package and not all tests pass
|
# this is a new package and not all tests pass
|
||||||
|
26
pkgs/development/python-modules/pyjson5/default.nix
Normal file
26
pkgs/development/python-modules/pyjson5/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ buildPythonPackage, lib, nose, fetchFromGitHub }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pyjson5";
|
||||||
|
version = "0.8.5";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "dpranke";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn";
|
||||||
|
};
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
checkInputs = [ nose ];
|
||||||
|
checkPhase = ''
|
||||||
|
nosetests
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python implementation of the JSON5 data format";
|
||||||
|
license = licenses.asl20;
|
||||||
|
homepage = "https://github.com/dpranke/pyjson5";
|
||||||
|
maintainers = with maintainers; [ isgy ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, isPy27
|
||||||
, mock
|
, mock
|
||||||
, pytest
|
, pytest
|
||||||
|
, selectors2
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -14,6 +16,8 @@ buildPythonPackage rec {
|
|||||||
sha256 = "0xndv47iwc9k8cp5r9r1z3r0xww0r5x5b7qsmn39gk2gsg0119c6";
|
sha256 = "0xndv47iwc9k8cp5r9r1z3r0xww0r5x5b7qsmn39gk2gsg0119c6";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = lib.optionals isPy27 [ selectors2 ];
|
||||||
|
|
||||||
checkInputs = [ mock pytest ];
|
checkInputs = [ mock pytest ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
@ -25,4 +29,4 @@ buildPythonPackage rec {
|
|||||||
homepage = https://github.com/minrk/wurlitzer;
|
homepage = https://github.com/minrk/wurlitzer;
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ stdenv,
|
{ stdenv,
|
||||||
|
mkDerivation,
|
||||||
cmake,
|
cmake,
|
||||||
elfutils,
|
elfutils,
|
||||||
extra-cmake-modules,
|
extra-cmake-modules,
|
||||||
@ -14,7 +15,7 @@
|
|||||||
threadweaver,
|
threadweaver,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "hotspot";
|
pname = "hotspot";
|
||||||
version = "1.2.0";
|
version = "1.2.0";
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ in buildFHSUserEnv rec {
|
|||||||
xorg.libX11
|
xorg.libX11
|
||||||
xorg.libXfixes
|
xorg.libXfixes
|
||||||
libGL
|
libGL
|
||||||
|
libva
|
||||||
|
|
||||||
# Not formally in runtime but needed by some games
|
# Not formally in runtime but needed by some games
|
||||||
at-spi2-atk
|
at-spi2-atk
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, stdenv, fetchurl, unzip, elasticsearch }:
|
{ lib, stdenv, fetchurl, unzip, elasticsearch }:
|
||||||
|
|
||||||
let
|
let
|
||||||
esVersion = elasticsearch.version;
|
esVersion = elasticsearch.version;
|
||||||
@ -16,27 +16,27 @@ let
|
|||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (a // {
|
stdenv.mkDerivation (a // {
|
||||||
inherit installPhase;
|
inherit installPhase;
|
||||||
|
pname = "elasticsearch-${pluginName}";
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
buildInputs = [ unzip ];
|
buildInputs = [ unzip ];
|
||||||
meta = a.meta // {
|
meta = a.meta // {
|
||||||
platforms = elasticsearch.meta.platforms;
|
platforms = elasticsearch.meta.platforms;
|
||||||
maintainers = (a.meta.maintainers or []) ++ (with stdenv.lib.maintainers; [ offline ]);
|
maintainers = (a.meta.maintainers or []) ++ (with lib.maintainers; [ offline ]);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
|
|
||||||
analysis-lemmagen = esPlugin rec {
|
analysis-lemmagen = esPlugin rec {
|
||||||
name = "elasticsearch-analysis-lemmagen-${version}";
|
pluginName = "analysis-lemmagen";
|
||||||
pluginName = "elasticsearch-analysis-lemmagen";
|
|
||||||
version = esVersion;
|
version = esVersion;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/vhyza/${pluginName}/releases/download/v${version}/${name}-plugin.zip";
|
url = "https://github.com/vhyza/${pluginName}/releases/download/v${version}/${pluginName}-${version}-plugin.zip";
|
||||||
sha256 =
|
sha256 =
|
||||||
if version == "7.0.1" then "155zj9zw81msx976c952nk926ndav1zqhmy2xih6nr82qf0p71hm"
|
if version == "7.3.1" then "1nb82z6s94mzdx1srb1pwj7cpzs8w74njap0xiqn7sg5ylk6adm8"
|
||||||
else if version == "6.7.2" then "1r176ncjbilkmri2c5rdxh5xqsrn77m1f0p98zs47czwlqh230iq"
|
else if version == "6.8.3" then "12bshvp01pp2lgwd0cn9l58axg8gdimsh4g9wfllxi1bdpv4cy53"
|
||||||
else throw "unsupported version ${version} for plugin ${pluginName}";
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
};
|
};
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/vhyza/elasticsearch-analysis-lemmagen;
|
homepage = https://github.com/vhyza/elasticsearch-analysis-lemmagen;
|
||||||
description = "LemmaGen Analysis plugin provides jLemmaGen lemmatizer as Elasticsearch token filter";
|
description = "LemmaGen Analysis plugin provides jLemmaGen lemmatizer as Elasticsearch token filter";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
@ -44,37 +44,50 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
discovery-ec2 = esPlugin rec {
|
discovery-ec2 = esPlugin rec {
|
||||||
name = "elasticsearch-discovery-ec2-${version}";
|
|
||||||
pluginName = "discovery-ec2";
|
pluginName = "discovery-ec2";
|
||||||
version = esVersion;
|
version = esVersion;
|
||||||
src = pkgs.fetchurl {
|
src = fetchurl {
|
||||||
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
||||||
sha256 =
|
sha256 =
|
||||||
if version == "7.0.1" then "0nrvralh4fygs0ys2ikg3x08jdyh9276d5w7yfncbbi0xrg9hk6g"
|
if version == "7.3.1" then "1p30by7pqnvj8dcwws51kh9s962c42qwqq07gmj4jl83zxcl8kyl"
|
||||||
else if version == "6.7.2" then "1p0cdz3lfksfd2kvlcj0syxhbx27mimsaw8q4kgjpjjjwqayg523"
|
else if version == "6.8.3" then "0pmffz761dqjpvmkl7i7xsyw1iyyspqpddxp89rjsznfc9pak5im"
|
||||||
else if version == "5.6.16" then "1300pfmnlpfm1hh2jgas8j2kqjqiqkxhr8czshj9lx0wl4ciknin"
|
|
||||||
else throw "unsupported version ${version} for plugin ${pluginName}";
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
};
|
};
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2;
|
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2;
|
||||||
description = "The EC2 discovery plugin uses the AWS API for unicast discovery.";
|
description = "The EC2 discovery plugin uses the AWS API for unicast discovery.";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
repository-s3 = esPlugin rec {
|
ingest-attachment = esPlugin rec {
|
||||||
name = "elasticsearch-repository-s3-${version}";
|
pluginName = "ingest-attachment";
|
||||||
pluginName = "repository-s3";
|
|
||||||
version = esVersion;
|
version = esVersion;
|
||||||
src = pkgs.fetchurl {
|
src = fetchurl {
|
||||||
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
||||||
sha256 =
|
sha256 =
|
||||||
if version == "7.0.1" then "17bf8m1q92j5yhgldckl4hlsfv6qgwwqdc1da9kzgidgky7jwkbc"
|
if version == "7.3.1" then "1b9l17zv6582sdcdiabwd293xx5ckc2d3h6smiv6znk5f4dxj7km"
|
||||||
else if version == "6.7.2" then "1l353zfyv3qziz8xkann9cbzx4wj5s14wnknfw351j6vgdq26l12"
|
else if version == "6.8.3" then "0kfr4i2rcwinjn31xrc2piicasjanaqcgnbif9xc7lnak2nnzmll"
|
||||||
else if version == "5.6.16" then "0k3li5xv1270ygb9lqk6ji3nngngl2im3z38k08nd627vxdrzij2"
|
|
||||||
else throw "unsupported version ${version} for plugin ${pluginName}";
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
};
|
};
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment;
|
||||||
|
description = "Ingest processor that uses Apache Tika to extract contents";
|
||||||
|
license = licenses.asl20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
repository-s3 = esPlugin rec {
|
||||||
|
pluginName = "repository-s3";
|
||||||
|
version = esVersion;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
||||||
|
sha256 =
|
||||||
|
if version == "7.3.1" then "1dqd3hd8qa1bsvd1p42k5zcrdmb66d2yspfc7g8nsz89w6b1invg"
|
||||||
|
else if version == "6.8.3" then "1mm6hj2m1db68n81rzsvlw6nisflr5ikzk5zv9nmk0z641n5vh1x"
|
||||||
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
|
};
|
||||||
|
meta = with lib; {
|
||||||
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/repository-s3;
|
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/repository-s3;
|
||||||
description = "The S3 repository plugin adds support for using AWS S3 as a repository for Snapshot/Restore.";
|
description = "The S3 repository plugin adds support for using AWS S3 as a repository for Snapshot/Restore.";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
@ -82,18 +95,16 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
repository-gcs = esPlugin rec {
|
repository-gcs = esPlugin rec {
|
||||||
name = "elasticsearch-repository-gcs-${version}";
|
|
||||||
pluginName = "repository-gcs";
|
pluginName = "repository-gcs";
|
||||||
version = esVersion;
|
version = esVersion;
|
||||||
src = pkgs.fetchurl {
|
src = fetchurl {
|
||||||
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
||||||
sha256 =
|
sha256 =
|
||||||
if version == "7.0.1" then "0a3rc2gggsj7xfncil1s53dmq799lcm82h0yncs94jnb182sbmzc"
|
if version == "7.3.1" then "0kpb1hn2fb4lh6kn96vi7265ign9lwcd0zfc19l4n6fpp8js5lfh"
|
||||||
else if version == "6.7.2" then "0afccbvb7x6y3nrwmal09vpgxyz4lar6lffw4mngalcppsk8irvv"
|
else if version == "6.8.3" then "1s2klpvnhpkrk53p64zbga3b66czi7h1a13f58kfn2cn0zfavnbk"
|
||||||
else if version == "5.6.16" then "0hwqx4yhdn4c0ccdpvgrg30ag8hy3mgxgk7h7pibdmzvy7qw7501"
|
|
||||||
else throw "unsupported version ${version} for plugin ${pluginName}";
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
};
|
};
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/repository-gcs;
|
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/repository-gcs;
|
||||||
description = "The GCS repository plugin adds support for using Google Cloud Storage as a repository for Snapshot/Restore.";
|
description = "The GCS repository plugin adds support for using Google Cloud Storage as a repository for Snapshot/Restore.";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
@ -103,23 +114,21 @@ in {
|
|||||||
search-guard = let
|
search-guard = let
|
||||||
majorVersion = lib.head (builtins.splitVersion esVersion);
|
majorVersion = lib.head (builtins.splitVersion esVersion);
|
||||||
in esPlugin rec {
|
in esPlugin rec {
|
||||||
name = "elasticsearch-search-guard-${version}";
|
|
||||||
pluginName = "search-guard";
|
pluginName = "search-guard";
|
||||||
version =
|
version =
|
||||||
if esVersion == "7.0.1" then "${esVersion}-35.0.0"
|
# https://docs.search-guard.com/latest/search-guard-versions
|
||||||
else if esVersion == "6.7.2" then "${esVersion}-25.1"
|
if esVersion == "7.3.1" then "${esVersion}-37.0.0"
|
||||||
else if esVersion == "5.6.16" then "${esVersion}-19.3"
|
else if esVersion == "6.8.3" then "${esVersion}-25.5"
|
||||||
else throw "unsupported version ${esVersion} for plugin ${pluginName}";
|
else throw "unsupported version ${esVersion} for plugin ${pluginName}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://maven/com/floragunn/${pluginName}-${majorVersion}/${version}/${pluginName}-${majorVersion}-${version}.zip";
|
url = "mirror://maven/com/floragunn/${pluginName}-${majorVersion}/${version}/${pluginName}-${majorVersion}-${version}.zip";
|
||||||
sha256 =
|
sha256 =
|
||||||
if version == "7.0.1-35.0.0" then "0wsiqq7j7ph9g2vhhvjmwrh5a2q1wzlysgr75gc35zcvqz6cq8ha"
|
if version == "7.3.1-37.0.0" then "0rb631npr6vykrhln3x6q75xwb0wndvrspwnak0rld5d7pqn1r04"
|
||||||
else if version == "6.7.2-25.1" then "119r1zibi0z40mfxrpkx0zzay0yz6c7syqmmw8i2681wmz4nksda"
|
else if version == "6.8.3-25.5" then "0a7ys9qinc0fjyka03cx9rv0pm7wnvslk234zv5vrphkrj52s1cb"
|
||||||
else if version == "5.6.16-19.3" then "1q70anihh89c53fnk8wlq9z5dx094j0f9a0y0v2zsqx18lz9ikmx"
|
|
||||||
else throw "unsupported version ${version} for plugin ${pluginName}";
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
||||||
};
|
};
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/floragunncom/search-guard;
|
homepage = https://search-guard.com;
|
||||||
description = "Elasticsearch plugin that offers encryption, authentication, and authorisation. ";
|
description = "Elasticsearch plugin that offers encryption, authentication, and authorisation. ";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "antibody";
|
pname = "antibody";
|
||||||
version = "4.1.2";
|
version = "4.2.0";
|
||||||
|
|
||||||
goPackagePath = "github.com/getantibody/antibody";
|
goPackagePath = "github.com/getantibody/antibody";
|
||||||
|
|
||||||
@ -10,15 +10,15 @@ buildGoModule rec {
|
|||||||
owner = "getantibody";
|
owner = "getantibody";
|
||||||
repo = "antibody";
|
repo = "antibody";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1csanmvix7b2sa7nsy8nh3jq6gmhp8i51xivsabm1lj2y30c0ly3";
|
sha256 = "1vds7mxqxa7xlhvjvmnh1nr1ra3dciav0qlv45s1dmwn5qrcilci";
|
||||||
};
|
};
|
||||||
|
|
||||||
modSha256 = "1p9cw92ivwgpkvjxvwd9anbd1vzhpicm9il4pg37z2kgr2ihhnyh";
|
modSha256 = "1n9sgrm16iig600f4q1cmbwwk0822isjvbyazplylha843510b17";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "The fastest shell plugin manager";
|
description = "The fastest shell plugin manager";
|
||||||
homepage = https://github.com/getantibody/antibody;
|
homepage = https://github.com/getantibody/antibody;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ worldofpeace ];
|
maintainers = with maintainers; [ filalex77 worldofpeace ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,10 @@
|
|||||||
, libxml2, zlib, lz4
|
, libxml2, zlib, lz4
|
||||||
, openldap, lttng-ust
|
, openldap, lttng-ust
|
||||||
, babeltrace, gperf
|
, babeltrace, gperf
|
||||||
|
, gtest
|
||||||
, cunit, snappy
|
, cunit, snappy
|
||||||
, rocksdb, makeWrapper
|
, rocksdb, makeWrapper
|
||||||
, leveldb, oathToolkit, removeReferencesTo
|
, leveldb, oathToolkit
|
||||||
|
|
||||||
# Optional Dependencies
|
# Optional Dependencies
|
||||||
, yasm ? null, fcgi ? null, expat ? null
|
, yasm ? null, fcgi ? null, expat ? null
|
||||||
@ -108,14 +109,14 @@ in rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkgconfig which git python3Packages.wrapPython makeWrapper
|
pkgconfig which git python3Packages.wrapPython makeWrapper
|
||||||
|
python3Packages.python # for the toPythonPath function
|
||||||
(ensureNewerSourcesHook { year = "1980"; })
|
(ensureNewerSourcesHook { year = "1980"; })
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
|
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
|
||||||
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
|
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
|
||||||
malloc zlib openldap lttng-ust babeltrace gperf cunit
|
malloc zlib openldap lttng-ust babeltrace gperf gtest cunit
|
||||||
snappy rocksdb lz4 oathToolkit leveldb
|
snappy rocksdb lz4 oathToolkit leveldb
|
||||||
removeReferencesTo
|
|
||||||
] ++ optionals stdenv.isLinux [
|
] ++ optionals stdenv.isLinux [
|
||||||
linuxHeaders utillinux libuuid udev keyutils optLibaio optLibxfs optZfs
|
linuxHeaders utillinux libuuid udev keyutils optLibaio optLibxfs optZfs
|
||||||
# ceph 14
|
# ceph 14
|
||||||
@ -124,54 +125,52 @@ in rec {
|
|||||||
optFcgi optExpat optCurl optFuse optLibedit
|
optFcgi optExpat optCurl optFuse optLibedit
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ];
|
||||||
|
|
||||||
preConfigure =''
|
preConfigure =''
|
||||||
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo"
|
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo"
|
||||||
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
|
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
|
||||||
# Since Boost 1.67 this seems to have changed
|
|
||||||
substituteInPlace CMakeLists.txt --replace "list(APPEND BOOST_COMPONENTS python)" "list(APPEND BOOST_COMPONENTS python37)"
|
|
||||||
substituteInPlace src/CMakeLists.txt --replace "Boost::python " "Boost::python37 "
|
|
||||||
|
|
||||||
# for pybind/rgw to find internal dep
|
# for pybind/rgw to find internal dep
|
||||||
export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH"
|
||||||
# install target needs to be in PYTHONPATH for "*.pth support" check to succeed
|
# install target needs to be in PYTHONPATH for "*.pth support" check to succeed
|
||||||
export PYTHONPATH=${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/python3.7/site-packages/:$out/lib/python3.7/site-packages/
|
|
||||||
|
|
||||||
patchShebangs src/spdk
|
patchShebangs src/script src/spdk src/test src/tools
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DWITH_PYTHON3=ON"
|
"-DWITH_PYTHON3=ON"
|
||||||
"-DWITH_SYSTEM_ROCKSDB=OFF"
|
"-DWITH_SYSTEM_ROCKSDB=OFF"
|
||||||
|
"-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib"
|
||||||
|
|
||||||
|
|
||||||
"-DWITH_SYSTEM_BOOST=ON"
|
"-DWITH_SYSTEM_BOOST=ON"
|
||||||
|
"-DWITH_SYSTEM_ROCKSDB=ON"
|
||||||
|
"-DWITH_SYSTEM_GTEST=ON"
|
||||||
|
"-DMGR_PYTHON_VERSION=${ceph-python-env.python.pythonVersion}"
|
||||||
"-DWITH_SYSTEMD=OFF"
|
"-DWITH_SYSTEMD=OFF"
|
||||||
"-DWITH_TESTS=OFF"
|
"-DWITH_TESTS=OFF"
|
||||||
# TODO breaks with sandbox, tries to download stuff with npm
|
# TODO breaks with sandbox, tries to download stuff with npm
|
||||||
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF"
|
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
find $lib -type f -exec remove-references-to -t $out '{}' +
|
|
||||||
mv $out/share/ceph/mgr $lib/lib/ceph/
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
export PYTHONPATH="${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})"
|
||||||
wrapProgram $out/bin/ceph-volume --prefix PYTHONPATH ":" "${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "doc" "man" ];
|
outputs = [ "out" "lib" "dev" "doc" "man" ];
|
||||||
|
|
||||||
|
doCheck = false; # uses pip to install things from the internet
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://ceph.com/;
|
homepage = https://ceph.com/;
|
||||||
description = "Distributed storage system";
|
description = "Distributed storage system";
|
||||||
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
|
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
|
||||||
maintainers = with maintainers; [ adev ak krav johanot ];
|
maintainers = with maintainers; [ adev ak krav johanot ];
|
||||||
platforms = platforms.unix;
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru.version = version;
|
passthru.version = version;
|
||||||
@ -183,7 +182,7 @@ in rec {
|
|||||||
description = "Tools needed to mount Ceph's RADOS Block Devices";
|
description = "Tools needed to mount Ceph's RADOS Block Devices";
|
||||||
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
|
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
|
||||||
maintainers = with maintainers; [ adev ak johanot krav ];
|
maintainers = with maintainers; [ adev ak johanot krav ];
|
||||||
platforms = platforms.unix;
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/{bin,etc,lib/python3.7/site-packages}
|
mkdir -p $out/{bin,etc,lib/python3.7/site-packages}
|
||||||
|
23
pkgs/tools/misc/licensor/default.nix
Normal file
23
pkgs/tools/misc/licensor/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ lib, rustPlatform, fetchFromGitHub }:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "licensor";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "raftario";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0bb6q3jpzdygjcs3apl38zzmgkn22ya5wxlqgmlp0cybqbhpi20s";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "1cvwyj2043vi5905n5126ikwbs3flfgzqkzjnzha0h8in8p3skv1";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Write licenses to stdout";
|
||||||
|
homepage = "https://github.com/raftario/licensor";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ filalex77 ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
@ -1,7 +1,10 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchPypi
|
{ stdenv, python3Packages }:
|
||||||
, iowait, psutil, pyzmq, tornado, mock }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
let
|
||||||
|
inherit (python3Packages) buildPythonApplication fetchPypi iowait psutil pyzmq tornado_4 mock;
|
||||||
|
in
|
||||||
|
|
||||||
|
buildPythonApplication rec {
|
||||||
pname = "circus";
|
pname = "circus";
|
||||||
version = "0.15.0";
|
version = "0.15.0";
|
||||||
|
|
||||||
@ -13,15 +16,14 @@ buildPythonPackage rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
# relax version restrictions to fix build
|
# relax version restrictions to fix build
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "pyzmq>=13.1.0,<17.0" "pyzmq>13.1.0" \
|
--replace "pyzmq>=13.1.0,<17.0" "pyzmq>13.1.0"
|
||||||
--replace "tornado>=3.0,<5.0" "tornado>=3.0"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ mock ];
|
checkInputs = [ mock ];
|
||||||
|
|
||||||
doCheck = false; # weird error
|
doCheck = false; # weird error
|
||||||
|
|
||||||
propagatedBuildInputs = [ iowait psutil pyzmq tornado ];
|
propagatedBuildInputs = [ iowait psutil pyzmq tornado_4 ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A process and socket manager";
|
description = "A process and socket manager";
|
@ -4,6 +4,7 @@
|
|||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gawk
|
, gawk
|
||||||
, host
|
, host
|
||||||
|
, jq
|
||||||
, lib
|
, lib
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, ncurses
|
, ncurses
|
||||||
@ -12,18 +13,25 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "twa";
|
pname = "twa";
|
||||||
version = "1.8.0";
|
version = "1.9.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "trailofbits";
|
owner = "trailofbits";
|
||||||
repo = "twa";
|
repo = "twa";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1xq35xyz5536nwrwmlp1wqa7q9jgh90ly7vdy3a5rvxnksx0b2l5";
|
sha256 = "1ab3bcyhfach9y15w8ffvqqan2qk8h62n6z8nqbgygi7n1mf6jzx";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
buildInputs = [ makeWrapper bash gawk curl netcat host.dnsutils ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
buildInputs = [ bash
|
||||||
|
curl
|
||||||
|
gawk
|
||||||
|
host.dnsutils
|
||||||
|
jq
|
||||||
|
netcat ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm 0755 twa "$out/bin/twa"
|
install -Dm 0755 twa "$out/bin/twa"
|
||||||
@ -32,7 +40,11 @@ stdenv.mkDerivation rec {
|
|||||||
install -Dm 0644 README.md "$out/share/doc/twa/README.md"
|
install -Dm 0644 README.md "$out/share/doc/twa/README.md"
|
||||||
|
|
||||||
wrapProgram "$out/bin/twa" \
|
wrapProgram "$out/bin/twa" \
|
||||||
--prefix PATH : ${stdenv.lib.makeBinPath [ curl netcat ncurses host.dnsutils ]}
|
--prefix PATH : ${stdenv.lib.makeBinPath [ curl
|
||||||
|
host.dnsutils
|
||||||
|
jq
|
||||||
|
ncurses
|
||||||
|
netcat ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
pname = "home-manager";
|
pname = "home-manager";
|
||||||
version = "2019-10-23";
|
version = "2019-10-29";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "rycee";
|
owner = "rycee";
|
||||||
repo = "home-manager";
|
repo = "home-manager";
|
||||||
rev = "1b987952b5f7d18f0bb66317cf18ffda43ad45aa";
|
rev = "450571056552c9311fcb2894328696b535265593";
|
||||||
sha256 = "1jdmxdnyd6jaiqjjkzw3qr0ia4qvmwmgfn05hbph37v03p55ah5q";
|
sha256 = "1rlv234m0bqj9x2y9wnl8z3yq8mixzq8332nqlb8fw9k8mazis6s";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "fierce";
|
pname = "fierce";
|
||||||
version = "1.3.0";
|
version = "1.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mschwager";
|
owner = "mschwager";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0cdp9rpabazyfnks30rsf3qfdi40z1bkspxk4ds9bm82kpq33jxy";
|
sha256 = "11yaz8ap9swx95j3wpqh0b6jhw6spqgfnsyn1liw9zqi4jwgiax7";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ python3.pkgs.dns ];
|
propagatedBuildInputs = [ python3.pkgs.dns ];
|
||||||
|
@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "trousers";
|
pname = "trousers";
|
||||||
version = "0.3.13";
|
version = "0.3.14";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/trousers/trousers/${version}/${pname}-${version}.tar.gz";
|
url = "mirror://sourceforge/trousers/trousers/${version}/${pname}-${version}.tar.gz";
|
||||||
sha256 = "1lvnla1c1ig2w3xvvrqg2w9qm7a1ygzy1j2gg8j7p8c87i58x45v";
|
sha256 = "0iwgsbrbb7nfqgl61x8aailwxm8akxh9gkcwxhsvf50x4qx72l6f";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
|
|
||||||
@ -16,21 +18,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configureFlags = [ "--disable-usercheck" ];
|
configureFlags = [ "--disable-usercheck" ];
|
||||||
|
|
||||||
# Attempt to remove -std=gnu89 when updating if using gcc5
|
NIX_CFLAGS_COMPILE = [ "-DALLOW_NON_TSS_CONFIG_FILE" ];
|
||||||
NIX_CFLAGS_COMPILE = "-std=gnu89 -DALLOW_NON_TSS_CONFIG_FILE";
|
enableParallelBuilding = true;
|
||||||
NIX_LDFLAGS = "-lgcc_s";
|
|
||||||
|
|
||||||
# Fix broken libtool file
|
|
||||||
preFixup = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
||||||
sed 's,-lcrypto,-L${openssl.out}/lib -lcrypto,' -i $out/lib/libtspi.la
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Trusted computing software stack";
|
description = "Trusted computing software stack";
|
||||||
homepage = http://trousers.sourceforge.net/;
|
homepage = http://trousers.sourceforge.net/;
|
||||||
license = licenses.cpl10;
|
license = licenses.bsd3;
|
||||||
maintainers = [ maintainers.ak ];
|
maintainers = [ maintainers.ak ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2311,6 +2311,8 @@ in
|
|||||||
buildGoModule = buildGo112Module;
|
buildGoModule = buildGo112Module;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
circus = callPackage ../tools/networking/circus { };
|
||||||
|
|
||||||
# Cleanup before 20.03:
|
# Cleanup before 20.03:
|
||||||
citrix_receiver = throw "citrix_receiver has been discontinued by Citrix (https://docs.citrix.com/en-us/citrix-workspace-app.html). Please use citrix_workspace.";
|
citrix_receiver = throw "citrix_receiver has been discontinued by Citrix (https://docs.citrix.com/en-us/citrix-workspace-app.html). Please use citrix_workspace.";
|
||||||
citrix_receiver_13_10_0 = citrix_receiver;
|
citrix_receiver_13_10_0 = citrix_receiver;
|
||||||
@ -2969,6 +2971,7 @@ in
|
|||||||
evemu = callPackage ../tools/system/evemu { };
|
evemu = callPackage ../tools/system/evemu { };
|
||||||
|
|
||||||
# The latest version used by elasticsearch, logstash, kibana and the the beats from elastic.
|
# The latest version used by elasticsearch, logstash, kibana and the the beats from elastic.
|
||||||
|
# When updating make sure to update all plugins or they will break!
|
||||||
elk6Version = "6.8.3";
|
elk6Version = "6.8.3";
|
||||||
elk7Version = "7.3.1";
|
elk7Version = "7.3.1";
|
||||||
|
|
||||||
@ -4388,6 +4391,8 @@ in
|
|||||||
|
|
||||||
libsmi = callPackage ../development/libraries/libsmi { };
|
libsmi = callPackage ../development/libraries/libsmi { };
|
||||||
|
|
||||||
|
licensor = callPackage ../tools/misc/licensor { };
|
||||||
|
|
||||||
lesspipe = callPackage ../tools/misc/lesspipe { };
|
lesspipe = callPackage ../tools/misc/lesspipe { };
|
||||||
|
|
||||||
liquidsoap = callPackage ../tools/audio/liquidsoap/full.nix {
|
liquidsoap = callPackage ../tools/audio/liquidsoap/full.nix {
|
||||||
@ -6757,9 +6762,7 @@ in
|
|||||||
|
|
||||||
trilium = callPackage ../applications/office/trilium { };
|
trilium = callPackage ../applications/office/trilium { };
|
||||||
|
|
||||||
trousers = callPackage ../tools/security/trousers {
|
trousers = callPackage ../tools/security/trousers { };
|
||||||
openssl = openssl_1_0_2;
|
|
||||||
};
|
|
||||||
|
|
||||||
trx = callPackage ../tools/audio/trx { };
|
trx = callPackage ../tools/audio/trx { };
|
||||||
|
|
||||||
@ -25337,9 +25340,7 @@ in
|
|||||||
|
|
||||||
zimg = callPackage ../development/libraries/zimg { };
|
zimg = callPackage ../development/libraries/zimg { };
|
||||||
|
|
||||||
wtf = callPackage ../applications/misc/wtf {
|
wtf = callPackage ../applications/misc/wtf { };
|
||||||
buildGoModule = buildGo112Module;
|
|
||||||
};
|
|
||||||
|
|
||||||
zk-shell = callPackage ../applications/misc/zk-shell { };
|
zk-shell = callPackage ../applications/misc/zk-shell { };
|
||||||
|
|
||||||
|
@ -1643,8 +1643,6 @@ in {
|
|||||||
|
|
||||||
cmarkgfm = callPackage ../development/python-modules/cmarkgfm { };
|
cmarkgfm = callPackage ../development/python-modules/cmarkgfm { };
|
||||||
|
|
||||||
circus = callPackage ../development/python-modules/circus {};
|
|
||||||
|
|
||||||
colorcet = callPackage ../development/python-modules/colorcet { };
|
colorcet = callPackage ../development/python-modules/colorcet { };
|
||||||
|
|
||||||
coloredlogs = callPackage ../development/python-modules/coloredlogs { };
|
coloredlogs = callPackage ../development/python-modules/coloredlogs { };
|
||||||
@ -1964,6 +1962,8 @@ in {
|
|||||||
|
|
||||||
impacket = callPackage ../development/python-modules/impacket { };
|
impacket = callPackage ../development/python-modules/impacket { };
|
||||||
|
|
||||||
|
jsonlines = callPackage ../development/python-modules/jsonlines { };
|
||||||
|
|
||||||
jsonrpc-async = callPackage ../development/python-modules/jsonrpc-async { };
|
jsonrpc-async = callPackage ../development/python-modules/jsonrpc-async { };
|
||||||
|
|
||||||
jsonrpc-base = callPackage ../development/python-modules/jsonrpc-base { };
|
jsonrpc-base = callPackage ../development/python-modules/jsonrpc-base { };
|
||||||
@ -4689,6 +4689,8 @@ in {
|
|||||||
|
|
||||||
pyhocon = callPackage ../development/python-modules/pyhocon { };
|
pyhocon = callPackage ../development/python-modules/pyhocon { };
|
||||||
|
|
||||||
|
pyjson5 = callPackage ../development/python-modules/pyjson5 {};
|
||||||
|
|
||||||
pymaging = callPackage ../development/python-modules/pymaging { };
|
pymaging = callPackage ../development/python-modules/pymaging { };
|
||||||
|
|
||||||
pymaging_png = callPackage ../development/python-modules/pymaging_png { };
|
pymaging_png = callPackage ../development/python-modules/pymaging_png { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user