Merge branch 'master' into staging
A few thousand rebuilds from master, again. Hydra: ?compare=1422362
This commit is contained in:
commit
1fcd92ce92
@ -663,6 +663,7 @@
|
||||
thpham = "Thomas Pham <thomas.pham@ithings.ch>";
|
||||
timbertson = "Tim Cuthbertson <tim@gfxmonk.net>";
|
||||
timokau = "Timo Kaufmann <timokau@zoho.com>";
|
||||
tiramiseb = "Sébastien Maccagnoni <sebastien@maccagnoni.eu>";
|
||||
titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
|
||||
tnias = "Philipp Bartsch <phil@grmr.de>";
|
||||
tohl = "Tomas Hlavaty <tom@logand.com>";
|
||||
@ -693,6 +694,7 @@
|
||||
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
|
||||
vdemeester = "Vincent Demeester <vincent@sbr.pm>";
|
||||
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
|
||||
vidbina = "David Asabina <vid@bina.me>";
|
||||
vifino = "Adrian Pistol <vifino@tty.sh>";
|
||||
vinymeuh = "VinyMeuh <vinymeuh@gmail.com>";
|
||||
viric = "Lluís Batlle i Rossell <viric@viric.name>";
|
||||
|
@ -403,6 +403,7 @@
|
||||
./services/monitoring/vnstat.nix
|
||||
./services/monitoring/zabbix-agent.nix
|
||||
./services/monitoring/zabbix-server.nix
|
||||
./services/network-filesystems/beegfs.nix
|
||||
./services/network-filesystems/cachefilesd.nix
|
||||
./services/network-filesystems/davfs2.nix
|
||||
./services/network-filesystems/drbd.nix
|
||||
|
@ -1,39 +1,372 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with types;
|
||||
|
||||
let
|
||||
|
||||
# Converts a plan like
|
||||
# { "1d" = "1h"; "1w" = "1d"; }
|
||||
# into
|
||||
# "1d=>1h,1w=>1d"
|
||||
attrToPlan = attrs: concatStringsSep "," (builtins.attrValues (
|
||||
mapAttrs (n: v: "${n}=>${v}") attrs));
|
||||
|
||||
planDescription = ''
|
||||
The znapzend backup plan to use for the source.
|
||||
</para>
|
||||
<para>
|
||||
The plan specifies how often to backup and for how long to keep the
|
||||
backups. It consists of a series of retention periodes to interval
|
||||
associations:
|
||||
</para>
|
||||
<para>
|
||||
<literal>
|
||||
retA=>intA,retB=>intB,...
|
||||
</literal>
|
||||
</para>
|
||||
<para>
|
||||
Both intervals and retention periods are expressed in standard units
|
||||
of time or multiples of them. You can use both the full name or a
|
||||
shortcut according to the following listing:
|
||||
</para>
|
||||
<para>
|
||||
<literal>
|
||||
second|sec|s, minute|min, hour|h, day|d, week|w, month|mon|m, year|y
|
||||
</literal>
|
||||
</para>
|
||||
<para>
|
||||
See <citerefentry><refentrytitle>znapzendzetup</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more info.
|
||||
'';
|
||||
planExample = "1h=>10min,1d=>1h,1w=>1d,1m=>1w,1y=>1m";
|
||||
|
||||
# A type for a string of the form number{b|k|M|G}
|
||||
mbufferSizeType = str // {
|
||||
check = x: str.check x && builtins.isList (builtins.match "^[0-9]+[bkMG]$" x);
|
||||
description = "string of the form number{b|k|M|G}";
|
||||
};
|
||||
|
||||
# Type for a string that must contain certain other strings (the list parameter).
|
||||
# Note that these would need regex escaping.
|
||||
stringContainingStrings = list: let
|
||||
matching = s: map (str: builtins.match ".*${str}.*" s) list;
|
||||
in str // {
|
||||
check = x: str.check x && all isList (matching x);
|
||||
description = "string containing all of the characters ${concatStringsSep ", " list}";
|
||||
};
|
||||
|
||||
timestampType = stringContainingStrings [ "%Y" "%m" "%d" "%H" "%M" "%S" ];
|
||||
|
||||
destType = srcConfig: submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
||||
label = mkOption {
|
||||
type = str;
|
||||
description = "Label for this destination. Defaults to the attribute name.";
|
||||
};
|
||||
|
||||
plan = mkOption {
|
||||
type = str;
|
||||
description = planDescription;
|
||||
example = planExample;
|
||||
};
|
||||
|
||||
dataset = mkOption {
|
||||
type = str;
|
||||
description = "Dataset name to send snapshots to.";
|
||||
example = "tank/main";
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = nullOr str;
|
||||
description = ''
|
||||
Host to use for the destination dataset. Can be prefixed with
|
||||
<literal>user@</literal> to specify the ssh user.
|
||||
'';
|
||||
default = null;
|
||||
example = "john@example.com";
|
||||
};
|
||||
|
||||
presend = mkOption {
|
||||
type = nullOr str;
|
||||
description = ''
|
||||
Command to run before sending the snapshot to the destination.
|
||||
Intended to run a remote script via <command>ssh</command> on the
|
||||
destination, e.g. to bring up a backup disk or server or to put a
|
||||
zpool online/offline. See also <option>postsend</option>.
|
||||
'';
|
||||
default = null;
|
||||
example = "ssh root@bserv zpool import -Nf tank";
|
||||
};
|
||||
|
||||
postsend = mkOption {
|
||||
type = nullOr str;
|
||||
description = ''
|
||||
Command to run after sending the snapshot to the destination.
|
||||
Intended to run a remote script via <command>ssh</command> on the
|
||||
destination, e.g. to bring up a backup disk or server or to put a
|
||||
zpool online/offline. See also <option>presend</option>.
|
||||
'';
|
||||
default = null;
|
||||
example = "ssh root@bserv zpool export tank";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
label = mkDefault name;
|
||||
plan = mkDefault srcConfig.plan;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
srcType = submodule ({ name, config, ... }: {
|
||||
options = {
|
||||
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to enable this source.";
|
||||
default = true;
|
||||
};
|
||||
|
||||
recursive = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to do recursive snapshots.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
mbuffer = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to use <command>mbuffer</command>.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = nullOr ints.u16;
|
||||
description = ''
|
||||
Port to use for <command>mbuffer</command>.
|
||||
</para>
|
||||
<para>
|
||||
If this is null, it will run <command>mbuffer</command> through
|
||||
ssh.
|
||||
</para>
|
||||
<para>
|
||||
If this is not null, it will run <command>mbuffer</command>
|
||||
directly through TCP, which is not encrypted but faster. In that
|
||||
case the given port needs to be open on the destination host.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = mbufferSizeType;
|
||||
description = ''
|
||||
The size for <command>mbuffer</command>.
|
||||
Supports the units b, k, M, G.
|
||||
'';
|
||||
default = "1G";
|
||||
example = "128M";
|
||||
};
|
||||
};
|
||||
|
||||
presnap = mkOption {
|
||||
type = nullOr str;
|
||||
description = ''
|
||||
Command to run before snapshots are taken on the source dataset,
|
||||
e.g. for database locking/flushing. See also
|
||||
<option>postsnap</option>.
|
||||
'';
|
||||
default = null;
|
||||
example = literalExample ''
|
||||
''${pkgs.mariadb}/bin/mysql -e "set autocommit=0;flush tables with read lock;\\! ''${pkgs.coreutils}/bin/sleep 600" & ''${pkgs.coreutils}/bin/echo $! > /tmp/mariadblock.pid ; sleep 10
|
||||
'';
|
||||
};
|
||||
|
||||
postsnap = mkOption {
|
||||
type = nullOr str;
|
||||
description = ''
|
||||
Command to run after snapshots are taken on the source dataset,
|
||||
e.g. for database unlocking. See also <option>presnap</option>.
|
||||
'';
|
||||
default = null;
|
||||
example = literalExample ''
|
||||
''${pkgs.coreutils}/bin/kill `''${pkgs.coreutils}/bin/cat /tmp/mariadblock.pid`;''${pkgs.coreutils}/bin/rm /tmp/mariadblock.pid
|
||||
'';
|
||||
};
|
||||
|
||||
timestampFormat = mkOption {
|
||||
type = timestampType;
|
||||
description = ''
|
||||
The timestamp format to use for constructing snapshot names.
|
||||
The syntax is <literal>strftime</literal>-like. The string must
|
||||
consist of the mandatory <literal>%Y %m %d %H %M %S</literal>.
|
||||
Optionally <literal>- _ . :</literal> characters as well as any
|
||||
alphanumeric character are allowed. If suffixed by a
|
||||
<literal>Z</literal>, times will be in UTC.
|
||||
'';
|
||||
default = "%Y-%m-%d-%H%M%S";
|
||||
example = "znapzend-%m.%d.%Y-%H%M%SZ";
|
||||
};
|
||||
|
||||
sendDelay = mkOption {
|
||||
type = int;
|
||||
description = ''
|
||||
Specify delay (in seconds) before sending snaps to the destination.
|
||||
May be useful if you want to control sending time.
|
||||
'';
|
||||
default = 0;
|
||||
example = 60;
|
||||
};
|
||||
|
||||
plan = mkOption {
|
||||
type = str;
|
||||
description = planDescription;
|
||||
example = planExample;
|
||||
};
|
||||
|
||||
dataset = mkOption {
|
||||
type = str;
|
||||
description = "The dataset to use for this source.";
|
||||
example = "tank/home";
|
||||
};
|
||||
|
||||
destinations = mkOption {
|
||||
type = loaOf (destType config);
|
||||
description = "Additional destinations.";
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
local = {
|
||||
dataset = "btank/backup";
|
||||
presend = "zpool import -N btank";
|
||||
postsend = "zpool export btank";
|
||||
};
|
||||
remote = {
|
||||
host = "john@example.com";
|
||||
dataset = "tank/john";
|
||||
};
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
dataset = mkDefault name;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
### Generating the configuration from here
|
||||
|
||||
cfg = config.services.znapzend;
|
||||
|
||||
onOff = b: if b then "on" else "off";
|
||||
nullOff = b: if isNull b then "off" else toString b;
|
||||
stripSlashes = replaceStrings [ "/" ] [ "." ];
|
||||
|
||||
attrsToFile = config: concatStringsSep "\n" (builtins.attrValues (
|
||||
mapAttrs (n: v: "${n}=${v}") config));
|
||||
|
||||
mkDestAttrs = dst: with dst;
|
||||
mapAttrs' (n: v: nameValuePair "dst_${label}${n}" v) ({
|
||||
"" = optionalString (! isNull host) "${host}:" + dataset;
|
||||
_plan = plan;
|
||||
} // optionalAttrs (presend != null) {
|
||||
_precmd = presend;
|
||||
} // optionalAttrs (postsend != null) {
|
||||
_pstcmd = postsend;
|
||||
});
|
||||
|
||||
mkSrcAttrs = srcCfg: with srcCfg; {
|
||||
enabled = onOff enable;
|
||||
mbuffer = with mbuffer; if enable then "${pkgs.mbuffer}/bin/mbuffer"
|
||||
+ optionalString (port != null) ":${toString port}" else "off";
|
||||
mbuffer_size = mbuffer.size;
|
||||
post_znap_cmd = nullOff postsnap;
|
||||
pre_znap_cmd = nullOff presnap;
|
||||
recursive = onOff recursive;
|
||||
src = dataset;
|
||||
src_plan = plan;
|
||||
tsformat = timestampFormat;
|
||||
zend_delay = toString sendDelay;
|
||||
} // fold (a: b: a // b) {} (
|
||||
map mkDestAttrs (builtins.attrValues destinations)
|
||||
);
|
||||
|
||||
files = mapAttrs' (n: srcCfg: let
|
||||
fileText = attrsToFile (mkSrcAttrs srcCfg);
|
||||
in {
|
||||
name = srcCfg.dataset;
|
||||
value = pkgs.writeText (stripSlashes srcCfg.dataset) fileText;
|
||||
}) cfg.zetup;
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.znapzend = {
|
||||
enable = mkEnableOption "ZnapZend daemon";
|
||||
enable = mkEnableOption "ZnapZend ZFS backup daemon";
|
||||
|
||||
logLevel = mkOption {
|
||||
default = "debug";
|
||||
example = "warning";
|
||||
type = lib.types.enum ["debug" "info" "warning" "err" "alert"];
|
||||
description = "The log level when logging to file. Any of debug, info, warning, err, alert. Default in daemonized form is debug.";
|
||||
type = enum ["debug" "info" "warning" "err" "alert"];
|
||||
description = ''
|
||||
The log level when logging to file. Any of debug, info, warning, err,
|
||||
alert. Default in daemonized form is debug.
|
||||
'';
|
||||
};
|
||||
|
||||
logTo = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "syslog::daemon";
|
||||
example = "/var/log/znapzend.log";
|
||||
description = "Where to log to (syslog::<facility> or <filepath>).";
|
||||
description = ''
|
||||
Where to log to (syslog::<facility> or <filepath>).
|
||||
'';
|
||||
};
|
||||
|
||||
noDestroy = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Does all changes to the filesystem except destroy.";
|
||||
};
|
||||
|
||||
autoCreation = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Automatically create the destination dataset if it does not exists.";
|
||||
};
|
||||
|
||||
zetup = mkOption {
|
||||
type = loaOf srcType;
|
||||
description = "Znapzend configuration.";
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
"tank/home" = {
|
||||
# Make snapshots of tank/home every hour, keep those for 1 day,
|
||||
# keep every days snapshot for 1 month, etc.
|
||||
plan = "1d=>1h,1m=>1d,1y=>1m";
|
||||
recursive = true;
|
||||
# Send all those snapshots to john@example.com:rtank/john as well
|
||||
destinations.remote = {
|
||||
host = "john@example.com";
|
||||
dataset = "rtank/john";
|
||||
};
|
||||
};
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
pure = mkOption {
|
||||
type = bool;
|
||||
description = ''
|
||||
Do not persist any stateful znapzend setups. If this option is
|
||||
enabled, your previously set znapzend setups will be cleared and only
|
||||
the ones defined with this module will be applied.
|
||||
'';
|
||||
default = false;
|
||||
description = "Automatically create the dataset on dest if it does not exists.";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -49,12 +382,30 @@ in
|
||||
|
||||
path = with pkgs; [ zfs mbuffer openssh ];
|
||||
|
||||
preStart = optionalString cfg.pure ''
|
||||
echo Resetting znapzend zetups
|
||||
${pkgs.znapzend}/bin/znapzendzetup list \
|
||||
| grep -oP '(?<=\*\*\* backup plan: ).*(?= \*\*\*)' \
|
||||
| xargs ${pkgs.znapzend}/bin/znapzendzetup delete
|
||||
'' + concatStringsSep "\n" (mapAttrsToList (dataset: config: ''
|
||||
echo Importing znapzend zetup ${config} for dataset ${dataset}
|
||||
${pkgs.znapzend}/bin/znapzendzetup import --write ${dataset} ${config}
|
||||
'') files);
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.znapzend}/bin/znapzend --logto=${cfg.logTo} --loglevel=${cfg.logLevel} ${optionalString cfg.noDestroy "--nodestroy"} ${optionalString cfg.autoCreation "--autoCreation"}";
|
||||
ExecStart = let
|
||||
args = concatStringsSep " " [
|
||||
"--logto=${cfg.logTo}"
|
||||
"--loglevel=${cfg.logLevel}"
|
||||
(optionalString cfg.noDestroy "--nodestroy")
|
||||
(optionalString cfg.autoCreation "--autoCreation")
|
||||
]; in "${pkgs.znapzend}/bin/znapzend ${args}";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ infinisil ];
|
||||
}
|
||||
|
343
nixos/modules/services/network-filesystems/beegfs.nix
Normal file
343
nixos/modules/services/network-filesystems/beegfs.nix
Normal file
@ -0,0 +1,343 @@
|
||||
{ config, lib, pkgs, ...} :
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.beegfs;
|
||||
|
||||
# functions for the generations of config files
|
||||
|
||||
configMgmtd = name: cfg: pkgs.writeText "mgmt-${name}.conf" ''
|
||||
storeMgmtdDirectory = ${cfg.mgmtd.storeDir}
|
||||
storeAllowFirstRunInit = false
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
connPortShift = ${toString cfg.connPortShift}
|
||||
|
||||
${cfg.mgmtd.extraConfig}
|
||||
'';
|
||||
|
||||
configAdmon = name: cfg: pkgs.writeText "admon-${name}.conf" ''
|
||||
sysMgmtdHost = ${cfg.mgmtdHost}
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
connPortShift = ${toString cfg.connPortShift}
|
||||
|
||||
${cfg.admon.extraConfig}
|
||||
'';
|
||||
|
||||
configMeta = name: cfg: pkgs.writeText "meta-${name}.conf" ''
|
||||
storeMetaDirectory = ${cfg.meta.storeDir}
|
||||
sysMgmtdHost = ${cfg.mgmtdHost}
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
connPortShift = ${toString cfg.connPortShift}
|
||||
storeAllowFirstRunInit = false
|
||||
|
||||
${cfg.mgmtd.extraConfig}
|
||||
'';
|
||||
|
||||
configStorage = name: cfg: pkgs.writeText "storage-${name}.conf" ''
|
||||
storeStorageDirectory = ${cfg.storage.storeDir}
|
||||
sysMgmtdHost = ${cfg.mgmtdHost}
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
connPortShift = ${toString cfg.connPortShift}
|
||||
storeAllowFirstRunInit = false
|
||||
|
||||
${cfg.storage.extraConfig}
|
||||
'';
|
||||
|
||||
configHelperd = name: cfg: pkgs.writeText "helperd-${name}.conf" ''
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
${cfg.helperd.extraConfig}
|
||||
'';
|
||||
|
||||
configClientFilename = name : "/etc/beegfs/client-${name}.conf";
|
||||
|
||||
configClient = name: cfg: ''
|
||||
sysMgmtdHost = ${cfg.mgmtdHost}
|
||||
connAuthFile = ${cfg.connAuthFile}
|
||||
connPortShift = ${toString cfg.connPortShift}
|
||||
|
||||
${cfg.client.extraConfig}
|
||||
'';
|
||||
|
||||
serviceList = [
|
||||
{ service = "admon"; cfgFile = configAdmon; }
|
||||
{ service = "meta"; cfgFile = configMeta; }
|
||||
{ service = "mgmtd"; cfgFile = configMgmtd; }
|
||||
{ service = "storage"; cfgFile = configStorage; }
|
||||
];
|
||||
|
||||
# functions to generate systemd.service entries
|
||||
|
||||
systemdEntry = service: cfgFile: (mapAttrs' ( name: cfg:
|
||||
(nameValuePair "beegfs-${service}-${name}" (mkIf cfg."${service}".enable {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
serviceConfig = rec {
|
||||
ExecStart = ''
|
||||
${pkgs.beegfs}/bin/beegfs-${service} \
|
||||
cfgFile=${cfgFile name cfg} \
|
||||
pidFile=${PIDFile}
|
||||
'';
|
||||
PIDFile = "/run/beegfs-${service}-${name}.pid";
|
||||
TimeoutStopSec = "300";
|
||||
};
|
||||
}))) cfg);
|
||||
|
||||
systemdHelperd = mapAttrs' ( name: cfg:
|
||||
(nameValuePair "beegfs-helperd-${name}" (mkIf cfg.client.enable {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
serviceConfig = rec {
|
||||
ExecStart = ''
|
||||
${pkgs.beegfs}/bin/beegfs-helperd \
|
||||
cfgFile=${configHelperd name cfg} \
|
||||
pidFile=${PIDFile}
|
||||
'';
|
||||
PIDFile = "/run/beegfs-helperd-${name}.pid";
|
||||
TimeoutStopSec = "300";
|
||||
};
|
||||
}))) cfg;
|
||||
|
||||
# wrappers to beegfs tools. Avoid typing path of config files
|
||||
utilWrappers = mapAttrsToList ( name: cfg:
|
||||
( pkgs.runCommand "beegfs-utils-${name}" { nativeBuildInputs = [ pkgs.makeWrapper ]; } ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
makeWrapper ${pkgs.beegfs}/bin/beegfs-check-servers \
|
||||
$out/bin/beegfs-check-servers-${name} \
|
||||
--add-flags "-c ${configClientFilename name}" \
|
||||
--prefix PATH : ${lib.makeBinPath [ pkgs.beegfs ]}
|
||||
|
||||
makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \
|
||||
$out/bin/beegfs-ctl-${name} \
|
||||
--add-flags "--cfgFile=${configClientFilename name}"
|
||||
|
||||
makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \
|
||||
$out/bin/beegfs-df-${name} \
|
||||
--add-flags "--cfgFile=${configClientFilename name}" \
|
||||
--add-flags --listtargets \
|
||||
--add-flags --hidenodeid \
|
||||
--add-flags --pools \
|
||||
--add-flags --spaceinfo
|
||||
|
||||
makeWrapper ${pkgs.beegfs}/bin/beegfs-fsck \
|
||||
$out/bin/beegfs-fsck-${name} \
|
||||
--add-flags "--cfgFile=${configClientFilename name}"
|
||||
''
|
||||
)) cfg;
|
||||
in
|
||||
{
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.beegfsEnable = mkEnableOption "BeeGFS";
|
||||
|
||||
services.beegfs = mkOption {
|
||||
default = {};
|
||||
description = ''
|
||||
BeeGFS configurations. Every mount point requires a separate configuration.
|
||||
'';
|
||||
type = with types; attrsOf (submodule ({ config, ... } : {
|
||||
options = {
|
||||
mgmtdHost = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
example = "master";
|
||||
description = ''Hostname of managament host.'';
|
||||
};
|
||||
|
||||
connAuthFile = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "/etc/my.key";
|
||||
description = "File containing shared secret authentication.";
|
||||
};
|
||||
|
||||
connPortShift = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
example = 5;
|
||||
description = ''
|
||||
For each additional beegfs configuration shift all
|
||||
service TCP/UDP ports by at least 5.
|
||||
'';
|
||||
};
|
||||
|
||||
client = {
|
||||
enable = mkEnableOption "BeeGFS client";
|
||||
|
||||
mount = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Create fstab entry automatically";
|
||||
};
|
||||
|
||||
mountPoint = mkOption {
|
||||
type = types.str;
|
||||
default = "/run/beegfs";
|
||||
description = ''
|
||||
Mount point under which the beegfs filesytem should be mounted.
|
||||
If mounted manually the mount option specifing the config file is needed:
|
||||
cfgFile=/etc/beegfs/beegfs-client-<name>.conf
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional lines for beegfs-client.conf.
|
||||
See documentation for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
helperd = {
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional lines for beegfs-helperd.conf. See documentation
|
||||
for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
mgmtd = {
|
||||
enable = mkEnableOption "BeeGFS mgmtd daemon";
|
||||
|
||||
storeDir = mkOption {
|
||||
type = types.path;
|
||||
default = null;
|
||||
example = "/data/beegfs-mgmtd";
|
||||
description = ''
|
||||
Data directory for mgmtd.
|
||||
Must not be shared with other beegfs daemons.
|
||||
This directory must exist and it must be initialized
|
||||
with beegfs-setup-mgmtd, e.g. "beegfs-setup-mgmtd -C -p <storeDir>"
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional lines for beegfs-mgmtd.conf. See documentation
|
||||
for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
admon = {
|
||||
enable = mkEnableOption "BeeGFS admon daemon";
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional lines for beegfs-admon.conf. See documentation
|
||||
for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
enable = mkEnableOption "BeeGFS meta data daemon";
|
||||
|
||||
storeDir = mkOption {
|
||||
type = types.path;
|
||||
default = null;
|
||||
example = "/data/beegfs-meta";
|
||||
description = ''
|
||||
Data directory for meta data service.
|
||||
Must not be shared with other beegfs daemons.
|
||||
The underlying filesystem must be mounted with xattr turned on.
|
||||
This directory must exist and it must be initialized
|
||||
with beegfs-setup-meta, e.g.
|
||||
"beegfs-setup-meta -C -s <serviceID> -p <storeDir>"
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional lines for beegfs-meta.conf. See documentation
|
||||
for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
storage = {
|
||||
enable = mkEnableOption "BeeGFS storage daemon";
|
||||
|
||||
storeDir = mkOption {
|
||||
type = types.path;
|
||||
default = null;
|
||||
example = "/data/beegfs-storage";
|
||||
description = ''
|
||||
Data directories for storage service.
|
||||
Must not be shared with other beegfs daemons.
|
||||
The underlying filesystem must be mounted with xattr turned on.
|
||||
This directory must exist and it must be initialized
|
||||
with beegfs-setup-storage, e.g.
|
||||
"beegfs-setup-storage -C -s <serviceID> -i <storageTargetID> -p <storeDir>"
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
Addional lines for beegfs-storage.conf. See documentation
|
||||
for further details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config =
|
||||
mkIf config.services.beegfsEnable {
|
||||
|
||||
environment.systemPackages = utilWrappers;
|
||||
|
||||
# Put the client.conf files in /etc since they are needed
|
||||
# by the commandline tools
|
||||
environment.etc = mapAttrs' ( name: cfg:
|
||||
(nameValuePair "beegfs/client-${name}.conf" (mkIf (cfg.client.enable)
|
||||
{
|
||||
enable = true;
|
||||
text = configClient name cfg;
|
||||
}))) cfg;
|
||||
|
||||
# Kernel module, we need it only once per host.
|
||||
boot = mkIf (
|
||||
foldr (a: b: a || b) false
|
||||
(map (x: x.client.enable) (collect (x: x ? client) cfg)))
|
||||
{
|
||||
kernelModules = [ "beegfs" ];
|
||||
extraModulePackages = [ pkgs.linuxPackages.beegfs-module ];
|
||||
};
|
||||
|
||||
# generate fstab entries
|
||||
fileSystems = mapAttrs' (name: cfg:
|
||||
(nameValuePair cfg.client.mountPoint (optionalAttrs cfg.client.mount (mkIf cfg.client.enable {
|
||||
device = "beegfs_nodev";
|
||||
fsType = "beegfs";
|
||||
mountPoint = cfg.client.mountPoint;
|
||||
options = [ "cfgFile=${configClientFilename name}" "_netdev" ];
|
||||
})))) cfg;
|
||||
|
||||
# generate systemd services
|
||||
systemd.services = systemdHelperd //
|
||||
foldr (a: b: a // b) {}
|
||||
(map (x: systemdEntry x.service x.cfgFile) serviceList);
|
||||
};
|
||||
}
|
@ -3,16 +3,13 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
xcfg = config.services.xserver;
|
||||
pcfg = config.hardware.pulseaudio;
|
||||
cfg = xcfg.desktopManager.xfce;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
services.xserver.desktopManager.xfce = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
@ -125,9 +122,7 @@ in
|
||||
[ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ];
|
||||
|
||||
environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.xfce.gvfs}/lib/gio/modules" ];
|
||||
environment.variables.GDK_PIXBUF_MODULE_FILE = [
|
||||
"$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-*/*/loaders.cache)"
|
||||
];
|
||||
environment.variables.GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
|
||||
|
||||
# Enable helpful DBus services.
|
||||
services.udisks2.enable = true;
|
||||
|
@ -170,7 +170,7 @@ in {
|
||||
|
||||
disableWhileTyping = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
default = false;
|
||||
description =
|
||||
''
|
||||
Disable input method while typing.
|
||||
|
@ -232,6 +232,7 @@ in rec {
|
||||
tests.atd = callTest tests/atd.nix {};
|
||||
tests.acme = callTest tests/acme.nix {};
|
||||
tests.avahi = callTest tests/avahi.nix {};
|
||||
tests.beegfs = callTest tests/beegfs.nix {};
|
||||
tests.bittorrent = callTest tests/bittorrent.nix {};
|
||||
tests.blivet = callTest tests/blivet.nix {};
|
||||
tests.boot = callSubTests tests/boot.nix {};
|
||||
|
115
nixos/tests/beegfs.nix
Normal file
115
nixos/tests/beegfs.nix
Normal file
@ -0,0 +1,115 @@
|
||||
import ./make-test.nix ({ pkgs, ... } :
|
||||
|
||||
let
|
||||
connAuthFile="beegfs/auth-def.key";
|
||||
|
||||
client = { config, pkgs, lib, ... } : {
|
||||
networking.firewall.enable = false;
|
||||
services.beegfsEnable = true;
|
||||
services.beegfs.default = {
|
||||
mgmtdHost = "mgmt";
|
||||
connAuthFile = "/etc/${connAuthFile}";
|
||||
client = {
|
||||
mount = false;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = pkgs.lib.mkVMOverride # FIXME: this should be creatd by the module
|
||||
[ { mountPoint = "/beegfs";
|
||||
device = "default";
|
||||
fsType = "beegfs";
|
||||
options = [ "cfgFile=/etc/beegfs/client-default.conf" "_netdev" ];
|
||||
}
|
||||
];
|
||||
|
||||
environment.etc."${connAuthFile}" = {
|
||||
enable = true;
|
||||
text = "ThisIsALousySecret";
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
server = service : { config, pkgs, lib, ... } : {
|
||||
networking.firewall.enable = false;
|
||||
boot.initrd.postDeviceCommands = ''
|
||||
${pkgs.e2fsprogs}/bin/mkfs.ext4 -L data /dev/vdb
|
||||
'';
|
||||
|
||||
virtualisation.emptyDiskImages = [ 4096 ];
|
||||
|
||||
fileSystems = pkgs.lib.mkVMOverride
|
||||
[ { mountPoint = "/data";
|
||||
device = "/dev/disk/by-label/data";
|
||||
fsType = "ext4";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ beegfs ];
|
||||
environment.etc."${connAuthFile}" = {
|
||||
enable = true;
|
||||
text = "ThisIsALousySecret";
|
||||
mode = "0600";
|
||||
};
|
||||
|
||||
services.beegfsEnable = true;
|
||||
services.beegfs.default = {
|
||||
mgmtdHost = "mgmt";
|
||||
connAuthFile = "/etc/${connAuthFile}";
|
||||
"${service}" = {
|
||||
enable = true;
|
||||
storeDir = "/data";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
name = "beegfs";
|
||||
|
||||
nodes = {
|
||||
meta = server "meta";
|
||||
mgmt = server "mgmtd";
|
||||
storage1 = server "storage";
|
||||
storage2 = server "storage";
|
||||
client1 = client;
|
||||
client2 = client;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# Initalize the data directories
|
||||
$mgmt->waitForUnit("default.target");
|
||||
$mgmt->succeed("beegfs-setup-mgmtd -C -f -p /data");
|
||||
$mgmt->succeed("systemctl start beegfs-mgmtd-default");
|
||||
|
||||
$meta->waitForUnit("default.target");
|
||||
$meta->succeed("beegfs-setup-meta -C -f -s 1 -p /data");
|
||||
$meta->succeed("systemctl start beegfs-meta-default");
|
||||
|
||||
$storage1->waitForUnit("default.target");
|
||||
$storage1->succeed("beegfs-setup-storage -C -f -s 1 -i 1 -p /data");
|
||||
$storage1->succeed("systemctl start beegfs-storage-default");
|
||||
|
||||
$storage2->waitForUnit("default.target");
|
||||
$storage2->succeed("beegfs-setup-storage -C -f -s 2 -i 2 -p /data");
|
||||
$storage2->succeed("systemctl start beegfs-storage-default");
|
||||
|
||||
#
|
||||
|
||||
# Basic test
|
||||
$client1->waitForUnit("beegfs.mount");
|
||||
$client1->succeed("beegfs-check-servers-default");
|
||||
$client1->succeed("echo test > /beegfs/test");
|
||||
$client2->waitForUnit("beegfs.mount");
|
||||
$client2->succeed("test -e /beegfs/test");
|
||||
$client2->succeed("cat /beegfs/test | grep test");
|
||||
|
||||
# test raid0/stripping
|
||||
$client1->succeed("dd if=/dev/urandom bs=1M count=10 of=/beegfs/striped");
|
||||
$client2->succeed("cat /beegfs/striped > /dev/null");
|
||||
|
||||
# check if fs is still healthy
|
||||
$client1->succeed("beegfs-fsck-default --checkfs");
|
||||
'';
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, python3, python3Packages }:
|
||||
{ stdenv, fetchurl, python3, python3Packages, zbar }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "electrum-${version}";
|
||||
@ -38,6 +38,7 @@ python3Packages.buildPythonApplication rec {
|
||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
||||
# Recording the creation timestamps introduces indeterminism to the build
|
||||
sed -i '/Created: .*/d' gui/qt/icons_rc.py
|
||||
sed -i "s|name = 'libzbar.*'|name='${zbar}/lib/libzbar.so'|" lib/qrscanner.py
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tint2-${version}";
|
||||
version = "16.0";
|
||||
version = "16.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "o9000";
|
||||
repo = "tint2";
|
||||
rev = version;
|
||||
sha256 = "04h32f9yybxb2v6bwmlyjzr8gg8jv4iidhpwaq3zhg44iz2b75j0";
|
||||
sha256 = "0qhp1i24b03g15393lf8jd2ykznh6kvwvf7k7yqdb99zv5i8r75z";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -1,16 +1,21 @@
|
||||
{ stdenv, fetchFromGitHub, asciidoc-full, gettext
|
||||
, gobjectIntrospection, gtk3, hicolor_icon_theme, libnotify, librsvg
|
||||
, pythonPackages, udisks2, wrapGAppsHook }:
|
||||
, udisks2, wrapGAppsHook
|
||||
, docopt
|
||||
, pygobject3
|
||||
, pyyaml
|
||||
, pythonPackages
|
||||
}:
|
||||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
name = "udiskie-${version}";
|
||||
version = "1.7.2";
|
||||
version = "1.7.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coldfix";
|
||||
repo = "udiskie";
|
||||
rev = version;
|
||||
sha256 = "1p732gi6lhwcqxvsa0pknb6jmhy3kgv3yzz7xzmdzhy47m312965";
|
||||
sha256 = "1yv1faq81n3vspf3jprcs5v21l2fchy3m3pc7lk8jb0xqlnh60x4";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -21,8 +26,8 @@ pythonPackages.buildPythonApplication rec {
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
gettext gobjectIntrospection gtk3 libnotify pythonPackages.docopt
|
||||
pythonPackages.pygobject3 pythonPackages.pyyaml udisks2
|
||||
gettext gobjectIntrospection gtk3 libnotify docopt
|
||||
pygobject3 pyyaml udisks2
|
||||
];
|
||||
|
||||
postBuild = "make -C doc";
|
||||
|
@ -2,15 +2,15 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "quaternion-${version}";
|
||||
version = "0.0.4";
|
||||
version = "0.0.5";
|
||||
|
||||
# libqmatrixclient doesn't support dynamic linking as of 0.1 so we simply pull in the source
|
||||
# libqmatrixclient doesn't support dynamic linking as of 0.2 so we simply pull in the source
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "QMatrixClient";
|
||||
repo = "Quaternion";
|
||||
rev = "v${version}";
|
||||
sha256 = "1nbxlflm94pb19gdwb95z92kzg4px97dmp8av3mj4imk1ysnyrvi";
|
||||
sha256 = "14xmaq446aggqhpcilahrw2mr5gf2mlr1xzyp7r6amrnmnqsyxrd";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase qtquickcontrols libqmatrixclient ];
|
||||
|
67
pkgs/applications/science/electronics/bitscope/common.nix
Normal file
67
pkgs/applications/science/electronics/bitscope/common.nix
Normal file
@ -0,0 +1,67 @@
|
||||
{ atk
|
||||
, buildFHSUserEnv
|
||||
, cairo
|
||||
, dpkg
|
||||
, fetchurl
|
||||
, gdk_pixbuf
|
||||
, glib
|
||||
, gtk2-x11
|
||||
, makeWrapper
|
||||
, pango
|
||||
, stdenv
|
||||
, writeScriptBin
|
||||
, xorg
|
||||
}:
|
||||
|
||||
{ src, toolName, version, ... } @ attrs:
|
||||
let
|
||||
wrapBinary = libPaths: binaryName: ''
|
||||
wrapProgram "$out/bin/${binaryName}" \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
|
||||
'';
|
||||
pkg = stdenv.mkDerivation (rec {
|
||||
inherit (attrs) version src;
|
||||
|
||||
name = "${toolName}-${version}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://bitscope.com/software/;
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [
|
||||
vidbina
|
||||
];
|
||||
} // (attrs.meta or {});
|
||||
|
||||
buildInputs = [
|
||||
dpkg
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
libs = attrs.libs or [
|
||||
atk
|
||||
cairo
|
||||
gdk_pixbuf
|
||||
glib
|
||||
gtk2-x11
|
||||
pango
|
||||
xorg.libX11
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
unpackPhase = attrs.unpackPhase or ''
|
||||
dpkg-deb -x ${attrs.src} ./
|
||||
'';
|
||||
|
||||
installPhase = attrs.installPhase or ''
|
||||
mkdir -p "$out/bin"
|
||||
cp -a usr/* "$out/"
|
||||
${(wrapBinary libs) attrs.toolName}
|
||||
'';
|
||||
});
|
||||
in buildFHSUserEnv {
|
||||
name = attrs.toolName;
|
||||
meta = pkg.meta;
|
||||
runScript = "${pkg.outPath}/bin/${attrs.toolName}";
|
||||
}
|
153
pkgs/applications/science/electronics/bitscope/packages.nix
Normal file
153
pkgs/applications/science/electronics/bitscope/packages.nix
Normal file
@ -0,0 +1,153 @@
|
||||
{ buildFHSUserEnv
|
||||
, callPackage
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
let
|
||||
wrapBinary = libPaths: binaryName: ''
|
||||
wrapProgram "$out/bin/${binaryName}" \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
|
||||
'';
|
||||
mkBitscope = callPackage (import ./common.nix) { };
|
||||
in {
|
||||
chart = let
|
||||
toolName = "bitscope-chart";
|
||||
version = "2.0.FK22M";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Multi-channel waveform data acquisition and chart recording application";
|
||||
homepage = "http://bitscope.com/software/chart/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "08mc82pjamyyyhh15sagsv0sc7yx5v5n54bg60fpj7v41wdwrzxw";
|
||||
};
|
||||
};
|
||||
|
||||
console = let
|
||||
toolName = "bitscope-console";
|
||||
version = "1.0.FK29A";
|
||||
in mkBitscope {
|
||||
# NOTE: this is meant as a demo by BitScope
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Demonstrative communications program designed to make it easy to talk to any model BitScope";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "00b4gxwz7w6pmfrcz14326b24kl44hp0gzzqcqxwi5vws3f0y49d";
|
||||
};
|
||||
};
|
||||
|
||||
display = let
|
||||
toolName = "bitscope-display";
|
||||
version = "1.0.EC17A";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Display diagnostic application for BitScope";
|
||||
homepage = "http://bitscope.com/software/display/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "05xr5mnka1v3ibcasg74kmj6nlv1nmn3lca1wv77whkq85cmz0s1";
|
||||
};
|
||||
};
|
||||
|
||||
dso = let
|
||||
toolName = "bitscope-dso";
|
||||
version = "2.8.FE22H";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Test and measurement software for BitScope";
|
||||
homepage = "http://bitscope.com/software/dso/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0fc6crfkprj78dxxhvhbn1dx1db5chm0cpwlqpqv8sz6whp12mcj";
|
||||
};
|
||||
};
|
||||
|
||||
logic = let
|
||||
toolName = "bitscope-logic";
|
||||
version = "1.2.FC20C";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Mixed signal logic timing and serial protocol analysis software for BitScope";
|
||||
home = "http://bitscope.com/software/logic/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0lkb7z9gfkiyxdwh4dq1zxfls8gzdw0na1vrrbgnxfg3klv4xns3";
|
||||
};
|
||||
};
|
||||
|
||||
meter = let
|
||||
toolName = "bitscope-meter";
|
||||
version = "2.0.FK22G";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Automated oscilloscope, voltmeter and frequency meter for BitScope";
|
||||
homepage = "http://bitscope.com/software/logic/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0nirbci6ymhk4h4bck2s4wbsl5r9yndk2jvvv72zwkg21248mnbp";
|
||||
};
|
||||
};
|
||||
|
||||
proto = let
|
||||
toolName = "bitscope-proto";
|
||||
version = "0.9.FG13B";
|
||||
in mkBitscope rec {
|
||||
inherit toolName version;
|
||||
# NOTE: this is meant as a demo by BitScope
|
||||
# NOTE: clicking on logo produces error
|
||||
# TApplication.HandleException Executable not found: "http://bitscope.com/blog/DK/?p=DK15A"
|
||||
|
||||
meta = {
|
||||
description = "Demonstrative prototype oscilloscope built using the BitScope Library";
|
||||
homepage = "http://bitscope.com/blog/DK/?p=DK15A";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "1ybjfbh3narn29ll4nci4b7rnxy0hj3wdfm4v8c6pjr8pfvv9spy";
|
||||
};
|
||||
};
|
||||
|
||||
server = let
|
||||
toolName = "bitscope-server";
|
||||
version = "1.0.FK26A";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Remote access server solution for any BitScope";
|
||||
homepage = "http://bitscope.com/software/server/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "1079n7msq6ks0n4aasx40rd4q99w8j9hcsaci71nd2im2jvjpw9a";
|
||||
};
|
||||
};
|
||||
}
|
28
pkgs/applications/science/logic/sapic/default.nix
Normal file
28
pkgs/applications/science/logic/sapic/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchurl, unzip, ocaml }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sapic-${version}";
|
||||
version = "0.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://sapic.gforge.inria.fr/${name}.zip";
|
||||
sha256 = "1ckl090lpyfh90mkjhnpcys5grs3nrl9wlbn9nfkxxnaivn2yx9y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [ ocaml ];
|
||||
patches = [ ./native.patch ]; # create a native binary, not a bytecode one
|
||||
|
||||
buildPhase = "make depend && make";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ./sapic $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Stateful applied Pi Calculus for protocol verification";
|
||||
homepage = http://sapic.gforge.inria.fr/;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
38
pkgs/applications/science/logic/sapic/native.patch
Normal file
38
pkgs/applications/science/logic/sapic/native.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a1de94d..f9e2eb8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
TARGET = sapic
|
||||
-OBJS=lexer.cmo apip.cmo firsttranslation.cmo main.cmo #secondtranslation.cmo thirdtranslation.cmo main.cmo
|
||||
+OBJS=lexer.cmx apip.cmx firsttranslation.cmx main.cmx
|
||||
|
||||
sapic: $(OBJS)
|
||||
- ocamlc -o $@ $(OBJS)
|
||||
+ ocamlopt.opt -o $@ $(OBJS)
|
||||
|
||||
depend:
|
||||
ocamldep *.ml *.mli > .depend
|
||||
@@ -13,17 +13,17 @@ clean:
|
||||
rm -rf *.cmi *.cmo $(TARGET)
|
||||
rm -rf apip.ml apip.mli lexer.ml lexer.mli
|
||||
|
||||
-.SUFFIXES: .ml .mli .mll .mly .cmo .cmi
|
||||
+.SUFFIXES: .ml .mli .mll .mly .cmo .cmi .cmx
|
||||
|
||||
-.ml.cmo:
|
||||
- ocamlc -c $<
|
||||
+.ml.cmx:
|
||||
+ ocamlopt.opt -c $<
|
||||
.mli.cmi:
|
||||
- ocamlc -c $<
|
||||
+ ocamlopt.opt -c $<
|
||||
.mll.ml:
|
||||
ocamllex $<
|
||||
.mly.ml:
|
||||
ocamlyacc $<
|
||||
.ml.mli:
|
||||
- ocamlc -i $< > $@
|
||||
+ ocamlopt.opt -i $< > $@
|
||||
|
||||
-include .depend
|
87
pkgs/applications/science/logic/tamarin-prover/default.nix
Normal file
87
pkgs/applications/science/logic/tamarin-prover/default.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ haskell, haskellPackages, mkDerivation, fetchFromGitHub, lib
|
||||
# the following are non-haskell dependencies
|
||||
, makeWrapper, which, maude, graphviz, sapic
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.3.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tamarin-prover";
|
||||
repo = "tamarin-prover";
|
||||
rev = "8e823691ad3325bce8921617b013735523d74557";
|
||||
sha256 = "0rr2syl9xhv17bwky5p39mhn0bypr24h8pld1xidxv87vy7vk7nr";
|
||||
};
|
||||
|
||||
# tamarin has its own dependencies, but they're kept inside the repo,
|
||||
# no submodules. this factors out the common metadata among all derivations
|
||||
common = pname: src: {
|
||||
inherit pname version src;
|
||||
|
||||
license = lib.licenses.gpl3;
|
||||
homepage = https://tamarin-prover.github.io;
|
||||
description = "Security protocol verification in the symbolic model";
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
|
||||
# tamarin use symlinks to the LICENSE and Setup.hs files, so for these sublibraries
|
||||
# we set the patchPhase to fix that. otherwise, cabal cries a lot.
|
||||
replaceSymlinks = ''
|
||||
cp --remove-destination ${src}/LICENSE .;
|
||||
cp --remove-destination ${src}/Setup.hs .;
|
||||
'';
|
||||
|
||||
tamarin-prover-utils = mkDerivation (common "tamarin-prover-utils" (src + "/lib/utils") // {
|
||||
patchPhase = replaceSymlinks;
|
||||
libraryHaskellDepends = with haskellPackages; [
|
||||
base base64-bytestring binary blaze-builder bytestring containers
|
||||
deepseq dlist fclabels mtl pretty safe SHA syb time transformers
|
||||
];
|
||||
});
|
||||
|
||||
tamarin-prover-term = mkDerivation (common "tamarin-prover-term" (src + "/lib/term") // {
|
||||
patchPhase = replaceSymlinks;
|
||||
libraryHaskellDepends = (with haskellPackages; [
|
||||
attoparsec base binary bytestring containers deepseq dlist HUnit
|
||||
mtl process safe
|
||||
]) ++ [ tamarin-prover-utils ];
|
||||
});
|
||||
|
||||
tamarin-prover-theory = mkDerivation (common "tamarin-prover-theory" (src + "/lib/theory") // {
|
||||
patchPhase = replaceSymlinks;
|
||||
doHaddock = false; # broken
|
||||
libraryHaskellDepends = (with haskellPackages; [
|
||||
aeson aeson-pretty base binary bytestring containers deepseq dlist
|
||||
fclabels mtl parallel parsec process safe text transformers uniplate
|
||||
]) ++ [ tamarin-prover-utils tamarin-prover-term ];
|
||||
});
|
||||
|
||||
in
|
||||
mkDerivation (common "tamarin-prover" src // {
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
|
||||
# strip out unneeded deps manually
|
||||
doHaddock = false;
|
||||
enableSharedExecutables = false;
|
||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
||||
|
||||
# wrap the prover to be sure it can find maude, sapic, etc
|
||||
executableToolDepends = [ makeWrapper which maude graphviz sapic ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/tamarin-prover \
|
||||
--prefix PATH : ${lib.makeBinPath [ which maude graphviz sapic ]}
|
||||
'';
|
||||
|
||||
checkPhase = "./dist/build/tamarin-prover/tamarin-prover test";
|
||||
|
||||
executableHaskellDepends = (with haskellPackages; [
|
||||
base binary binary-orphans blaze-builder blaze-html bytestring
|
||||
cmdargs conduit containers deepseq directory fclabels file-embed
|
||||
filepath gitrev http-types HUnit lifted-base mtl parsec process
|
||||
resourcet safe shakespeare tamarin-prover-term
|
||||
template-haskell text threads time wai warp yesod-core yesod-static
|
||||
]) ++ [ tamarin-prover-utils
|
||||
tamarin-prover-term
|
||||
tamarin-prover-theory
|
||||
];
|
||||
})
|
@ -95,5 +95,6 @@ in stdenv.mkDerivation rec {
|
||||
description = "An open source deep-learning toolkit";
|
||||
license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
broken = true; # Never succeeded to build.
|
||||
};
|
||||
}
|
||||
|
@ -1,238 +0,0 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
|
||||
#define errorf(status, fmt, ...) \
|
||||
error_at_line(status, errno, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
|
||||
|
||||
#include <dirent.h>
|
||||
#include <ftw.h>
|
||||
#include <sched.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#define LEN(x) (sizeof(x) / sizeof(*x))
|
||||
|
||||
// TODO: fill together with @abbradar when he gets better
|
||||
const char *environ_blacklist[] = {};
|
||||
|
||||
void environ_blacklist_filter() {
|
||||
for (size_t i = 0; i < LEN(environ_blacklist); i++) {
|
||||
if (unsetenv(environ_blacklist[i]) < 0)
|
||||
errorf(EX_OSERR, "unsetenv(%s)", environ_blacklist[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void bind(const char *from, const char *to) {
|
||||
if (mkdir(to, 0755) < 0)
|
||||
errorf(EX_IOERR, "mkdir(%s)", to);
|
||||
|
||||
if (mount(from, to, "bind", MS_BIND | MS_REC, NULL) < 0)
|
||||
errorf(EX_OSERR, "mount(%s, %s)", from, to);
|
||||
}
|
||||
|
||||
const char *bind_blacklist[] = {".", "..", "bin", "etc", "host", "usr"};
|
||||
|
||||
bool str_contains(const char *needle, const char **haystack, size_t len) {
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
if (!strcmp(needle, haystack[i]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_dir(const char *path) {
|
||||
struct stat buf;
|
||||
|
||||
if (stat(path, &buf) < 0)
|
||||
errorf(EX_IOERR, "stat(%s)", path);
|
||||
|
||||
return S_ISDIR(buf.st_mode);
|
||||
}
|
||||
|
||||
void bind_to_cwd(const char *prefix) {
|
||||
DIR *prefix_dir = opendir(prefix);
|
||||
|
||||
if (prefix_dir == NULL)
|
||||
errorf(EX_IOERR, "opendir(%s)", prefix);
|
||||
|
||||
struct dirent *prefix_dirent;
|
||||
|
||||
while (prefix_dirent = readdir(prefix_dir)) {
|
||||
if (str_contains(prefix_dirent->d_name, bind_blacklist,
|
||||
LEN(bind_blacklist)))
|
||||
continue;
|
||||
|
||||
char *prefix_dirent_path;
|
||||
|
||||
if (asprintf(&prefix_dirent_path, "%s%s", prefix, prefix_dirent->d_name) <
|
||||
0)
|
||||
errorf(EX_IOERR, "asprintf");
|
||||
|
||||
if (is_dir(prefix_dirent_path)) {
|
||||
bind(prefix_dirent_path, prefix_dirent->d_name);
|
||||
} else {
|
||||
char *host_target;
|
||||
|
||||
if (asprintf(&host_target, "host/%s", prefix_dirent->d_name) < 0)
|
||||
errorf(EX_IOERR, "asprintf");
|
||||
|
||||
if (symlink(host_target, prefix_dirent->d_name) < 0)
|
||||
errorf(EX_IOERR, "symlink(%s, %s)", host_target, prefix_dirent->d_name);
|
||||
|
||||
free(host_target);
|
||||
}
|
||||
|
||||
free(prefix_dirent_path);
|
||||
}
|
||||
|
||||
bind(prefix, "host");
|
||||
|
||||
if (closedir(prefix_dir) < 0)
|
||||
errorf(EX_IOERR, "closedir(%s)", prefix);
|
||||
}
|
||||
|
||||
void spitf(const char *path, char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
FILE *f = fopen(path, "w");
|
||||
|
||||
if (f == NULL)
|
||||
errorf(EX_IOERR, "spitf(%s): fopen", path);
|
||||
|
||||
if (vfprintf(f, fmt, args) < 0)
|
||||
errorf(EX_IOERR, "spitf(%s): vfprintf", path);
|
||||
|
||||
if (fclose(f) < 0)
|
||||
errorf(EX_IOERR, "spitf(%s): fclose", path);
|
||||
}
|
||||
|
||||
int nftw_remove(const char *path, const struct stat *sb, int type,
|
||||
struct FTW *ftw) {
|
||||
return remove(path);
|
||||
}
|
||||
|
||||
#define REQUIREMENTS \
|
||||
"Requires Linux version >= 3.19 built with CONFIG_USER_NS option.\n"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
const char *self = *argv++;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s command [arguments...]\n" REQUIREMENTS, self);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
||||
if (getenv("NIX_CHROOTENV") != NULL) {
|
||||
fputs("Can't create chrootenv inside chrootenv!\n", stderr);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
||||
if (setenv("NIX_CHROOTENV", "1", false) < 0)
|
||||
errorf(EX_OSERR, "setenv(NIX_CHROOTENV, 1)");
|
||||
|
||||
const char *temp = getenv("TMPDIR");
|
||||
|
||||
if (temp == NULL)
|
||||
temp = "/tmp";
|
||||
|
||||
char *root;
|
||||
|
||||
if (asprintf(&root, "%s/chrootenvXXXXXX", temp) < 0)
|
||||
errorf(EX_IOERR, "asprintf");
|
||||
|
||||
root = mkdtemp(root);
|
||||
|
||||
if (root == NULL)
|
||||
errorf(EX_IOERR, "mkdtemp(%s)", root);
|
||||
|
||||
// Don't make root private so that privilege drops inside chroot are possible:
|
||||
if (chmod(root, 0755) < 0)
|
||||
errorf(EX_IOERR, "chmod(%s, 0755)", root);
|
||||
|
||||
pid_t cpid = fork();
|
||||
|
||||
if (cpid < 0)
|
||||
errorf(EX_OSERR, "fork");
|
||||
|
||||
if (cpid == 0) {
|
||||
uid_t uid = getuid();
|
||||
gid_t gid = getgid();
|
||||
|
||||
// If we are root, no need to create new user namespace.
|
||||
if (uid == 0) {
|
||||
if (unshare(CLONE_NEWNS) < 0) {
|
||||
fputs(REQUIREMENTS, stderr);
|
||||
errorf(EX_OSERR, "unshare");
|
||||
}
|
||||
// Mark all mounted filesystems as slave so changes
|
||||
// don't propagate to the parent mount namespace.
|
||||
if (mount(NULL, "/", NULL, MS_REC | MS_SLAVE, NULL) < 0)
|
||||
errorf(EX_OSERR, "mount");
|
||||
} else {
|
||||
// Create new mount and user namespaces. CLONE_NEWUSER
|
||||
// requires a program to be non-threaded.
|
||||
if (unshare(CLONE_NEWNS | CLONE_NEWUSER) < 0) {
|
||||
fputs(access("/proc/sys/kernel/unprivileged_userns_clone", F_OK)
|
||||
? REQUIREMENTS
|
||||
: "Run: sudo sysctl -w kernel.unprivileged_userns_clone=1\n",
|
||||
stderr);
|
||||
errorf(EX_OSERR, "unshare");
|
||||
}
|
||||
|
||||
// Map users and groups to the parent namespace.
|
||||
// setgroups is only available since Linux 3.19:
|
||||
spitf("/proc/self/setgroups", "deny");
|
||||
|
||||
spitf("/proc/self/uid_map", "%d %d 1", uid, uid);
|
||||
spitf("/proc/self/gid_map", "%d %d 1", gid, gid);
|
||||
}
|
||||
|
||||
if (chdir(root) < 0)
|
||||
errorf(EX_IOERR, "chdir(%s)", root);
|
||||
|
||||
bind_to_cwd("/");
|
||||
|
||||
if (chroot(root) < 0)
|
||||
errorf(EX_OSERR, "chroot(%s)", root);
|
||||
|
||||
if (chdir("/") < 0)
|
||||
errorf(EX_IOERR, "chdir(/)");
|
||||
|
||||
environ_blacklist_filter();
|
||||
|
||||
if (execvp(*argv, argv) < 0)
|
||||
errorf(EX_OSERR, "execvp(%s)", *argv);
|
||||
}
|
||||
|
||||
int status;
|
||||
|
||||
if (waitpid(cpid, &status, 0) < 0)
|
||||
errorf(EX_OSERR, "waitpid(%d)", cpid);
|
||||
|
||||
if (nftw(root, nftw_remove, getdtablesize(),
|
||||
FTW_DEPTH | FTW_MOUNT | FTW_PHYS) < 0)
|
||||
errorf(EX_IOERR, "nftw(%s)", root);
|
||||
|
||||
free(root);
|
||||
|
||||
if (WIFEXITED(status)) {
|
||||
return WEXITSTATUS(status);
|
||||
} else if (WIFSIGNALED(status)) {
|
||||
kill(getpid(), WTERMSIG(status));
|
||||
}
|
||||
|
||||
return EX_OSERR;
|
||||
}
|
139
pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c
Normal file
139
pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c
Normal file
@ -0,0 +1,139 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define fail(s, err) g_error("%s: %s: %s", __func__, s, g_strerror(err))
|
||||
#define fail_if(expr) \
|
||||
if (expr) \
|
||||
fail(#expr, errno);
|
||||
|
||||
#include <ftw.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
const gchar *bind_blacklist[] = {"bin", "etc", "host", "usr", NULL};
|
||||
|
||||
void bind_mount(const gchar *source, const gchar *target) {
|
||||
fail_if(g_mkdir(target, 0755));
|
||||
fail_if(mount(source, target, "bind", MS_BIND | MS_REC, NULL));
|
||||
}
|
||||
|
||||
void bind_mount_host(const gchar *host, const gchar *guest) {
|
||||
g_autofree gchar *point = g_build_filename(guest, "host", NULL);
|
||||
bind_mount(host, point);
|
||||
}
|
||||
|
||||
void bind_mount_item(const gchar *host, const gchar *guest, const gchar *name) {
|
||||
g_autofree gchar *source = g_build_filename(host, name, NULL);
|
||||
g_autofree gchar *target = g_build_filename(guest, name, NULL);
|
||||
|
||||
if (G_LIKELY(g_file_test(source, G_FILE_TEST_IS_DIR)))
|
||||
bind_mount(source, target);
|
||||
}
|
||||
|
||||
void bind(const gchar *host, const gchar *guest) {
|
||||
g_autoptr(GError) err = NULL;
|
||||
g_autoptr(GDir) dir = g_dir_open(host, 0, &err);
|
||||
|
||||
if (err != NULL)
|
||||
fail("g_dir_open", errno);
|
||||
|
||||
const gchar *item;
|
||||
|
||||
while (item = g_dir_read_name(dir))
|
||||
if (!g_strv_contains(bind_blacklist, item))
|
||||
bind_mount_item(host, guest, item);
|
||||
|
||||
bind_mount_host(host, guest);
|
||||
}
|
||||
|
||||
void spit(const char *path, char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
FILE *f = g_fopen(path, "w");
|
||||
|
||||
if (f == NULL)
|
||||
fail("g_fopen", errno);
|
||||
|
||||
g_vfprintf(f, fmt, args);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
int nftw_remove(const char *path, const struct stat *sb, int type,
|
||||
struct FTW *ftw) {
|
||||
return remove(path);
|
||||
}
|
||||
|
||||
int main(gint argc, gchar **argv) {
|
||||
const gchar *self = *argv++;
|
||||
|
||||
if (argc < 2) {
|
||||
g_message("%s command [arguments...]", self);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (g_getenv("NIX_CHROOTENV"))
|
||||
g_warning("chrootenv doesn't stack!");
|
||||
else
|
||||
g_setenv("NIX_CHROOTENV", "", TRUE);
|
||||
|
||||
g_autofree gchar *prefix =
|
||||
g_build_filename(g_get_tmp_dir(), "chrootenvXXXXXX", NULL);
|
||||
|
||||
fail_if(!g_mkdtemp_full(prefix, 0755));
|
||||
|
||||
pid_t cpid = fork();
|
||||
|
||||
if (cpid < 0)
|
||||
fail("fork", errno);
|
||||
|
||||
else if (cpid == 0) {
|
||||
uid_t uid = getuid();
|
||||
gid_t gid = getgid();
|
||||
|
||||
if (unshare(CLONE_NEWNS | CLONE_NEWUSER) < 0) {
|
||||
int unshare_errno = errno;
|
||||
|
||||
g_message("Requires Linux version >= 3.19 built with CONFIG_USER_NS");
|
||||
if (g_file_test("/proc/sys/kernel/unprivileged_userns_clone",
|
||||
G_FILE_TEST_EXISTS))
|
||||
g_message("Run: sudo sysctl -w kernel.unprivileged_userns_clone=1");
|
||||
|
||||
fail("unshare", unshare_errno);
|
||||
}
|
||||
|
||||
spit("/proc/self/setgroups", "deny");
|
||||
spit("/proc/self/uid_map", "%d %d 1", uid, uid);
|
||||
spit("/proc/self/gid_map", "%d %d 1", gid, gid);
|
||||
|
||||
bind("/", prefix);
|
||||
|
||||
fail_if(chroot(prefix));
|
||||
fail_if(execvp(*argv, argv));
|
||||
}
|
||||
|
||||
else {
|
||||
int status;
|
||||
|
||||
fail_if(waitpid(cpid, &status, 0) != cpid);
|
||||
fail_if(nftw(prefix, nftw_remove, getdtablesize(),
|
||||
FTW_DEPTH | FTW_MOUNT | FTW_PHYS));
|
||||
|
||||
if (WIFEXITED(status))
|
||||
return WEXITSTATUS(status);
|
||||
|
||||
else if (WIFSIGNALED(status))
|
||||
kill(getpid(), WTERMSIG(status));
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
19
pkgs/build-support/build-fhs-userenv/chrootenv/default.nix
Normal file
19
pkgs/build-support/build-fhs-userenv/chrootenv/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ stdenv, pkgconfig, glib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "chrootenv";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
buildCommand = ''
|
||||
cc ${./chrootenv.c} $(pkg-config --cflags --libs glib-2.0) -o $out
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Setup mount/user namespace for FHS emulation";
|
||||
license = licenses.free;
|
||||
maintainers = with maintainers; [ yegortimoshenko ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ callPackage, runCommand, lib, writeScript, stdenv, coreutils, ruby }:
|
||||
{ callPackage, runCommand, lib, writeScript, stdenv, coreutils }:
|
||||
|
||||
let buildFHSEnv = callPackage ./env.nix { }; in
|
||||
|
||||
@ -7,14 +7,7 @@ args@{ name, runScript ? "bash", extraInstallCommands ? "", meta ? {}, passthru
|
||||
let
|
||||
env = buildFHSEnv (removeAttrs args [ "runScript" "extraInstallCommands" "meta" "passthru" ]);
|
||||
|
||||
chrootenv = stdenv.mkDerivation {
|
||||
name = "chrootenv";
|
||||
|
||||
unpackPhase = "cp ${./chrootenv.c} chrootenv.c";
|
||||
installPhase = "cp chrootenv $out";
|
||||
|
||||
makeFlags = [ "chrootenv" ];
|
||||
};
|
||||
chrootenv = callPackage ./chrootenv {};
|
||||
|
||||
init = run: writeScript "${name}-init" ''
|
||||
#! ${stdenv.shell}
|
||||
|
@ -293,7 +293,7 @@ stdenv.mkDerivation {
|
||||
## Hardening support
|
||||
##
|
||||
|
||||
export hardening_unsupported_flags=""
|
||||
export hardening_unsupported_flags="${builtins.concatStringsSep " " (cc.hardeningUnsupportedFlags or [])}"
|
||||
''
|
||||
|
||||
+ optionalString hostPlatform.isCygwin ''
|
||||
|
36
pkgs/desktops/gnome-3/extensions/mediaplayer/default.nix
Normal file
36
pkgs/desktops/gnome-3/extensions/mediaplayer/default.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ stdenv, fetchFromGitHub, glib, meson, gettext, ninja }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gnome-shell-extensions-mediaplayer-${version}";
|
||||
version = "3.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JasonLG1979";
|
||||
repo = "gnome-shell-extensions-mediaplayer";
|
||||
rev = version;
|
||||
sha256 = "0b8smid9vdybgs0601q9chlbgfm1rzrj3vmd3i6p2a5d1n4fyvsc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
buildInputs = [
|
||||
glib
|
||||
gettext
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
rm build
|
||||
chmod +x meson_post_install.py
|
||||
patchShebangs meson_post_install.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Control MPRIS Version 2 Capable Media Players";
|
||||
license = licenses.gpl2Plus;
|
||||
homepage = https://github.com/JasonLG1979/gnome-shell-extensions-mediaplayer/;
|
||||
maintainers = with maintainers; [ tiramiseb ];
|
||||
};
|
||||
}
|
||||
|
@ -382,8 +382,11 @@ stdenv.mkDerivation ({
|
||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
||||
]);
|
||||
|
||||
passthru = { inherit langC langCC langAda langFortran langVhdl
|
||||
enableMultilib version; isGNU = true; };
|
||||
passthru = {
|
||||
inherit langC langCC langAda langFortran langVhdl enableMultilib version;
|
||||
isGNU = true;
|
||||
hardeningUnsupportedFlags = [ "stackprotector" ];
|
||||
};
|
||||
|
||||
enableParallelBuilding = !langAda;
|
||||
|
||||
|
@ -459,8 +459,11 @@ stdenv.mkDerivation ({
|
||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
||||
]);
|
||||
|
||||
passthru =
|
||||
{ inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
|
||||
passthru = {
|
||||
inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version;
|
||||
isGNU = true;
|
||||
hardeningUnsupportedFlags = [ "stackprotector" ];
|
||||
};
|
||||
|
||||
inherit enableParallelBuilding enableMultilib;
|
||||
|
||||
|
@ -39,6 +39,7 @@ stdenv.mkDerivation {
|
||||
# GCC_INSTALL_PREFIX points here, so just use it even though it may not
|
||||
# actually be a gcc
|
||||
gcc = stdenv.cc.cc;
|
||||
hardeningUnsupportedFlags = [ "stackprotector" ];
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -1015,7 +1015,9 @@ self: super: {
|
||||
|
||||
# https://github.com/haskell/cabal/issues/4969
|
||||
haddock-library_1_4_4 = dontHaddock super.haddock-library_1_4_4;
|
||||
haddock-api = super.haddock-api.override { haddock-library = self.haddock-library_1_4_4; };
|
||||
|
||||
# Jailbreak "unix-compat >=0.1.2 && <0.5".
|
||||
darcs = overrideCabal super.darcs (drv: { preConfigure = "sed -i -e 's/unix-compat .*,/unix-compat,/' darcs.cabal"; });
|
||||
|
||||
haddock-api = super.haddock-api.override
|
||||
{ haddock-library = self.haddock-library_1_4_4; };
|
||||
}
|
||||
|
@ -6382,7 +6382,6 @@ dont-distribute-packages:
|
||||
liquid: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
liquidhaskell-cabal-demo: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
liquidhaskell-cabal: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
liquidhaskell: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
list-mux: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
list-prompt: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
list-remote-forwards: [ i686-linux, x86_64-linux, x86_64-darwin ]
|
||||
|
@ -258,7 +258,7 @@ self: super: builtins.intersectAttrs super {
|
||||
}
|
||||
);
|
||||
|
||||
llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_4; };
|
||||
llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_5; };
|
||||
|
||||
# Needs help finding LLVM.
|
||||
spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm;
|
||||
|
@ -29049,8 +29049,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ats-format";
|
||||
version = "0.1.0.8";
|
||||
sha256 = "0hgzcgdpi9y039f45slaali0az3mjzvm2vv49iw3yglm1gvqkfzj";
|
||||
version = "0.1.0.10";
|
||||
sha256 = "0q74j2mn85siix4msqjx0w0bly9f8dxjpbd0cwcyag8jj2gd6i62";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
enableSeparateDataOutput = true;
|
||||
@ -35042,8 +35042,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "bittrex";
|
||||
version = "0.4.0.0";
|
||||
sha256 = "1ns9ygrsr63l1b791li4sx8cqijn1yqkl0a0k7fnqi2ny5z97mz6";
|
||||
version = "0.5.0.0";
|
||||
sha256 = "00h1khj8bs1yc7r9ji68xgxxfakk4p0y885k9jmf4wd5f5qi9j7m";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
@ -42502,6 +42502,34 @@ self: {
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"chart-unit_0_5_5_0" = callPackage
|
||||
({ mkDerivation, base, colour, containers, data-default
|
||||
, diagrams-lib, diagrams-svg, foldl, formatting, lens, linear
|
||||
, mwc-probability, mwc-random, numhask, numhask-range, palette
|
||||
, primitive, protolude, scientific, SVGFonts, tasty, tasty-hspec
|
||||
, tdigest, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "chart-unit";
|
||||
version = "0.5.5.0";
|
||||
sha256 = "0hskfcg17h22fyprr9y264g6jz4lq1a7akqvdyji4fln61mqn07r";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
base colour data-default diagrams-lib diagrams-svg foldl formatting
|
||||
lens linear numhask numhask-range palette scientific SVGFonts text
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
base containers diagrams-lib diagrams-svg foldl formatting lens
|
||||
mwc-probability mwc-random numhask primitive protolude tdigest text
|
||||
];
|
||||
testHaskellDepends = [ base numhask tasty tasty-hspec text ];
|
||||
homepage = "https://github.com/tonyday567/chart-unit#readme";
|
||||
description = "Native haskell charts";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"chaselev-deque" = callPackage
|
||||
({ mkDerivation, abstract-deque, abstract-deque-tests, array
|
||||
, atomic-primops, base, containers, ghc-prim, HUnit, test-framework
|
||||
@ -43104,6 +43132,8 @@ self: {
|
||||
pname = "chr-lang";
|
||||
version = "0.1.0.0";
|
||||
sha256 = "0rn2hv1a8jxzyg4qkbz0m9h0id3q353yg2j85pik49s00hnmqh3p";
|
||||
revision = "1";
|
||||
editedCabalFile = "0kcj8l96cb4drsiz57mxggc75mlabp5rsl01l743cadh7zyx0g95";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
@ -47432,8 +47462,8 @@ self: {
|
||||
({ mkDerivation, base }:
|
||||
mkDerivation {
|
||||
pname = "composition-prelude";
|
||||
version = "0.1.1.2";
|
||||
sha256 = "1ii230d9v7mcpsax9x001ai0nw6pm50zsgyaw9d1s9s2pvf927wr";
|
||||
version = "0.1.1.4";
|
||||
sha256 = "1jnynldi9clzz9in9cjpl17z5yh18wcdal875aphdxd72bhb2yk7";
|
||||
libraryHaskellDepends = [ base ];
|
||||
homepage = "https://github.com/vmchale/composition-prelude#readme";
|
||||
description = "Higher-order function combinators";
|
||||
@ -68303,6 +68333,19 @@ self: {
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"explicit-constraint-lens" = callPackage
|
||||
({ mkDerivation, base, tasty, tasty-hunit }:
|
||||
mkDerivation {
|
||||
pname = "explicit-constraint-lens";
|
||||
version = "0.1.0.0";
|
||||
sha256 = "181frvmgv65rcjpiya4gswvpq9ahz97c8lalhgmwknx9jx5nqd98";
|
||||
libraryHaskellDepends = [ base ];
|
||||
testHaskellDepends = [ base tasty tasty-hunit ];
|
||||
homepage = "https://github.com/leftaroundabout/explicit-constraint-lens";
|
||||
description = "Fully-flexible polymorphic lenses, without any bizarre profunctors";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
}) {};
|
||||
|
||||
"explicit-determinant" = callPackage
|
||||
({ mkDerivation, base }:
|
||||
mkDerivation {
|
||||
@ -69101,6 +69144,26 @@ self: {
|
||||
license = stdenv.lib.licenses.publicDomain;
|
||||
}) {};
|
||||
|
||||
"fast-combinatorics" = callPackage
|
||||
({ mkDerivation, arithmoi, base, Cabal, combinatorics
|
||||
, composition-prelude, criterion, directory, hspec, http-client
|
||||
, http-client-tls, tar, zlib
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "fast-combinatorics";
|
||||
version = "0.1.0.3";
|
||||
sha256 = "1ch6lg4br3yk9n59rf5dcxbwlh0gi27zkqd2cbnkm1p33ik7bvdf";
|
||||
setupHaskellDepends = [
|
||||
base Cabal directory http-client http-client-tls tar zlib
|
||||
];
|
||||
libraryHaskellDepends = [ base composition-prelude ];
|
||||
testHaskellDepends = [ arithmoi base combinatorics hspec ];
|
||||
benchmarkHaskellDepends = [ base combinatorics criterion ];
|
||||
homepage = "https://github.com//fast-combinatorics#readme";
|
||||
description = "Fast combinatorics";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"fast-digits" = callPackage
|
||||
({ mkDerivation, base, criterion, digits, integer-gmp, QuickCheck
|
||||
, smallcheck, tasty, tasty-quickcheck, tasty-smallcheck
|
||||
@ -72571,6 +72634,19 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"fmlist_0_9_1" = callPackage
|
||||
({ mkDerivation, base }:
|
||||
mkDerivation {
|
||||
pname = "fmlist";
|
||||
version = "0.9.1";
|
||||
sha256 = "0v83rxr4889c6m5djfp3vx450kzsj1wi5d0qmd7myvh7i0r4afqv";
|
||||
libraryHaskellDepends = [ base ];
|
||||
homepage = "https://github.com/sjoerdvisscher/fmlist";
|
||||
description = "FoldMap lists";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"fmt" = callPackage
|
||||
({ mkDerivation, base, base16-bytestring, base64-bytestring
|
||||
, bytestring, containers, criterion, deepseq, formatting, hspec
|
||||
@ -73433,8 +73509,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "fortytwo";
|
||||
version = "1.0.2";
|
||||
sha256 = "15imj5ps040iz5abfnzjpgfq726j9c28bwwg06zbf07ji74dz190";
|
||||
version = "1.0.3";
|
||||
sha256 = "113z46b5dnf6z7bxw1a4vhr84w5pw0iridsi3wjimhjz0rr530cm";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ ansi-terminal base text ];
|
||||
@ -91424,6 +91500,27 @@ self: {
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"haskell-dap" = callPackage
|
||||
({ mkDerivation, array, base, bytestring, containers, deepseq
|
||||
, directory, filepath, ghc, ghc-boot, ghci, haskeline, process
|
||||
, time, transformers, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "haskell-dap";
|
||||
version = "0.0.1.0";
|
||||
sha256 = "1wny1ab0x1wdaa8xhza478abyv1sd2pq4clc08bz3b2aa0qd13y8";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base ];
|
||||
executableHaskellDepends = [
|
||||
array base bytestring containers deepseq directory filepath ghc
|
||||
ghc-boot ghci haskeline process time transformers unix
|
||||
];
|
||||
homepage = "https://github.com/phoityne/haskell-dap";
|
||||
description = "haskell-dap is a GHCi having DAP interface";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"haskell-disque" = callPackage
|
||||
({ mkDerivation, base, bytestring, hedis, string-conversions
|
||||
, transformers
|
||||
@ -98340,10 +98437,12 @@ self: {
|
||||
pname = "hidden-char";
|
||||
version = "0.1.0.2";
|
||||
sha256 = "167l83cn37mkq394pbanybz1kghnbim1m74fxskws1nclxr9747a";
|
||||
revision = "2";
|
||||
editedCabalFile = "1d0k297hxff31k0x5xbli6l7c151d2y9wq4w0x0prgagjc0l7z5n";
|
||||
libraryHaskellDepends = [ base ];
|
||||
testHaskellDepends = [ base hspec ];
|
||||
homepage = "https://github.com/rcook/hidden-char#readme";
|
||||
description = "Provides getHiddenChar function";
|
||||
description = "Provides cross-platform getHiddenChar function";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
@ -102061,8 +102160,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hoppy-generator";
|
||||
version = "0.3.3";
|
||||
sha256 = "18n48kkf6pcmcwb85a74kqh84aadpm1s9jv1r56b43rya8ra3mgw";
|
||||
version = "0.3.4";
|
||||
sha256 = "09vc23id1f30270c6q3wadckzvbqj4hvaxzy3wfbmhsqbrmmrfwh";
|
||||
libraryHaskellDepends = [
|
||||
base containers directory filepath haskell-src mtl
|
||||
];
|
||||
@ -102076,8 +102175,8 @@ self: {
|
||||
({ mkDerivation, base, Cabal, containers, directory, filepath }:
|
||||
mkDerivation {
|
||||
pname = "hoppy-runtime";
|
||||
version = "0.3.1";
|
||||
sha256 = "0cbnhpwy3m0l7gcarg7xr1f5y6nwdnfa269vvza0fm4fhf3lz6g5";
|
||||
version = "0.3.2";
|
||||
sha256 = "0ax4aqbnxc80dbj8f7hykgj5agn59nwv4icfwmb4knxj2qw35kg3";
|
||||
libraryHaskellDepends = [
|
||||
base Cabal containers directory filepath
|
||||
];
|
||||
@ -118386,8 +118485,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "juicy-gcode";
|
||||
version = "0.1.0.3";
|
||||
sha256 = "0czb1vb1nwn1wzx52vpvnpki2kfwwb775wg512rn46snm5wibvzv";
|
||||
version = "0.1.0.4";
|
||||
sha256 = "1nf30901jv226n7cpnbkqdh51gpmkzri79m271afzsgya3cs9gi5";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
@ -126203,7 +126302,6 @@ self: {
|
||||
homepage = "https://github.com/ucsd-progsys/liquidhaskell";
|
||||
description = "Liquid Types for Haskell";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {inherit (pkgs) z3;};
|
||||
|
||||
"liquidhaskell-cabal" = callPackage
|
||||
@ -127677,6 +127775,39 @@ self: {
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
"log-warper_1_8_4" = callPackage
|
||||
({ mkDerivation, aeson, ansi-terminal, async, base, containers
|
||||
, data-default, deepseq, directory, filepath, fmt, hspec, HUnit
|
||||
, markdown-unlit, microlens, microlens-mtl, microlens-platform
|
||||
, mmorph, monad-control, monad-loops, mtl, QuickCheck, text, time
|
||||
, transformers, transformers-base, universum, unix
|
||||
, unordered-containers, vector, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "log-warper";
|
||||
version = "1.8.4";
|
||||
sha256 = "0dnqcp97qlsn2yq8nf779l1sm0p30bl15j9ivwrnaxb02kyws5pn";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson ansi-terminal base containers deepseq directory filepath fmt
|
||||
microlens-platform mmorph monad-control monad-loops mtl text time
|
||||
transformers transformers-base universum unix unordered-containers
|
||||
vector yaml
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
base markdown-unlit microlens mtl text universum yaml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
async base data-default directory filepath hspec HUnit
|
||||
microlens-mtl QuickCheck universum unordered-containers
|
||||
];
|
||||
homepage = "https://github.com/serokell/log-warper";
|
||||
description = "Flexible, configurable, monadic and pretty logging";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"log2json" = callPackage
|
||||
({ mkDerivation, base, containers, json, parsec }:
|
||||
mkDerivation {
|
||||
@ -136636,6 +136767,31 @@ self: {
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
"mono-traversable_1_0_7_0" = callPackage
|
||||
({ mkDerivation, base, bytestring, containers, criterion, foldl
|
||||
, hashable, hspec, HUnit, mwc-random, QuickCheck, semigroups, split
|
||||
, text, transformers, unordered-containers, vector
|
||||
, vector-algorithms
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "mono-traversable";
|
||||
version = "1.0.7.0";
|
||||
sha256 = "0jfcw8xfizsva1w4h7546fryzqc1gnl1w3ki42nl41s1fdqfxibq";
|
||||
libraryHaskellDepends = [
|
||||
base bytestring containers hashable split text transformers
|
||||
unordered-containers vector vector-algorithms
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring containers foldl hspec HUnit QuickCheck semigroups
|
||||
text transformers unordered-containers vector
|
||||
];
|
||||
benchmarkHaskellDepends = [ base criterion mwc-random vector ];
|
||||
homepage = "https://github.com/snoyberg/mono-traversable#readme";
|
||||
description = "Type classes for mapping, folding, and traversing monomorphic containers";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"mono-traversable-instances" = callPackage
|
||||
({ mkDerivation, base, comonad, containers, dlist, dlist-instances
|
||||
, mono-traversable, semigroupoids, semigroups, transformers
|
||||
@ -144971,6 +145127,25 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"one-liner_0_9_2" = callPackage
|
||||
({ mkDerivation, base, bifunctors, contravariant, ghc-prim, HUnit
|
||||
, profunctors, tagged, transformers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "one-liner";
|
||||
version = "0.9.2";
|
||||
sha256 = "1my7ykfbfgx8z4qcklqxacycs5hl736fqh5s22cdm19nhfqmcc5b";
|
||||
libraryHaskellDepends = [
|
||||
base bifunctors contravariant ghc-prim profunctors tagged
|
||||
transformers
|
||||
];
|
||||
testHaskellDepends = [ base contravariant HUnit ];
|
||||
homepage = "https://github.com/sjoerdvisscher/one-liner";
|
||||
description = "Constraint-based generics";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"one-time-password" = callPackage
|
||||
({ mkDerivation, base, bytestring, cereal, cryptonite, memory
|
||||
, tasty, tasty-hunit, time
|
||||
@ -146104,8 +146279,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "opn";
|
||||
version = "0.1.2";
|
||||
sha256 = "0x53kvcpbd9fh00zs8wdkb3xsl8hf1bsqgl83ci17di1jyg3m4ch";
|
||||
version = "0.1.3";
|
||||
sha256 = "17ysp1xzqbcr58ibzwf88bim58yyc309kf71jw66gn0brp0b0w1h";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
@ -149070,12 +149245,12 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"parser-combinators_0_3_0" = callPackage
|
||||
"parser-combinators_0_4_0" = callPackage
|
||||
({ mkDerivation, base }:
|
||||
mkDerivation {
|
||||
pname = "parser-combinators";
|
||||
version = "0.3.0";
|
||||
sha256 = "149x9qpcsr7yimkhsfcksdqx4clf555p51jkvqnr6wql5qi3w2p9";
|
||||
version = "0.4.0";
|
||||
sha256 = "1azkz0a6ikym02s8wydjcklp7rz8k512bs4s9lp9g1g03m0yj95i";
|
||||
libraryHaskellDepends = [ base ];
|
||||
homepage = "https://github.com/mrkkrp/parser-combinators";
|
||||
description = "Lightweight package providing commonly useful parser combinators";
|
||||
@ -158789,8 +158964,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "propellor";
|
||||
version = "5.1.0";
|
||||
sha256 = "0bl1kb24s2bs7li096s4iwvd2wj188lb2y3cfymhgsyqj8c2fbzp";
|
||||
version = "5.2.0";
|
||||
sha256 = "06h1q1kx2ifbfpicb0ivp4x8pv1fn15x0v5wn1dygnbf862h9brh";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
@ -193536,8 +193711,8 @@ self: {
|
||||
pname = "test-framework";
|
||||
version = "0.8.1.1";
|
||||
sha256 = "0wxjgdvb1c4ykazw774zlx86550848wbsvgjgcrdzcgbb9m650vq";
|
||||
revision = "2";
|
||||
editedCabalFile = "1mp1h0fzwxa3xxnbw33lp8hj0rb8vwkd712r5ak8ny5nmawh2c9y";
|
||||
revision = "3";
|
||||
editedCabalFile = "1b6pi4j1dpcbiyx1bpfks29x293j02z7ashs2sdc8fhzbwsr9lxj";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
@ -193549,6 +193724,30 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"test-framework_0_8_2_0" = callPackage
|
||||
({ mkDerivation, ansi-terminal, ansi-wl-pprint, base, bytestring
|
||||
, containers, hostname, HUnit, libxml, old-locale, QuickCheck
|
||||
, random, regex-posix, semigroups, time, xml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "test-framework";
|
||||
version = "0.8.2.0";
|
||||
sha256 = "1hhacrzam6b8f10hyldmjw8pb7frdxh04rfg3farxcxwbnhwgbpm";
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint base containers hostname old-locale
|
||||
random regex-posix time xml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint base bytestring containers hostname
|
||||
HUnit libxml old-locale QuickCheck random regex-posix semigroups
|
||||
time xml
|
||||
];
|
||||
homepage = "http://haskell.github.io/test-framework/";
|
||||
description = "Framework for running and organising tests, with HUnit and QuickCheck support";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"test-framework-doctest" = callPackage
|
||||
({ mkDerivation, base, doctest, test-framework
|
||||
, test-framework-hunit
|
||||
@ -194751,6 +194950,24 @@ self: {
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
"text-replace" = callPackage
|
||||
({ mkDerivation, base, containers, hedgehog, neat-interpolation
|
||||
, optparse-applicative, parsec, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "text-replace";
|
||||
version = "0.0.0.1";
|
||||
sha256 = "15qf0pwjhaa2zwdzixil5q1iqs5cwlazggzsgwwq553jlggbf063";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base containers ];
|
||||
executableHaskellDepends = [ base optparse-applicative parsec ];
|
||||
testHaskellDepends = [ base hedgehog neat-interpolation text ];
|
||||
homepage = "https://github.com/chris-martin/text-replace";
|
||||
description = "Simple text replacements from a list of search/replace pairs";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}) {};
|
||||
|
||||
"text-short" = callPackage
|
||||
({ mkDerivation, base, binary, bytestring, deepseq, hashable
|
||||
, quickcheck-instances, tasty, tasty-hunit, tasty-quickcheck, text
|
||||
@ -194806,6 +195023,45 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"text-show_3_7_1" = callPackage
|
||||
({ mkDerivation, array, base, base-compat, base-orphans, bifunctors
|
||||
, bytestring, bytestring-builder, containers, contravariant
|
||||
, criterion, deepseq, deriving-compat, generic-deriving
|
||||
, ghc-boot-th, ghc-prim, hspec, hspec-discover, integer-gmp, nats
|
||||
, QuickCheck, quickcheck-instances, semigroups, tagged
|
||||
, template-haskell, text, th-abstraction, th-lift, transformers
|
||||
, transformers-compat, void
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "text-show";
|
||||
version = "3.7.1";
|
||||
sha256 = "0gbf3cpxz92v4jphmwvz93il7m38qkwirfnk5453517k2s84s899";
|
||||
libraryHaskellDepends = [
|
||||
array base base-compat bifunctors bytestring bytestring-builder
|
||||
containers contravariant generic-deriving ghc-boot-th ghc-prim
|
||||
integer-gmp nats semigroups tagged template-haskell text
|
||||
th-abstraction th-lift transformers transformers-compat void
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base base-compat base-orphans bifunctors bytestring
|
||||
bytestring-builder containers contravariant deriving-compat
|
||||
generic-deriving ghc-boot-th ghc-prim hspec integer-gmp nats
|
||||
QuickCheck quickcheck-instances semigroups tagged template-haskell
|
||||
text th-lift transformers transformers-compat void
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
benchmarkHaskellDepends = [
|
||||
array base base-compat bifunctors bytestring bytestring-builder
|
||||
containers contravariant criterion deepseq generic-deriving
|
||||
ghc-boot-th ghc-prim integer-gmp nats semigroups tagged
|
||||
template-haskell text th-lift transformers transformers-compat void
|
||||
];
|
||||
homepage = "https://github.com/RyanGlScott/text-show";
|
||||
description = "Efficient conversion of values into Text";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"text-show-instances" = callPackage
|
||||
({ mkDerivation, base, base-compat, bifunctors, binary, bytestring
|
||||
, containers, directory, generic-deriving, ghc-boot-th, ghc-prim
|
||||
@ -201444,14 +201700,14 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"type-of-html_1_3_1_1" = callPackage
|
||||
"type-of-html_1_3_2_0" = callPackage
|
||||
({ mkDerivation, base, blaze-html, bytestring, criterion
|
||||
, double-conversion, ghc-prim, hspec, QuickCheck, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "type-of-html";
|
||||
version = "1.3.1.1";
|
||||
sha256 = "0idnj14bsqlz1ww2bvfa07yqi53gh72diaacnlfdrvgil8n11wvb";
|
||||
version = "1.3.2.0";
|
||||
sha256 = "0zayqf18z3h4ix38gyqqvq2g3k74cm5f9gzkg4sh8ijw30xszq8p";
|
||||
libraryHaskellDepends = [
|
||||
base bytestring double-conversion ghc-prim text
|
||||
];
|
||||
@ -211643,6 +211899,34 @@ self: {
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"word2vec-model" = callPackage
|
||||
({ mkDerivation, attoparsec, base, binary, binary-ieee754
|
||||
, bytestring, conduit, conduit-combinators, conduit-extra, hspec
|
||||
, HUnit, text, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "word2vec-model";
|
||||
version = "0.1.0.0";
|
||||
sha256 = "1dz6q7ym5z5l0pkzmvawpdpjh8z6pf5ph26m0b7k9q95q42qypmj";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
attoparsec base binary binary-ieee754 bytestring text
|
||||
unordered-containers vector
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
attoparsec base binary binary-ieee754 bytestring conduit
|
||||
conduit-combinators conduit-extra text unordered-containers vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
attoparsec base binary binary-ieee754 bytestring hspec HUnit text
|
||||
unordered-containers vector
|
||||
];
|
||||
homepage = "https://gonito.net/gitlist/word2vec-model.git";
|
||||
description = "Reading word2vec binary models";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"word8" = callPackage
|
||||
({ mkDerivation, base, bytestring, criterion, hspec }:
|
||||
mkDerivation {
|
||||
@ -217441,7 +217725,7 @@ self: {
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
"yesod-test_1_5_9" = callPackage
|
||||
"yesod-test_1_5_9_1" = callPackage
|
||||
({ mkDerivation, attoparsec, base, blaze-builder, blaze-html
|
||||
, blaze-markup, bytestring, case-insensitive, containers, cookie
|
||||
, hspec, hspec-core, html-conduit, http-types, HUnit, lifted-base
|
||||
@ -217451,8 +217735,8 @@ self: {
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "yesod-test";
|
||||
version = "1.5.9";
|
||||
sha256 = "1kmqrm5qk3wnmrqsq0jmglabs731dw4d7b0jp3sn1z5lqgxm7kzm";
|
||||
version = "1.5.9.1";
|
||||
sha256 = "05l5n28azbh6r1vsi7xvz1h19if5zrwn1b3jsr2913axfs3d9r3y";
|
||||
libraryHaskellDepends = [
|
||||
attoparsec base blaze-builder blaze-html blaze-markup bytestring
|
||||
case-insensitive containers cookie hspec-core html-conduit
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libqmatrixclient-${version}";
|
||||
version = "0.1";
|
||||
version = "0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "QMatrixClient";
|
||||
repo = "libqmatrixclient";
|
||||
rev = "v${version}";
|
||||
sha256 = "1dlanf0y65zf6n1b1f4jzw04w07sl85wiw01c3yyn2ivp3clr13l";
|
||||
rev = "v${version}-q0.0.5";
|
||||
sha256 = "1m53yxsqjxv2jq0h1xipwsgaj5rca4fk4cl3azgvmf19l9yn00ck";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase ];
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libtoxcore-${version}";
|
||||
version = "0.1.10";
|
||||
version = "0.1.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TokTok";
|
||||
repo = "c-toxcore";
|
||||
rev = "v${version}";
|
||||
sha256 = "1d3f7lnlxra2lhih838bvlahxqv50j35g9kfyzspq971sb5z30mv";
|
||||
sha256 = "1fya5gfiwlpk6fxhalv95n945ymvp2iidiyksrjw1xw95fzsp1ij";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
@ -37,7 +37,8 @@ stdenv.mkDerivation rec {
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "P2P FOSS instant messaging application aimed to replace Skype with crypto";
|
||||
description = "P2P FOSS instant messaging application aimed to replace Skype";
|
||||
homepage = https://tox.chat;
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = platforms.all;
|
||||
|
31
pkgs/development/libraries/libxc/default.nix
Normal file
31
pkgs/development/libraries/libxc/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchurl, gfortran, perl }:
|
||||
|
||||
let
|
||||
version = "2.2.3";
|
||||
in stdenv.mkDerivation {
|
||||
name = "libxc-${version}";
|
||||
src = fetchurl {
|
||||
url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-${version}.tar.gz";
|
||||
sha256 = "1rv8vsf7zzw0g7j93rqcipzhk2pj1iq71bpkwf7zxivmgavh0arg";
|
||||
};
|
||||
|
||||
buildInputs = [ gfortran ];
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./
|
||||
'';
|
||||
|
||||
configureFlags = [ "--enable-shared" ];
|
||||
|
||||
doCheck = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Library of exchange-correlation functionals for density-functional theory";
|
||||
homepage = http://octopus-code.org/wiki/Libxc;
|
||||
license = licenses.lgpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
31
pkgs/development/python-modules/mygpoclient/default.nix
Normal file
31
pkgs/development/python-modules/mygpoclient/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchFromGitHub, buildPythonPackage, nose, minimock }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "mygpoclient-${version}";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gpodder";
|
||||
repo = "mygpoclient";
|
||||
rev = version;
|
||||
sha256 = "0aa28wc55x3rxa7clwfv5v5500ffyaq0vkxaa3v01y1r93dxkdvp";
|
||||
};
|
||||
|
||||
buildInputs = [ nose minimock ];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A gpodder.net client library";
|
||||
longDescription = ''
|
||||
The mygpoclient library allows developers to utilize a Pythonic interface
|
||||
to the gpodder.net web services.
|
||||
'';
|
||||
homepage = https://github.com/gpodder/mygpoclient;
|
||||
license = with licenses; [ gpl3 ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ skeidel ];
|
||||
};
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkgconfig, python2Packages, which, procps, gdb, capnproto }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "5.0.0";
|
||||
version = "5.1.0";
|
||||
name = "rr-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla";
|
||||
repo = "rr";
|
||||
rev = version;
|
||||
sha256 = "1cc1dbq129qlmrysk7cmaihcd9c93csi79dv3kqsnnprbz480z9i";
|
||||
sha256 = "16v08irycb295jjw5yrcjdagvkgcgg4hl5qz215hrw1ff4g7sazy";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
122
pkgs/os-specific/linux/beegfs/default.nix
Normal file
122
pkgs/os-specific/linux/beegfs/default.nix
Normal file
@ -0,0 +1,122 @@
|
||||
{ stdenv, fetchurl, pkgconfig, unzip, which
|
||||
, libuuid, attr, xfsprogs, cppunit
|
||||
, zlib, openssl, sqlite, jre, openjdk, ant
|
||||
} :
|
||||
|
||||
let
|
||||
version = "6.17";
|
||||
|
||||
subdirs = [
|
||||
"beegfs_thirdparty/build"
|
||||
"beegfs_opentk_lib/build"
|
||||
"beegfs_common/build"
|
||||
"beegfs_admon/build"
|
||||
"beegfs_java_lib/build"
|
||||
"beegfs_ctl/build"
|
||||
"beegfs_fsck/build"
|
||||
"beegfs_helperd/build"
|
||||
"beegfs_meta/build"
|
||||
"beegfs_mgmtd/build"
|
||||
"beegfs_online_cfg/build"
|
||||
"beegfs_storage/build"
|
||||
"beegfs_utils/build"
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "beegfs-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.beegfs.com/pub/v6/repository/archive.tar.bz2?ref=${version}";
|
||||
sha256 = "10xs7gzdmlg23k6zn1b7jij3lljn7rr1j6h476hq4lbg981qk3n3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ which unzip pkgconfig cppunit openjdk ant];
|
||||
buildInputs = [ libuuid attr xfsprogs zlib openssl sqlite jre ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \;
|
||||
find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
|
||||
find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
for i in ${toString subdirs}; do
|
||||
make -C $i
|
||||
done
|
||||
make -C beegfs_admon/build admon_gui
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
binDir=$out/bin
|
||||
docDir=$out/share/doc/beegfs
|
||||
includeDir=$out/include/beegfs
|
||||
libDir=$out/lib
|
||||
libDirPkg=$out/lib/beegfs
|
||||
|
||||
mkdir -p $binDir $libDir $libDirPkg $docDir $includeDir
|
||||
|
||||
cp beegfs_admon/build/beegfs-admon $binDir
|
||||
cp beegfs_admon/build/dist/usr/bin/beegfs-admon-gui $binDir
|
||||
cp beegfs_admon_gui/dist/beegfs-admon-gui.jar $libDirPkg
|
||||
cp beegfs_admon/build/dist/etc/beegfs-admon.conf $docDir
|
||||
|
||||
cp beegfs_java_lib/build/jbeegfs.jar $libDirPkg
|
||||
cp beegfs_java_lib/build/libjbeegfs.so $libDir
|
||||
|
||||
cp beegfs_ctl/build/beegfs-ctl $binDir
|
||||
cp beegfs_fsck/build/beegfs-fsck $binDir
|
||||
|
||||
cp beegfs_utils/scripts/beegfs-check-servers $binDir
|
||||
cp beegfs_utils/scripts/beegfs-df $binDir
|
||||
cp beegfs_utils/scripts/beegfs-net $binDir
|
||||
|
||||
cp beegfs_helperd/build/beegfs-helperd $binDir
|
||||
cp beegfs_helperd/build/dist/etc/beegfs-helperd.conf $docDir
|
||||
|
||||
cp beegfs_client_module/build/dist/sbin/beegfs-setup-client $binDir
|
||||
cp beegfs_client_module/build/dist/etc/beegfs-client.conf $docDir
|
||||
|
||||
cp beegfs_meta/build/beegfs-meta $binDir
|
||||
cp beegfs_meta/build/dist/sbin/beegfs-setup-meta $binDir
|
||||
cp beegfs_meta/build/dist/etc/beegfs-meta.conf $docDir
|
||||
|
||||
cp beegfs_mgmtd/build/beegfs-mgmtd $binDir
|
||||
cp beegfs_mgmtd/build/dist/sbin/beegfs-setup-mgmtd $binDir
|
||||
cp beegfs_mgmtd/build/dist/etc/beegfs-mgmtd.conf $docDir
|
||||
|
||||
cp beegfs_storage/build/beegfs-storage $binDir
|
||||
cp beegfs_storage/build/dist/sbin/beegfs-setup-storage $binDir
|
||||
cp beegfs_storage/build/dist/etc/beegfs-storage.conf $docDir
|
||||
|
||||
cp beegfs_opentk_lib/build/libbeegfs-opentk.so $libDir
|
||||
|
||||
cp beegfs_client_devel/build/dist/usr/share/doc/beegfs-client-devel/examples/* $docDir
|
||||
cp -r beegfs_client_devel/include/* $includeDir
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/bin/beegfs-admon-gui \
|
||||
--replace " java " " ${jre}/bin/java " \
|
||||
--replace "/opt/beegfs/beegfs-admon-gui/beegfs-admon-gui.jar" \
|
||||
"$libDirPkg/beegfs-admon-gui.jar"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
beegfs_common/build/test-runner --text
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "High performance distributed filesystem with RDMA support";
|
||||
homepage = "https://www.beegfs.io";
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
license = {
|
||||
fullName = "BeeGFS_EULA";
|
||||
url = "https://www.beegfs.io/docs/BeeGFS_EULA.txt";
|
||||
free = false;
|
||||
};
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
46
pkgs/os-specific/linux/beegfs/kernel-module.nix
Normal file
46
pkgs/os-specific/linux/beegfs/kernel-module.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ stdenv, fetchurl, which
|
||||
, kmod, kernel
|
||||
} :
|
||||
|
||||
let
|
||||
version = "6.17";
|
||||
in stdenv.mkDerivation {
|
||||
name = "beegfs-module-${version}-${kernel.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.beegfs.com/pub/v6/repository/archive.tar.bz2?ref=${version}";
|
||||
sha256 = "10xs7gzdmlg23k6zn1b7jij3lljn7rr1j6h476hq4lbg981qk3n3";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "fortify" "pic" "stackprotector" ];
|
||||
|
||||
nativeBuildInputs = [ which kmod ];
|
||||
|
||||
buildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/" ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \;
|
||||
find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
|
||||
find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
|
||||
'';
|
||||
|
||||
preBuild = "cd beegfs_client_module/build";
|
||||
|
||||
installPhase = ''
|
||||
instdir=$out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs
|
||||
mkdir -p $instdir
|
||||
cp beegfs.ko $instdir
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "High performance distributed filesystem with RDMA support";
|
||||
homepage = "https://www.beegfs.io";
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
broken = versionAtLeast kernel.version "4.14";
|
||||
};
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
with stdenv.lib;
|
||||
|
||||
import ./generic.nix (args // rec {
|
||||
version = "4.14.9";
|
||||
version = "4.14.10";
|
||||
|
||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modDirVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
|
||||
@ -13,6 +13,6 @@ import ./generic.nix (args // rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "1vqllh36wss4dsdvb12zchy6hjaniyxcla5cg8962xrkim2bpk6g";
|
||||
sha256 = "046i3vcnhavblid71hrqdid4aay0rrcpzbiwlkcvs0x09hvz3fl6";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
|
||||
|
||||
import ./generic.nix (args // rec {
|
||||
version = "4.9.72";
|
||||
version = "4.9.73";
|
||||
extraMeta.branch = "4.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "0fxqfqcqn6rk6rxzmy8r3vgzvy9xlnb3hvg2rniykbcyxgqh3wk9";
|
||||
sha256 = "0avfq79fn8rfjbn24wfr9pz438qvwm8vdm3si4fl4v3d7z2nb2sm";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
@ -3,9 +3,9 @@
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
version = "4.14.9";
|
||||
version = "4.14.10";
|
||||
revision = "a";
|
||||
sha256 = "1pqlk381ryspp2b1c4kwqw7a68jma8d6x4xvafh0x5k9mcn2i9i0";
|
||||
sha256 = "1dz1kgg8jvw2xzbv1r867r1c29gpiyhgac7pwpaps609v563a154";
|
||||
|
||||
# modVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
|
||||
|
@ -62,7 +62,8 @@ let
|
||||
|
||||
libPath = makeLibraryPath [ xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib stdenv.cc.cc ];
|
||||
|
||||
nativeBuildInputs = [ perl nukeReferences ] ++ kernel.moduleBuildDependencies;
|
||||
nativeBuildInputs = [ perl nukeReferences ]
|
||||
++ optionals (!libsOnly) kernel.moduleBuildDependencies;
|
||||
|
||||
disallowedReferences = optional (!libsOnly) [ kernel.dev ];
|
||||
|
||||
|
@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
||||
|
@ -1338,6 +1338,8 @@ with pkgs;
|
||||
|
||||
beanstalkd = callPackage ../servers/beanstalkd { };
|
||||
|
||||
beegfs = callPackage ../os-specific/linux/beegfs { };
|
||||
|
||||
beets = callPackage ../tools/audio/beets {
|
||||
pythonPackages = python2Packages;
|
||||
};
|
||||
@ -3229,6 +3231,8 @@ with pkgs;
|
||||
|
||||
libibverbs = callPackage ../development/libraries/libibverbs { };
|
||||
|
||||
libxc = callPackage ../development/libraries/libxc { };
|
||||
|
||||
libxcomp = callPackage ../development/libraries/libxcomp { };
|
||||
|
||||
libxl = callPackage ../development/libraries/libxl {};
|
||||
@ -5542,13 +5546,7 @@ with pkgs;
|
||||
clang_38 = llvmPackages_38.clang;
|
||||
clang_37 = llvmPackages_37.clang;
|
||||
clang_35 = wrapCC llvmPackages_35.clang;
|
||||
clang_34 = (wrapCC llvmPackages_34.clang).override {
|
||||
# Default cc-wrapper's hardening flags don't work with clang-3.4,
|
||||
# so just remove it entirely for this wrapper.
|
||||
extraBuildCommands = ''
|
||||
:> $out/nix-support/add-hardening.sh
|
||||
'';
|
||||
};
|
||||
clang_34 = wrapCC llvmPackages_34.clang;
|
||||
|
||||
clang-tools = callPackage ../development/tools/clang-tools { };
|
||||
|
||||
@ -5966,6 +5964,13 @@ with pkgs;
|
||||
psc-package = haskell.lib.justStaticExecutables
|
||||
(haskellPackages.callPackage ../development/compilers/purescript/psc-package { });
|
||||
|
||||
tamarin-prover =
|
||||
(haskellPackages.callPackage ../applications/science/logic/tamarin-prover {
|
||||
# NOTE: do not use the haskell packages 'graphviz' and 'maude'
|
||||
inherit maude which sapic;
|
||||
graphviz = graphviz-nox;
|
||||
});
|
||||
|
||||
inherit (ocamlPackages.haxe) haxe_3_2 haxe_3_4;
|
||||
haxe = haxe_3_4;
|
||||
haxePackages = recurseIntoAttrs (callPackage ./haxe-packages.nix { });
|
||||
@ -12818,6 +12823,8 @@ with pkgs;
|
||||
|
||||
bbswitch = callPackage ../os-specific/linux/bbswitch {};
|
||||
|
||||
beegfs-module = callPackage ../os-specific/linux/beegfs/kernel-module.nix { };
|
||||
|
||||
ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
|
||||
|
||||
blcr = callPackage ../os-specific/linux/blcr { };
|
||||
@ -14165,6 +14172,8 @@ with pkgs;
|
||||
|
||||
bitmeter = callPackage ../applications/audio/bitmeter { };
|
||||
|
||||
bitscope = callPackage ../applications/science/electronics/bitscope/packages.nix { };
|
||||
|
||||
bitwig-studio = callPackage ../applications/audio/bitwig-studio {
|
||||
inherit (gnome2) zenity;
|
||||
};
|
||||
@ -14385,7 +14394,7 @@ with pkgs;
|
||||
|
||||
cyclone = callPackage ../applications/audio/pd-plugins/cyclone { };
|
||||
|
||||
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.darcs) (drv: {
|
||||
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskell.packages.ghc802.darcs) (drv: {
|
||||
configureFlags = (stdenv.lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
|
||||
});
|
||||
|
||||
@ -16739,7 +16748,7 @@ with pkgs;
|
||||
|
||||
udevil = callPackage ../applications/misc/udevil {};
|
||||
|
||||
udiskie = callPackage ../applications/misc/udiskie { };
|
||||
udiskie = python3Packages.callPackage ../applications/misc/udiskie { };
|
||||
|
||||
sakura = callPackage ../applications/misc/sakura {
|
||||
vte = gnome3.vte;
|
||||
@ -18591,6 +18600,7 @@ with pkgs;
|
||||
caffeine = callPackage ../desktops/gnome-3/extensions/caffeine { };
|
||||
dash-to-dock = callPackage ../desktops/gnome-3/extensions/dash-to-dock { };
|
||||
dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { };
|
||||
mediaplayer = callPackage ../desktops/gnome-3/extensions/mediaplayer { };
|
||||
topicons-plus = callPackage ../desktops/gnome-3/extensions/topicons-plus { };
|
||||
};
|
||||
|
||||
@ -19014,6 +19024,8 @@ with pkgs;
|
||||
|
||||
proverif = callPackage ../applications/science/logic/proverif { };
|
||||
|
||||
sapic = callPackage ../applications/science/logic/sapic { };
|
||||
|
||||
satallax = callPackage ../applications/science/logic/satallax {
|
||||
ocaml = ocamlPackages_4_01_0.ocaml;
|
||||
};
|
||||
|
@ -6648,7 +6648,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
pythonix = callPackage ../development/python-modules/pythonix { };
|
||||
pythonix = toPythonModule (callPackage ../development/python-modules/pythonix { });
|
||||
|
||||
pypolicyd-spf = buildPythonPackage rec {
|
||||
name = "pypolicyd-spf-${version}";
|
||||
@ -11338,35 +11338,7 @@ in {
|
||||
};
|
||||
});
|
||||
|
||||
mygpoclient = buildPythonPackage rec {
|
||||
name = "mygpoclient-${version}";
|
||||
version = "1.7";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://thp.io/2010/mygpoclient/${name}.tar.gz";
|
||||
sha256 = "6a0b7b1fe2b046875456e14eda3e42430e493bf2251a64481cf4fd1a1e21a80e";
|
||||
};
|
||||
|
||||
buildInputs = with self; [ nose minimock ];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
disabled = isPy3k;
|
||||
|
||||
meta = {
|
||||
description = "A gpodder.net client library";
|
||||
longDescription = ''
|
||||
The mygpoclient library allows developers to utilize a Pythonic interface
|
||||
to the gpodder.net web services.
|
||||
'';
|
||||
homepage = https://thp.io/2010/mygpoclient/;
|
||||
license = with licenses; [ gpl3 ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ skeidel ];
|
||||
};
|
||||
};
|
||||
mygpoclient = callPackage ../development/python-modules/mygpoclient { };
|
||||
|
||||
mwclient = buildPythonPackage rec {
|
||||
version = "0.8.3";
|
||||
|
@ -27,6 +27,8 @@ rec {
|
||||
if system == "x86_64-linux" then pkgs_x86_64_linux
|
||||
else if system == "i686-linux" then pkgs_i686_linux
|
||||
else if system == "aarch64-linux" then pkgs_aarch64_linux
|
||||
else if system == "armv6l-linux" then pkgs_armv6l_linux
|
||||
else if system == "armv7l-linux" then pkgs_armv7l_linux
|
||||
else if system == "x86_64-darwin" then pkgs_x86_64_darwin
|
||||
else if system == "x86_64-freebsd" then pkgs_x86_64_freebsd
|
||||
else if system == "i686-freebsd" then pkgs_i686_freebsd
|
||||
@ -37,6 +39,8 @@ rec {
|
||||
pkgs_x86_64_linux = allPackages { system = "x86_64-linux"; };
|
||||
pkgs_i686_linux = allPackages { system = "i686-linux"; };
|
||||
pkgs_aarch64_linux = allPackages { system = "aarch64-linux"; };
|
||||
pkgs_armv6l_linux = allPackages { system = "armv6l-linux"; };
|
||||
pkgs_armv7l_linux = allPackages { system = "armv7l-linux"; };
|
||||
pkgs_x86_64_darwin = allPackages { system = "x86_64-darwin"; };
|
||||
pkgs_x86_64_freebsd = allPackages { system = "x86_64-freebsd"; };
|
||||
pkgs_i686_freebsd = allPackages { system = "i686-freebsd"; };
|
||||
|
Loading…
Reference in New Issue
Block a user