Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2020-01-02 21:41:13 +01:00
commit f08e3e38d4
118 changed files with 2412 additions and 2737 deletions

10
.github/CODEOWNERS vendored
View File

@ -11,7 +11,7 @@
/.github/CODEOWNERS @edolstra /.github/CODEOWNERS @edolstra
# Libraries # Libraries
/lib @edolstra @nbp /lib @edolstra @nbp @infinisil
/lib/systems @nbp @ericson2314 @matthewbauer /lib/systems @nbp @ericson2314 @matthewbauer
/lib/generators.nix @edolstra @nbp @Profpatsch /lib/generators.nix @edolstra @nbp @Profpatsch
/lib/debug.nix @edolstra @nbp @Profpatsch /lib/debug.nix @edolstra @nbp @Profpatsch
@ -30,9 +30,9 @@
/pkgs/build-support/setup-hooks @Ericson2314 /pkgs/build-support/setup-hooks @Ericson2314
# NixOS Internals # NixOS Internals
/nixos/default.nix @nbp /nixos/default.nix @nbp @infinisil
/nixos/lib/from-env.nix @nbp /nixos/lib/from-env.nix @nbp @infinisil
/nixos/lib/eval-config.nix @nbp /nixos/lib/eval-config.nix @nbp @infinisil
/nixos/doc/manual/configuration/abstractions.xml @nbp /nixos/doc/manual/configuration/abstractions.xml @nbp
/nixos/doc/manual/configuration/config-file.xml @nbp /nixos/doc/manual/configuration/config-file.xml @nbp
/nixos/doc/manual/configuration/config-syntax.xml @nbp /nixos/doc/manual/configuration/config-syntax.xml @nbp
@ -62,7 +62,7 @@
# Haskell # Haskell
/pkgs/development/compilers/ghc @basvandijk @cdepillabout /pkgs/development/compilers/ghc @basvandijk @cdepillabout
/pkgs/development/haskell-modules @basvandijk @cdepillabout /pkgs/development/haskell-modules @basvandijk @cdepillabout @infinisil
/pkgs/development/haskell-modules/default.nix @basvandijk @cdepillabout /pkgs/development/haskell-modules/default.nix @basvandijk @cdepillabout
/pkgs/development/haskell-modules/generic-builder.nix @basvandijk @cdepillabout /pkgs/development/haskell-modules/generic-builder.nix @basvandijk @cdepillabout
/pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout /pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout

View File

@ -102,7 +102,7 @@ let
commitIdFromGitRepo cleanSourceWith pathHasContext commitIdFromGitRepo cleanSourceWith pathHasContext
canCleanSource; canCleanSource;
inherit (modules) evalModules closeModules unifyModuleSyntax inherit (modules) evalModules closeModules unifyModuleSyntax
applyIfFunction unpackSubmodule packSubmodule mergeModules applyIfFunction mergeModules
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
pushDownProperties dischargeProperties filterOverrides pushDownProperties dischargeProperties filterOverrides
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride

View File

@ -103,42 +103,42 @@ rec {
toClosureList = file: parentKey: imap1 (n: x: toClosureList = file: parentKey: imap1 (n: x:
if isAttrs x || isFunction x then if isAttrs x || isFunction x then
let key = "${parentKey}:anon-${toString n}"; in let key = "${parentKey}:anon-${toString n}"; in
unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args) unifyModuleSyntax file key (applyIfFunction key x args)
else else
let file = toString x; key = toString x; in let file = toString x; key = toString x; in
unifyModuleSyntax file key (applyIfFunction key (import x) args)); unifyModuleSyntax file key (applyIfFunction key (import x) args));
in in
builtins.genericClosure { builtins.genericClosure {
startSet = toClosureList unknownModule "" modules; startSet = toClosureList unknownModule "" modules;
operator = m: toClosureList m.file m.key m.imports; operator = m: toClosureList m._file m.key m.imports;
}; };
/* Massage a module into canonical form, that is, a set consisting /* Massage a module into canonical form, that is, a set consisting
of options, config and imports attributes. */ of options, config and imports attributes. */
unifyModuleSyntax = file: key: m: unifyModuleSyntax = file: key: m:
let metaSet = if m ? meta let addMeta = config: if m ? meta
then { meta = m.meta; } then mkMerge [ config { meta = m.meta; } ]
else {}; else config;
in in
if m ? config || m ? options then if m ? config || m ? options then
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
if badAttrs != {} then if badAttrs != {} then
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'." throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
else else
{ file = m._file or file; { _file = m._file or file;
key = toString m.key or key; key = toString m.key or key;
disabledModules = m.disabledModules or []; disabledModules = m.disabledModules or [];
imports = m.imports or []; imports = m.imports or [];
options = m.options or {}; options = m.options or {};
config = mkMerge [ (m.config or {}) metaSet ]; config = addMeta (m.config or {});
} }
else else
{ file = m._file or file; { _file = m._file or file;
key = toString m.key or key; key = toString m.key or key;
disabledModules = m.disabledModules or []; disabledModules = m.disabledModules or [];
imports = m.require or [] ++ m.imports or []; imports = m.require or [] ++ m.imports or [];
options = {}; options = {};
config = mkMerge [ (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]) metaSet ]; config = addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]);
}; };
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
@ -171,17 +171,6 @@ rec {
else else
f; f;
/* We have to pack and unpack submodules. We cannot wrap the expected
result of the function as we would no longer be able to list the arguments
of the submodule. (see applyIfFunction) */
unpackSubmodule = unpack: m: args:
if isType "submodule" m then
{ _file = m.file; } // (unpack m.submodule args)
else unpack m args;
packSubmodule = file: m:
{ _type = "submodule"; file = file; submodule = m; };
/* Merge a list of modules. This will recurse over the option /* Merge a list of modules. This will recurse over the option
declarations in all modules, combining them into a single set. declarations in all modules, combining them into a single set.
At the same time, for each option declaration, it will merge the At the same time, for each option declaration, it will merge the
@ -189,7 +178,7 @@ rec {
in the value attribute of each option. */ in the value attribute of each option. */
mergeModules = prefix: modules: mergeModules = prefix: modules:
mergeModules' prefix modules mergeModules' prefix modules
(concatMap (m: map (config: { inherit (m) file; inherit config; }) (pushDownProperties m.config)) modules); (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
mergeModules' = prefix: options: configs: mergeModules' = prefix: options: configs:
let let
@ -223,7 +212,7 @@ rec {
) {} modules; ) {} modules;
# an attrset 'name' => list of submodules that declare name. # an attrset 'name' => list of submodules that declare name.
declsByName = byName "options" (module: option: declsByName = byName "options" (module: option:
[{ inherit (module) file; options = option; }] [{ inherit (module) _file; options = option; }]
) options; ) options;
# an attrset 'name' => list of submodules that define name. # an attrset 'name' => list of submodules that define name.
defnsByName = byName "config" (module: value: defnsByName = byName "config" (module: value:
@ -250,7 +239,7 @@ rec {
firstOption = findFirst (m: isOption m.options) "" decls; firstOption = findFirst (m: isOption m.options) "" decls;
firstNonOption = findFirst (m: !isOption m.options) "" decls; firstNonOption = findFirst (m: !isOption m.options) "" decls;
in in
throw "The option `${showOption loc}' in `${firstOption.file}' is a prefix of options in `${firstNonOption.file}'." throw "The option `${showOption loc}' in `${firstOption._file}' is a prefix of options in `${firstNonOption._file}'."
else else
mergeModules' loc decls defns mergeModules' loc decls defns
)) ))
@ -267,7 +256,14 @@ rec {
'opts' is a list of modules. Each module has an options attribute which 'opts' is a list of modules. Each module has an options attribute which
correspond to the definition of 'loc' in 'opt.file'. */ correspond to the definition of 'loc' in 'opt.file'. */
mergeOptionDecls = loc: opts: mergeOptionDecls =
let
packSubmodule = file: m:
{ _file = file; imports = [ m ]; };
coerceOption = file: opt:
if isFunction opt then packSubmodule file opt
else packSubmodule file { options = opt; };
in loc: opts:
foldl' (res: opt: foldl' (res: opt:
let t = res.type; let t = res.type;
t' = opt.options.type; t' = opt.options.type;
@ -284,7 +280,7 @@ rec {
bothHave "apply" || bothHave "apply" ||
(bothHave "type" && (! typesMergeable)) (bothHave "type" && (! typesMergeable))
then then
throw "The option `${showOption loc}' in `${opt.file}' is already declared in ${showFiles res.declarations}." throw "The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}."
else else
let let
/* Add the modules of the current option to the list of modules /* Add the modules of the current option to the list of modules
@ -293,16 +289,14 @@ rec {
current option declaration as the file use for the submodule. If the current option declaration as the file use for the submodule. If the
submodule defines any filename, then we ignore the enclosing option file. */ submodule defines any filename, then we ignore the enclosing option file. */
options' = toList opt.options.options; options' = toList opt.options.options;
coerceOption = file: opt:
if isFunction opt then packSubmodule file opt
else packSubmodule file { options = opt; };
getSubModules = opt.options.type.getSubModules or null; getSubModules = opt.options.type.getSubModules or null;
submodules = submodules =
if getSubModules != null then map (packSubmodule opt.file) getSubModules ++ res.options if getSubModules != null then map (packSubmodule opt._file) getSubModules ++ res.options
else if opt.options ? options then map (coerceOption opt.file) options' ++ res.options else if opt.options ? options then map (coerceOption opt._file) options' ++ res.options
else res.options; else res.options;
in opt.options // res // in opt.options // res //
{ declarations = res.declarations ++ [opt.file]; { declarations = res.declarations ++ [opt._file];
options = submodules; options = submodules;
} // typeSet } // typeSet
) { inherit loc; declarations = []; options = []; } opts; ) { inherit loc; declarations = []; options = []; } opts;

View File

@ -164,6 +164,24 @@ checkConfigOutput "true" config.enableAlias ./alias-with-priority.nix
checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix
checkConfigOutput "false" config.enableAlias ./alias-with-priority-can-override.nix checkConfigOutput "false" config.enableAlias ./alias-with-priority-can-override.nix
# submoduleWith
## specialArgs should work
checkConfigOutput "foo" config.submodule.foo ./declare-submoduleWith-special.nix
## shorthandOnlyDefines config behaves as expected
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix
checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix
checkConfigError 'value is a boolean while a set was expected' config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix
## submoduleWith should merge all modules in one swoop
checkConfigOutput "true" config.submodule.inner ./declare-submoduleWith-modules.nix
checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.nix
## Paths should be allowed as values and work as expected
checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
cat <<EOF cat <<EOF
====== module tests ====== ====== module tests ======
$pass Pass $pass Pass

View File

@ -0,0 +1,30 @@
{ lib, ... }: {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [
{
options.inner = lib.mkOption {
type = lib.types.bool;
default = false;
};
}
{
outer = true;
}
];
};
default = {};
};
config.submodule = lib.mkMerge [
({ lib, ... }: {
options.outer = lib.mkOption {
type = lib.types.bool;
default = false;
};
})
{
inner = true;
}
];
}

View File

@ -0,0 +1,13 @@
{ lib, ... }: let
sub.options.config = lib.mkOption {
type = lib.types.bool;
default = false;
};
in {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [ sub ];
};
default = {};
};
}

View File

@ -0,0 +1,12 @@
{ lib, ... }: {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [
./declare-enable.nix
];
};
default = {};
};
config.submodule = ./define-enable.nix;
}

View File

@ -0,0 +1,14 @@
{ lib, ... }: let
sub.options.config = lib.mkOption {
type = lib.types.bool;
default = false;
};
in {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [ sub ];
shorthandOnlyDefinesConfig = true;
};
default = {};
};
}

View File

@ -0,0 +1,17 @@
{ lib, ... }: {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [
({ lib, ... }: {
options.foo = lib.mkOption {
default = lib.foo;
};
})
];
specialArgs.lib = lib // {
foo = "foo";
};
};
default = {};
};
}

View File

@ -0,0 +1,3 @@
{
submodule.config.config = true;
}

View File

@ -0,0 +1,3 @@
{
submodule.config = true;
}

View File

@ -358,25 +358,43 @@ rec {
}; };
# A submodule (like typed attribute set). See NixOS manual. # A submodule (like typed attribute set). See NixOS manual.
submodule = opts: submodule = modules: submoduleWith {
shorthandOnlyDefinesConfig = true;
modules = toList modules;
};
submoduleWith =
{ modules
, specialArgs ? {}
, shorthandOnlyDefinesConfig ? false
}@attrs:
let let
opts' = toList opts;
inherit (lib.modules) evalModules; inherit (lib.modules) evalModules;
coerce = unify: value: if isFunction value
then setFunctionArgs (args: unify (value args)) (functionArgs value)
else unify (if shorthandOnlyDefinesConfig then { config = value; } else value);
allModules = defs: modules ++ imap1 (n: { value, file }:
if isAttrs value || isFunction value then
# Annotate the value with the location of its definition for better error messages
coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value
else value
) defs;
in in
mkOptionType rec { mkOptionType rec {
name = "submodule"; name = "submodule";
check = x: isAttrs x || isFunction x; check = x: isAttrs x || isFunction x || path.check x;
merge = loc: defs: merge = loc: defs:
let (evalModules {
coerce = def: if isFunction def then def else { config = def; }; modules = allModules defs;
modules = opts' ++ map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs; inherit specialArgs;
in (evalModules {
inherit modules;
args.name = last loc; args.name = last loc;
prefix = loc; prefix = loc;
}).config; }).config;
getSubOptions = prefix: (evalModules getSubOptions = prefix: (evalModules
{ modules = opts'; inherit prefix; { inherit modules prefix specialArgs;
# This is a work-around due to the fact that some sub-modules, # This is a work-around due to the fact that some sub-modules,
# such as the one included in an attribute set, expects a "args" # such as the one included in an attribute set, expects a "args"
# attribute to be given to the sub-module. As the option # attribute to be given to the sub-module. As the option
@ -394,13 +412,29 @@ rec {
# It shouldn't cause an issue since this is cosmetic for the manual. # It shouldn't cause an issue since this is cosmetic for the manual.
args.name = "name"; args.name = "name";
}).options; }).options;
getSubModules = opts'; getSubModules = modules;
substSubModules = m: submodule m; substSubModules = m: submoduleWith (attrs // {
functor = (defaultFunctor name) // { modules = m;
# Merging of submodules is done as part of mergeOptionDecls, as we have to annotate });
# each submodule with its location. functor = defaultFunctor name // {
payload = []; type = types.submoduleWith;
binOp = lhs: rhs: []; payload = {
modules = modules;
specialArgs = specialArgs;
shorthandOnlyDefinesConfig = shorthandOnlyDefinesConfig;
};
binOp = lhs: rhs: {
modules = lhs.modules ++ rhs.modules;
specialArgs =
let intersecting = builtins.intersectAttrs lhs.specialArgs rhs.specialArgs;
in if intersecting == {}
then lhs.specialArgs // rhs.specialArgs
else throw "A submoduleWith option is declared multiple times with the same specialArgs \"${toString (attrNames intersecting)}\"";
shorthandOnlyDefinesConfig =
if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig
then lhs.shorthandOnlyDefinesConfig
else throw "A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values";
};
}; };
}; };

View File

@ -1471,6 +1471,12 @@
githubId = 143982; githubId = 143982;
name = "Charles Strahan"; name = "Charles Strahan";
}; };
cswank = {
email = "craigswank@gmail.com";
github = "cswank";
githubId = 490965;
name = "Craig Swank";
};
cwoac = { cwoac = {
email = "oliver@codersoffortune.net"; email = "oliver@codersoffortune.net";
github = "cwoac"; github = "cwoac";
@ -4846,6 +4852,12 @@
githubId = 69918; githubId = 69918;
name = "Stefan Dorn"; name = "Stefan Dorn";
}; };
multun = {
email = "victor.collod@epita.fr";
github = "multun";
githubId = 5047140;
name = "Victor Collod";
};
mvnetbiz = { mvnetbiz = {
email = "mvnetbiz@gmail.com"; email = "mvnetbiz@gmail.com";
github = "mvnetbiz"; github = "mvnetbiz";
@ -5822,6 +5834,12 @@
github = "rickynils"; github = "rickynils";
name = "Rickard Nilsson"; name = "Rickard Nilsson";
}; };
rika = {
email = "rika@paymentswit.ch";
github = "NekomimiScience";
githubId = 1810487;
name = "Rika";
};
rileyinman = { rileyinman = {
email = "rileyminman@gmail.com"; email = "rileyminman@gmail.com";
github = "rileyinman"; github = "rileyinman";

View File

@ -257,14 +257,68 @@
<listitem> <listitem>
<para> <para>
A set of sub options <replaceable>o</replaceable>. A set of sub options <replaceable>o</replaceable>.
<replaceable>o</replaceable> can be an attribute set or a function <replaceable>o</replaceable> can be an attribute set, a function
returning an attribute set. Submodules are used in composed types to returning an attribute set, or a path to a file containing such a value. Submodules are used in
create modular options. Submodule are detailed in composed types to create modular options. This is equivalent to
<literal>types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }</literal>.
Submodules are detailed in
<xref <xref
linkend='section-option-types-submodule' />. linkend='section-option-types-submodule' />.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<varname>types.submoduleWith</varname> {
<replaceable>modules</replaceable>,
<replaceable>specialArgs</replaceable> ? {},
<replaceable>shorthandOnlyDefinesConfig</replaceable> ? false }
</term>
<listitem>
<para>
Like <varname>types.submodule</varname>, but more flexible and with better defaults.
It has parameters
<itemizedlist>
<listitem><para>
<replaceable>modules</replaceable>
A list of modules to use by default for this submodule type. This gets combined
with all option definitions to build the final list of modules that will be included.
<note><para>
Only options defined with this argument are included in rendered documentation.
</para></note>
</para></listitem>
<listitem><para>
<replaceable>specialArgs</replaceable>
An attribute set of extra arguments to be passed to the module functions.
The option <literal>_module.args</literal> should be used instead
for most arguments since it allows overriding. <replaceable>specialArgs</replaceable> should only be
used for arguments that can&apos;t go through the module fixed-point, because of
infinite recursion or other problems. An example is overriding the
<varname>lib</varname> argument, because <varname>lib</varname> itself is used
to define <literal>_module.args</literal>, which makes using
<literal>_module.args</literal> to define it impossible.
</para></listitem>
<listitem><para>
<replaceable>shorthandOnlyDefinesConfig</replaceable>
Whether definitions of this type should default to the <literal>config</literal>
section of a module (see <xref linkend='ex-module-syntax'/>) if it is an attribute
set. Enabling this only has a benefit when the submodule defines an option named
<literal>config</literal> or <literal>options</literal>. In such a case it would
allow the option to be set with <literal>the-submodule.config = "value"</literal>
instead of requiring <literal>the-submodule.config.config = "value"</literal>.
This is because only when modules <emphasis>don&apos;t</emphasis> set the
<literal>config</literal> or <literal>options</literal> keys, all keys are interpreted
as option definitions in the <literal>config</literal> section. Enabling this option
implicitly puts all attributes in the <literal>config</literal> section.
</para>
<para>
With this option enabled, defining a non-<literal>config</literal> section requires
using a function: <literal>the-submodule = { ... }: { options = { ... }; }</literal>.
</para></listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</section> </section>

View File

@ -198,10 +198,11 @@ in
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
services.udev.extraRules = services.udev.extraRules =
'' ''
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'" KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'" KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'" KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'"
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
''; '';
boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ]; boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];

View File

@ -66,7 +66,7 @@ in
type = types.package; type = types.package;
default = pkgs.redmine; default = pkgs.redmine;
description = "Which Redmine package to use."; description = "Which Redmine package to use.";
example = "pkgs.redmine.override { ruby = pkgs.ruby_2_4; }"; example = "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
}; };
user = mkOption { user = mkOption {

View File

@ -11,6 +11,7 @@ let
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
enableIwd = cfg.wifi.backend == "iwd";
in { in {
imports = [ imports = [
@ -56,6 +57,17 @@ in {
''; '';
}; };
wifi = {
backend = mkOption {
type = types.enum [ "wpa_supplicant" "iwd" ];
default = "wpa_supplicant";
description = ''
Specify the Wi-Fi backend used.
Currently supported are <option>wpa_supplicant</option> or <option>iwd</option>.
'';
};
};
extraFlags = mkOption { extraFlags = mkOption {
type = with types; listOf str; type = with types; listOf str;
default = [ ]; default = [ ];
@ -76,9 +88,6 @@ in {
assertions = [{ assertions = [{
assertion = !config.networking.useDHCP; assertion = !config.networking.useDHCP;
message = "You can not use services.connman with networking.useDHCP"; message = "You can not use services.connman with networking.useDHCP";
}{
assertion = config.networking.wireless.enable;
message = "You must use services.connman with networking.wireless";
}{ }{
assertion = !config.networking.networkmanager.enable; assertion = !config.networking.networkmanager.enable;
message = "You can not use services.connman with networking.networkmanager"; message = "You can not use services.connman with networking.networkmanager";
@ -89,12 +98,18 @@ in {
systemd.services.connman = { systemd.services.connman = {
description = "Connection service"; description = "Connection service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ]; after = [ "syslog.target" ] ++ optional enableIwd "iwd.service";
requires = optional enableIwd "iwd.service";
serviceConfig = { serviceConfig = {
Type = "dbus"; Type = "dbus";
BusName = "net.connman"; BusName = "net.connman";
Restart = "on-failure"; Restart = "on-failure";
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon ${toString cfg.extraFlags}"; ExecStart = toString ([
"${pkgs.connman}/sbin/connmand"
"--config=${configFile}"
"--nodaemon"
] ++ optional enableIwd "--wifi=iwd_agent"
++ cfg.extraFlags);
StandardOutput = "null"; StandardOutput = "null";
}; };
}; };
@ -125,7 +140,12 @@ in {
networking = { networking = {
useDHCP = false; useDHCP = false;
wireless.enable = true; wireless = {
enable = mkIf (!enableIwd) true;
iwd = mkIf enableIwd {
enable = true;
};
};
networkmanager.enable = false; networkmanager.enable = false;
}; };
}; };

View File

@ -308,6 +308,7 @@ in {
if [ "$2" != "up" ]; then if [ "$2" != "up" ]; then
logger "exit: event $2 != up" logger "exit: event $2 != up"
exit
fi fi
# coreutils and iproute are in PATH too # coreutils and iproute are in PATH too

View File

@ -112,12 +112,12 @@ in {
addresses = [ "tcp://192.168.0.10:51820" ]; addresses = [ "tcp://192.168.0.10:51820" ];
}; };
}; };
type = types.attrsOf (types.submodule ({ config, ... }: { type = types.attrsOf (types.submodule ({ name, ... }: {
options = { options = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
Name of the device Name of the device
''; '';
@ -175,7 +175,7 @@ in {
devices = [ "bigbox" ]; devices = [ "bigbox" ];
}; };
}; };
type = types.attrsOf (types.submodule ({ config, ... }: { type = types.attrsOf (types.submodule ({ name, ... }: {
options = { options = {
enable = mkOption { enable = mkOption {
@ -190,7 +190,7 @@ in {
path = mkOption { path = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The path to the folder which should be shared. The path to the folder which should be shared.
''; '';
@ -198,7 +198,7 @@ in {
id = mkOption { id = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The id of the folder. Must be the same on all devices. The id of the folder. Must be the same on all devices.
''; '';
@ -206,7 +206,7 @@ in {
label = mkOption { label = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The label of the folder. The label of the folder.
''; '';

View File

@ -567,7 +567,7 @@ in
sslProtocols = mkOption { sslProtocols = mkOption {
type = types.str; type = types.str;
default = "All -SSLv2 -SSLv3 -TLSv1"; default = "All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1";
example = "All -SSLv2 -SSLv3"; example = "All -SSLv2 -SSLv3";
description = "Allowed SSL/TLS protocol versions."; description = "Allowed SSL/TLS protocol versions.";
}; };

View File

@ -186,7 +186,7 @@ let
++ map escapeShellArg container.cmd ++ map escapeShellArg container.cmd
); );
ExecStartPre = "-${pkgs.docker}/bin/docker rm -f %n"; ExecStartPre = "-${pkgs.docker}/bin/docker rm -f %n";
ExecStop = "${pkgs.docker}/bin/docker stop %n"; ExecStop = ''${pkgs.bash}/bin/sh -c "[ $SERVICE_RESULT = success ] || ${pkgs.docker}/bin/docker stop %n"'';
ExecStopPost = "-${pkgs.docker}/bin/docker rm -f %n"; ExecStopPost = "-${pkgs.docker}/bin/docker rm -f %n";
### There is no generalized way of supporting `reload` for docker ### There is no generalized way of supporting `reload` for docker

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "3proxy"; name = "3proxy";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ misuzu ]; maintainers = [ misuzu ];
@ -134,29 +134,52 @@ import ./make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll; peer1.wait_for_unit("3proxy.service")
peer1.wait_for_open_port("9999")
$peer1->waitForUnit("3proxy.service");
# test none auth # test none auth
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://216.58.211.112:9999"); peer0.succeed(
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://192.168.0.2:9999"); "${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://216.58.211.112:9999"
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://127.0.0.1:9999"); )
peer0.succeed(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://192.168.0.2:9999"
)
peer0.succeed(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://127.0.0.1:9999"
)
$peer2->waitForUnit("3proxy.service"); peer2.wait_for_unit("3proxy.service")
peer2.wait_for_open_port("9999")
# test iponly auth # test iponly auth
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://216.58.211.113:9999"); peer0.succeed(
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://192.168.0.3:9999"); "${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://216.58.211.113:9999"
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://127.0.0.1:9999"); )
peer0.fail(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://192.168.0.3:9999"
)
peer0.fail(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://127.0.0.1:9999"
)
$peer3->waitForUnit("3proxy.service"); peer3.wait_for_unit("3proxy.service")
peer3.wait_for_open_port("9999")
# test strong auth # test strong auth
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"); peer0.succeed(
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"); "${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"); )
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"); peer0.fail(
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://127.0.0.1:9999"); "${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"
)
peer0.fail(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"
)
peer0.fail(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"
)
peer0.fail(
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://127.0.0.1:9999"
)
''; '';
}) })

View File

@ -1,6 +1,6 @@
# This test runs haka and probes it with hakactl # This test runs haka and probes it with hakactl
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "haka"; name = "haka";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ tvestelind ]; maintainers = [ tvestelind ];
@ -15,10 +15,10 @@ import ./make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll; start_all()
$haka->waitForUnit("haka.service"); haka.wait_for_unit("haka.service")
$haka->succeed("hakactl status"); haka.succeed("hakactl status")
$haka->succeed("hakactl stop"); haka.succeed("hakactl stop")
''; '';
}) })

View File

@ -1,9 +1,15 @@
# Test whether fast reboots via kexec work. # Test whether fast reboots via kexec work.
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, lib, ...} : {
name = "kexec"; name = "kexec";
meta = with pkgs.stdenv.lib.maintainers; { meta = with lib.maintainers; {
maintainers = [ eelco ]; maintainers = [ eelco ];
# Currently hangs forever; last output is:
# machine # [ 10.239914] dhcpcd[707]: eth0: adding default route via fe80::2
# machine: waiting for the VM to finish booting
# machine # Cannot find the ESP partition mount point.
# machine # [ 28.681197] nscd[692]: 692 checking for monitored file `/etc/netgroup': No such file or directory
broken = true;
}; };
machine = { ... }: machine = { ... }:
@ -11,9 +17,9 @@ import ./make-test.nix ({ pkgs, ...} : {
testScript = testScript =
'' ''
$machine->waitForUnit("multi-user.target"); machine.wait_for_unit("multi-user.target")
$machine->execute("systemctl kexec &"); machine.execute("systemctl kexec &")
$machine->{connected} = 0; machine.connected = False
$machine->waitForUnit("multi-user.target"); machine.wait_for_unit("multi-user.target")
''; '';
}) })

View File

@ -27,6 +27,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
{ {
users.users.testuser = { }; users.users.testuser = { };
users.users.testuser2 = { };
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" '' services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
ALTER USER root@localhost IDENTIFIED WITH unix_socket; ALTER USER root@localhost IDENTIFIED WITH unix_socket;
@ -34,12 +35,17 @@ import ./make-test-python.nix ({ pkgs, ...} : {
DELETE FROM mysql.user WHERE user = '''; DELETE FROM mysql.user WHERE user = ''';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
''; '';
services.mysql.ensureDatabases = [ "testdb" ]; services.mysql.ensureDatabases = [ "testdb" "testdb2" ];
services.mysql.ensureUsers = [{ services.mysql.ensureUsers = [{
name = "testuser"; name = "testuser";
ensurePermissions = { ensurePermissions = {
"testdb.*" = "ALL PRIVILEGES"; "testdb.*" = "ALL PRIVILEGES";
}; };
} {
name = "testuser2";
ensurePermissions = {
"testdb2.*" = "ALL PRIVILEGES";
};
}]; }];
services.mysql.package = pkgs.mariadb; services.mysql.package = pkgs.mariadb;
}; };
@ -47,7 +53,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
start_all start_all()
mysql.wait_for_unit("mysql") mysql.wait_for_unit("mysql")
mysql.succeed("echo 'use empty_testdb;' | mysql -u root") mysql.succeed("echo 'use empty_testdb;' | mysql -u root")
@ -62,6 +68,14 @@ import ./make-test-python.nix ({ pkgs, ...} : {
mariadb.succeed( mariadb.succeed(
"echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser" "echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser"
) )
# Ensure testuser2 is not able to insert into testdb as mysql testuser2
mariadb.fail(
"echo 'use testdb; insert into tests values (23);' | sudo -u testuser2 mysql -u testuser2"
)
# Ensure testuser2 is not able to authenticate as mysql testuser
mariadb.fail(
"echo 'use testdb; insert into tests values (23);' | sudo -u testuser2 mysql -u testuser"
)
mariadb.succeed( mariadb.succeed(
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42" "echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
) )

View File

@ -25,6 +25,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
# check if the netdata main page loads. # check if the netdata main page loads.
netdata.succeed("curl --fail http://localhost:19999/") netdata.succeed("curl --fail http://localhost:19999/")
netdata.succeed("sleep 4")
# check if netdata can read disk ops for root owned processes. # check if netdata can read disk ops for root owned processes.
# if > 0, successful. verifies both netdata working and # if > 0, successful. verifies both netdata working and

View File

@ -1,16 +1,25 @@
{ fetchurl, bitwig-studio1, { fetchurl, bitwig-studio1, pulseaudio, xorg }:
pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec { bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}"; name = "bitwig-studio-${version}";
version = "3.0.3"; version = "3.1.1";
src = fetchurl { src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb"; url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
sha256 = "162l95imq2fb4blfkianlkymm690by9ri73xf9zigknqf0gacgsa"; sha256 = "1mgyyl1mr8hmzn3qdmg77km6sk58hyd0gsqr9jksh0a8p6hj24pk";
}; };
buildInputs = oldAttrs.buildInputs ++ [ xorg.libXtst ];
runtimeDependencies = [ runtimeDependencies = [
pulseaudio pulseaudio
]; ];
installPhase = ''
${oldAttrs.installPhase}
# recover commercial jre
rm -f $out/libexec/lib/jre
cp -r opt/bitwig-studio/lib/jre $out/libexec/lib
'';
}) })

View File

@ -3,11 +3,11 @@
mkDerivation rec { mkDerivation rec {
pname = "qsampler"; pname = "qsampler";
version = "0.6.0"; version = "0.6.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz"; url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
sha256 = "1krhjyd67hvnv6sgndwq81lfvnb4qkhc7da1119fn2lzl7hx9wh3"; sha256 = "1wr7k739zx2nz00b810f60g9k3y92w05nfci987hw7y2sks9rd8j";
}; };
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ]; nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools { stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools, wrapQtAppsHook
, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2 , dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }: , liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
@ -15,7 +15,8 @@ stdenv.mkDerivation (rec {
substituteInPlace src/CMakeLists.txt --replace svnheader svnversion substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
''; '';
nativeBuildInputs = [ cmake makedepend perl pkgconfig qttools ]; nativeBuildInputs =
[ cmake makedepend perl pkgconfig qttools wrapQtAppsHook ];
buildInputs = [ buildInputs = [
dssi dssi

View File

@ -18,9 +18,9 @@ let
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q"; sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
}; };
latestVersion = { # canary & dev latestVersion = { # canary & dev
version = "4.0.0.6"; # "Android Studio 4.0 Canary 6" version = "4.0.0.7"; # "Android Studio 4.0 Canary 7"
build = "193.6052267"; build = "193.6085562";
sha256Hash = "1naxyfnrj7milqha7xbwbcvyi81a7fqb7jsm03hhq5xs2sw55m1c"; sha256Hash = "0vk1vwh2yhsmadkb3v3m042ckzizc41ckqvj3jax8p86gl0b4whj";
}; };
in { in {
# Attributes are named by their corresponding release channels # Attributes are named by their corresponding release channels

View File

@ -3,14 +3,14 @@
let let
versions = { versions = {
atom = { atom = {
version = "1.36.1"; version = "1.42.0";
sha256 = "1m7q2r3zx463k7kpqb364piqrr69wrhs033ibzxdx9y7r4204qp4"; sha256 = "1ira528nwxi30jfwyivlac3wkkqb9d2z4jhxwq5m7mnpm5yli6jy";
}; };
atom-beta = { atom-beta = {
version = "1.37.0"; version = "1.43.0";
beta = 0; beta = 0;
sha256 = "0aq8r5vfgq7r31qajjgcg4n5a57a2m8fvq6fzy9vq5gawkvmaxxx"; sha256 = "06if3w5hx7njmyal0012zawn8f5af1z4bjcbzj2c0gd15nlsgm95";
}; };
}; };

View File

@ -1,6 +1,6 @@
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig { stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig
, libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr , libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret , gconf, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk
}: }:
let let
@ -10,7 +10,7 @@ let
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
xorg.libxcb libsecret xorg.libxcb libsecret libuuid at-spi2-atk
]; ];
libPathNative = lib.makeLibraryPath packages; libPathNative = lib.makeLibraryPath packages;

View File

@ -3,56 +3,43 @@
, xorg ? null , xorg ? null
, vulkan-loader ? null }: , vulkan-loader ? null }:
assert stdenv.isLinux -> xorg != null; with stdenv.lib;
assert stdenv.isLinux -> vulkan-loader != null;
let rustPlatform.buildRustPackage rec {
graphicsBackend = if stdenv.isDarwin then "metal" else "vulkan"; pname = "rx";
in version = "0.3.0";
with stdenv.lib;
rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cloudhead"; owner = "cloudhead";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "0f6cw8zqr45bprj8ibhp89bb2a077g4zinfrdn943csdmh47qzcl"; sha256 = "0mhpq9x54d884ydmfv1358sgc4jc7bghfx2y0k7p879hyyxr52v1";
}; };
cargoSha256 = "05bqsw0nw24xysq86qa3hx9b5ncf50wfxsgpy388yrs2dfnphwlx"; cargoSha256 = "0fnrgijfkvapj1yyy9grnqh2vkciisf029af0gfwyzsxzdi62gg5";
nativeBuildInputs = [ cmake pkgconfig makeWrapper ]; nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
buildInputs = optionals stdenv.isLinux buildInputs = optionals stdenv.isLinux
(with xorg; [ (with xorg; [
# glfw-sys dependencies: # glfw-sys dependencies:
libX11 libXrandr libXinerama libXcursor libXi libXext libX11 libXrandr libXinerama libXcursor libXi libXext
]); ]);
cargoBuildFlags = [ "--features=${graphicsBackend}" ]; # FIXME: GLFW (X11) requires DISPLAY env variable for all tests
doCheck = false;
# TODO: better to factor that into the rust platform postInstall = optional stdenv.isLinux ''
checkPhase = '' mkdir -p $out/share/applications
runHook preCheck cp $src/rx.desktop $out/share/applications
echo "Running cargo test" wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
cargo test --features=${graphicsBackend} '';
runHook postCheck
'';
postInstall = optional stdenv.isLinux '' meta = {
mkdir -p $out/share/applications description = "Modern and extensible pixel editor implemented in Rust";
cp $src/rx.desktop $out/share/applications homepage = "https://cloudhead.io/rx/";
wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib license = licenses.gpl3;
''; maintainers = with maintainers; [ minijackson filalex77 ];
platforms = [ "x86_64-linux" ];
meta = { };
description = "Modern and extensible pixel editor implemented in Rust"; }
homepage = "https://cloudhead.io/rx/";
license = licenses.gpl3;
maintainers = with maintainers; [ minijackson ];
platforms = with platforms; (linux ++ darwin ++ windows);
inherit version;
};
}

View File

@ -9,19 +9,25 @@ assert ncursesSupport -> ncurses != null;
assert waylandSupport -> wayland != null; assert waylandSupport -> wayland != null;
assert x11Support -> xlibs != null && xorg != null; assert x11Support -> xlibs != null && xorg != null;
stdenv.mkDerivation { stdenv.mkDerivation rec {
pname = "bemenu"; pname = "bemenu";
version = "0.1.0"; version = "0.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Cloudef"; owner = "Cloudef";
repo = "bemenu"; repo = pname;
rev = "33e540a2b04ce78f5c7ab4a60b899c67f586cc32"; rev = version;
sha256 = "11h55m9dx6ai12pqij52ydjm36dvrcc856pa834njihrp626pl4w"; sha256 = "03k8wijdgj5nwmvgjhsrlh918n719789fhs4dqm23pd00rapxipk";
}; };
nativeBuildInputs = [ cmake pkgconfig pcre ]; nativeBuildInputs = [ cmake pkgconfig pcre ];
cmakeFlags = [
"-DBEMENU_CURSES_RENDERER=${if ncursesSupport then "ON" else "OFF"}"
"-DBEMENU_WAYLAND_RENDERER=${if waylandSupport then "ON" else "OFF"}"
"-DBEMENU_X11_RENDERER=${if x11Support then "ON" else "OFF"}"
];
buildInputs = with stdenv.lib; [ buildInputs = with stdenv.lib; [
cairo cairo
fribidi fribidi

View File

@ -4,18 +4,20 @@ with stdenv.lib;
perlPackages.buildPerlPackage rec { perlPackages.buildPerlPackage rec {
pname = "get_iplayer"; pname = "get_iplayer";
version = "2.99"; version = "3.24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "get-iplayer"; owner = "get-iplayer";
repo = "get_iplayer"; repo = "get_iplayer";
rev = "v${version}"; rev = "v${version}";
sha256 = "085bgwkjnaqp96gvd2s8qmkw69rz91si1sgzqdqbplkzj9bk2qii"; sha256 = "0yd84ncb6cjrk4v4kz3zrddkl7iwkm3zlfbjyswd9hanp8fvd4q3";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ]; buildInputs = [ perl ];
propagatedBuildInputs = with perlPackages; [HTMLParser HTTPCookies LWP XMLLibXML XMLSimple]; propagatedBuildInputs = with perlPackages; [
HTMLParser HTTPCookies LWP LWPProtocolHttps XMLLibXML XMLSimple
];
preConfigure = "touch Makefile.PL"; preConfigure = "touch Makefile.PL";
doCheck = false; doCheck = false;
@ -33,6 +35,7 @@ perlPackages.buildPerlPackage rec {
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
homepage = https://squarepenguin.co.uk/; homepage = https://squarepenguin.co.uk/;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ rika ];
}; };
} }

View File

@ -0,0 +1,23 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, qttools, qtbase }:
mkDerivation rec {
pname = "heimer";
version = "1.12.0";
src = fetchFromGitHub {
owner = "juzzlin";
repo = pname;
rev = version;
sha256 = "1gw4w6cvr3vb4zdb1kq8gwmadh2lb0jd0bd2hc7cw2d5kdbjaln7";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ qttools qtbase ];
meta = with lib; {
description = "Simple cross-platform mind map and note-taking tool written in Qt";
homepage = "https://github.com/juzzlin/Heimer";
license = licenses.gpl3;
maintainers = with maintainers; [ dtzWill ];
};
}

View File

@ -2,12 +2,12 @@
let let
pname = "joplin-desktop"; pname = "joplin-desktop";
version = "1.0.167"; version = "1.0.177";
in appimageTools.wrapType2 rec { in appimageTools.wrapType2 rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage"; url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.AppImage";
sha256 = "062f2av60490ffrml0q8zv68yir6zaqif0g3d32c985gcvmgn9lw"; sha256 = "023q3yxqsv0vd76bvfhyhh0pnfia01rflfpyv0i6w6xnb5hm2jp7";
}; };

View File

@ -2,22 +2,23 @@
, pkgconfig, meson, ninja, python3 , pkgconfig, meson, ninja, python3
, wrapGAppsHook, vala, shared-mime-info , wrapGAppsHook, vala, shared-mime-info
, cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive , cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive
, discount, gtksourceview3
, hicolor-icon-theme # for setup-hook , hicolor-icon-theme # for setup-hook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "minder"; pname = "minder";
version = "1.5.1"; version = "1.6.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "phase1geo"; owner = "phase1geo";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1z3if8bbiigb3m5py641y0j8d9z0s6kbb325waxbqs240pcxipml"; sha256 = "0zma6hjx0068ih7fagb1gg5cgci0ccc764sd8qw6iglg61aihpx7";
}; };
nativeBuildInputs = [ pkgconfig meson ninja python3 wrapGAppsHook vala shared-mime-info ]; nativeBuildInputs = [ pkgconfig meson ninja python3 wrapGAppsHook vala shared-mime-info ];
buildInputs = [ cairo pantheon.granite glib gtk3 libxml2 libgee libarchive hicolor-icon-theme ]; buildInputs = [ cairo pantheon.granite glib gtk3 libxml2 libgee libarchive hicolor-icon-theme discount gtksourceview3 ];
postPatch = '' postPatch = ''
chmod +x meson/post_install.py chmod +x meson/post_install.py

View File

@ -26,13 +26,13 @@ assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "polybar"; pname = "polybar";
version = "3.4.1"; version = "3.4.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1z1m6dxh2i5vsnkzaccb9j02ab05wgmcgig5d0l9w856g5jp3zmy"; sha256 = "1ss4wzy68dpqr5a4m090nn36v8wsp4a7pj6whcxxdrrimgww5r88";
fetchSubmodules = true; fetchSubmodules = true;
}; };

View File

@ -7,13 +7,13 @@ assert imagePreviewSupport -> w3m != null;
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "ranger-${version}"; name = "ranger-${version}";
version = "1.9.2"; version = "1.9.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ranger"; owner = "ranger";
repo = "ranger"; repo = "ranger";
rev = "v${version}"; rev = "v${version}";
sha256= "1ws6g8z1m1hfp8bv4msvbaa9f7948p687jmc8h69yib4jkv3qyax"; sha256= "1rygfryczanvqxn43lmlkgs04sbqznbvbb9hlbm3h5qgdcl0xlw8";
}; };
LC_ALL = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8";

View File

@ -55,6 +55,7 @@ in stdenv.mkDerivation rec {
configurePhase = '' configurePhase = ''
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
export MOZCONFIG=$(pwd)/mozconfig export MOZCONFIG=$(pwd)/mozconfig
export MOZ_NOSPAM=1
export builddir=$(pwd)/pmbuild export builddir=$(pwd)/pmbuild
echo > $MOZCONFIG " echo > $MOZCONFIG "

View File

@ -2,12 +2,12 @@
let let
pname = "ssb-patchwork"; pname = "ssb-patchwork";
version = "3.17.1"; version = "3.17.2";
name = "Patchwork-${version}"; name = "Patchwork-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage"; url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
sha256 = "06wcgdcagmh80nr8nyrnz83wgq7j8r96hn3ccka7nmn02pdgvp3k"; sha256 = "1pmy01jwdr461vsl4fsxi3jaqnjx9yl5dw4987y5g73qx21qc5d5";
}; };
binary = appimageTools.wrapType2 { binary = appimageTools.wrapType2 {

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ]; buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
patchPhase = '' patchPhase = ''
sed -i "s|local daemon.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh sed -i "s|local daemon=.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh
''; '';
installPhase = '' installPhase = ''
install -Dm755 gitstatusd $out/bin/gitstatusd install -Dm755 gitstatusd $out/bin/gitstatusd

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mpv-mpris-${version}.so"; name = "mpv-mpris-${version}.so";
version = "0.2"; version = "0.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hoyon"; owner = "hoyon";
repo = "mpv-mpris"; repo = "mpv-mpris";
rev = version; rev = version;
sha256 = "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx"; sha256 = "02lqsgp296s8wr0yh6wm8h7nhn53rj254zahpzbwdv15apgy0z17";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -35,7 +35,7 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "4.1.0"; version = "4.2.0";
pname = "qemu" pname = "qemu"
+ stdenv.lib.optionalString xenSupport "-xen" + stdenv.lib.optionalString xenSupport "-xen"
+ stdenv.lib.optionalString hostCpuOnly "-host-cpu-only" + stdenv.lib.optionalString hostCpuOnly "-host-cpu-only"
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2"; url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2";
sha256 = "1bpl6hwiw1jdxk4xmqp10qgki0dji0l2rzr10dyhyk8d85vxxw29"; sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w";
}; };
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ]; nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
@ -77,6 +77,13 @@ stdenv.mkDerivation rec {
./no-etc-install.patch ./no-etc-install.patch
./fix-qemu-ga.patch ./fix-qemu-ga.patch
./9p-ignore-noatime.patch ./9p-ignore-noatime.patch
(fetchpatch {
name = "CVE-2019-15890.patch";
url = "https://git.qemu.org/?p=libslirp.git;a=patch;h=c59279437eda91841b9d26079c70b8a540d41204";
sha256 = "1q2rc67mfdz034mk81z9bw105x9zad7n954sy3kq068b1svrf7iy";
stripLen = 1;
extraPrefix = "slirp/";
})
] ++ optional nixosTestRunner ./force-uid0-on-9p.patch ] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
++ optionals stdenv.hostPlatform.isMusl [ ++ optionals stdenv.hostPlatform.isMusl [
(fetchpatch { (fetchpatch {

View File

@ -1,13 +1,12 @@
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index 85862fb8..ed52c5ec 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -841,7 +841,7 @@ endif @@ -867,7 +867,7 @@ install-includedir:
$(INSTALL_DIR) "$(DESTDIR)$(includedir)"
ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 install: all $(if $(BUILD_DOCS),install-doc) \
- install-datadir install-localstatedir install-includedir \
-install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir \ + install-datadir install-includedir \
+install: all $(if $(BUILD_DOCS),install-doc) install-datadir \
$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
recurse-install recurse-install
ifneq ($(TOOLS),) ifneq ($(TOOLS),)

View File

@ -1,151 +1,76 @@
{ lib, stdenv, echo_build_heading, noisily, makeDeps, rust }: { lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs, rust }:
{ crateName, { crateName,
dependencies, dependencies,
crateFeatures, crateRenames, libName, release, libPath, crateFeatures, crateRenames, libName, release, libPath,
crateType, metadata, crateBin, hasCrateBin, crateType, metadata, crateBin, hasCrateBin,
extraRustcOpts, verbose, colors }: extraRustcOpts, verbose, colors,
}:
let let
baseRustcOpts =
deps = makeDeps dependencies crateRenames; [(if release then "-C opt-level=3" else "-C debuginfo=2")]
rustcOpts = ++ ["-C codegen-units=$NIX_BUILD_CORES"]
lib.lists.foldl' (opts: opt: opts + " " + opt) ++ [(mkRustcDepArgs dependencies crateRenames)]
(if release then "-C opt-level=3" else "-C debuginfo=2") ++ [crateFeatures]
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts); ++ extraRustcOpts
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTarget stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
;
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}"; rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
# build the final rustc arguments that can be different between different
# crates
libRustcOpts = lib.concatStringsSep " " (
baseRustcOpts
++ [rustcMeta]
++ (map (x: "--crate-type ${x}") crateType)
);
binRustcOpts = lib.concatStringsSep " " (
baseRustcOpts
);
in '' in ''
runHook preBuild runHook preBuild
norm=""
bold=""
green=""
boldgreen=""
if [[ "${colors}" == "always" ]]; then
norm="$(printf '\033[0m')" #returns to "normal"
bold="$(printf '\033[0;1m')" #set bold
green="$(printf '\033[0;32m')" #set green
boldgreen="$(printf '\033[0;1;32m')" #set bold, and set green.
fi
${echo_build_heading colors} ${echo_build_heading colors}
${noisily colors verbose} ${noisily colors verbose}
build_lib() { # configure & source common build functions
lib_src=$1 LIB_RUSTC_OPTS="${libRustcOpts}"
echo_build_heading $lib_src ${libName} BIN_RUSTC_OPTS="${binRustcOpts}"
LIB_EXT="${stdenv.hostPlatform.extensions.sharedLibrary}"
LIB_PATH="${libPath}"
LIB_NAME="${libName}"
source ${./lib.sh}
noisily rustc --crate-name $CRATE_NAME $lib_src \ CRATE_NAME='${lib.replaceStrings ["-"] ["_"] libName}'
${lib.strings.concatStrings (map (x: " --crate-type ${x}") crateType)} \
${rustcOpts} ${rustcMeta} ${crateFeatures} --out-dir target/lib \
--emit=dep-info,link -L dependency=target/deps ${deps} --cap-lints allow \
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors}
EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib" setup_link_paths
if [ -e target/deps/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary} ]; then
EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary}"
fi
}
build_bin() { if [[ -e "$LIB_PATH" ]]; then
crate_name=$1 build_lib $LIB_PATH
crate_name_=$(echo $crate_name | sed -e "s/-/_/g")
main_file=""
if [[ ! -z $2 ]]; then
main_file=$2
fi
echo_build_heading $@
noisily rustc --crate-name $crate_name_ $main_file --crate-type bin ${rustcOpts}\
${crateFeatures} --out-dir target/bin --emit=dep-info,link -L dependency=target/deps \
$LINK ${deps}$EXTRA_LIB --cap-lints allow \
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors} \
${if stdenv.hostPlatform != stdenv.buildPlatform then "--target ${rust.toRustTarget stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc" else ""}
if [ "$crate_name_" != "$crate_name" ]; then
mv target/bin/$crate_name_ target/bin/$crate_name
fi
}
EXTRA_LIB=""
CRATE_NAME=$(echo ${libName} | sed -e "s/-/_/g")
if [[ -e target/link_ ]]; then
EXTRA_BUILD="$(cat target/link_) $EXTRA_BUILD"
fi
if [[ -e "${libPath}" ]]; then
build_lib ${libPath}
elif [[ -e src/lib.rs ]]; then elif [[ -e src/lib.rs ]]; then
build_lib src/lib.rs build_lib src/lib.rs
elif [[ -e src/${libName}.rs ]]; then elif [[ -e "src/$LIB_NAME.rs" ]]; then
build_lib src/${libName}.rs build_lib src/$LIB_NAME.rs
fi fi
echo "$EXTRA_LINK_SEARCH" | while read i; do
if [[ ! -z "$i" ]]; then
for library in $i; do
echo "-L $library" >> target/link
L=$(echo $library | sed -e "s#$(pwd)/target/build#$lib/lib#")
echo "-L $L" >> target/link.final
done
fi
done
echo "$EXTRA_LINK" | while read i; do
if [[ ! -z "$i" ]]; then
for library in $i; do
echo "-l $library" >> target/link
echo "-l $library" >> target/link.final
done
fi
done
if [[ -e target/link ]]; then ${lib.optionalString (lib.length crateBin > 0) (lib.concatMapStringsSep "\n" (bin: ''
sort -u target/link.final > target/link.final.sorted
mv target/link.final.sorted target/link.final
sort -u target/link > target/link.sorted
mv target/link.sorted target/link
tr '\n' ' ' < target/link > target/link_
LINK=$(cat target/link_)
fi
${lib.optionalString (crateBin != "") ''
printf "%s\n" "${crateBin}" | head -n1 | tr -s ',' '\n' | while read -r BIN_NAME BIN_PATH; do
mkdir -p target/bin mkdir -p target/bin
# filter empty entries / empty "lines" BIN_NAME='${bin.name or crateName}'
if [[ -z "$BIN_NAME" ]]; then ${if !bin ? path then ''
continue BIN_PATH=""
fi search_for_bin_path "$BIN_NAME"
'' else ''
if [[ -z "$BIN_PATH" ]]; then BIN_PATH='${bin.path}'
# heuristic to "guess" the correct source file as found in cargo: ''}
# https://github.com/rust-lang/cargo/blob/90fc9f620190d5fa3c80b0c8c65a1e1361e6b8ae/src/cargo/util/toml/targets.rs#L308-L325
# the first two cases are the "new" default IIRC
BIN_NAME_=$(echo $BIN_NAME | sed -e 's/-/_/g')
FILES=( "src/bin/$BIN_NAME.rs" "src/bin/$BIN_NAME/main.rs" "src/bin/$BIN_NAME_.rs" "src/bin/$BIN_NAME_/main.rs" "src/bin/main.rs" "src/main.rs" )
if ! [ -e "${libPath}" -o -e src/lib.rs -o -e "src/${libName}.rs" ]; then
# if this is not a library the following path is also valid
FILES=( "src/$BIN_NAME.rs" "src/$BIN_NAME_.rs" "''${FILES[@]}" )
fi
for file in "''${FILES[@]}";
do
echo "checking file $file"
# first file that exists wins
if [[ -e "$file" ]]; then
BIN_PATH="$file"
break
fi
done
if [[ -z "$BIN_PATH" ]]; then
echo "failed to find file for binary target: $BIN_NAME" >&2
exit 1
fi
fi
build_bin "$BIN_NAME" "$BIN_PATH" build_bin "$BIN_NAME" "$BIN_PATH"
done '') crateBin)}
''}
${lib.optionalString (crateBin == "" && !hasCrateBin) '' # If crateBin is empty and hasCrateBin is not set then we must try to
# detect some kind of bin target based on some files that might exist.
${lib.optionalString (lib.length crateBin == 0 && !hasCrateBin) ''
if [[ -e src/main.rs ]]; then if [[ -e src/main.rs ]]; then
mkdir -p target/bin mkdir -p target/bin
build_bin ${crateName} src/main.rs build_bin ${crateName} src/main.rs

View File

@ -1,4 +1,4 @@
{ lib, stdenv, echo_build_heading, noisily, makeDeps }: { lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs }:
{ build { build
, buildDependencies , buildDependencies
, colors , colors
@ -20,12 +20,12 @@
, verbose , verbose
, workspace_member }: , workspace_member }:
let version_ = lib.splitString "-" crateVersion; let version_ = lib.splitString "-" crateVersion;
versionPre = if lib.tail version_ == [] then "" else builtins.elemAt version_ 1; versionPre = if lib.tail version_ == [] then "" else lib.elemAt version_ 1;
version = lib.splitVersion (lib.head version_); version = lib.splitVersion (lib.head version_);
rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt) rustcOpts = lib.foldl' (opts: opt: opts + " " + opt)
(if release then "-C opt-level=3" else "-C debuginfo=2") (if release then "-C opt-level=3" else "-C debuginfo=2")
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts); (["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
buildDeps = makeDeps buildDependencies crateRenames; buildDeps = mkRustcDepArgs buildDependencies crateRenames;
authors = lib.concatStringsSep ":" crateAuthors; authors = lib.concatStringsSep ":" crateAuthors;
optLevel = if release then 3 else 0; optLevel = if release then 3 else 0;
completeDepsDir = lib.concatStringsSep " " completeDeps; completeDepsDir = lib.concatStringsSep " " completeDeps;
@ -90,9 +90,9 @@ in ''
export HOST="${stdenv.hostPlatform.config}" export HOST="${stdenv.hostPlatform.config}"
export PROFILE=${if release then "release" else "debug"} export PROFILE=${if release then "release" else "debug"}
export OUT_DIR=$(pwd)/target/build/${crateName}.out export OUT_DIR=$(pwd)/target/build/${crateName}.out
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0} export CARGO_PKG_VERSION_MAJOR=${lib.elemAt version 0}
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1} export CARGO_PKG_VERSION_MINOR=${lib.elemAt version 1}
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2} export CARGO_PKG_VERSION_PATCH=${lib.elemAt version 2}
export CARGO_PKG_VERSION_PRE="${versionPre}" export CARGO_PKG_VERSION_PRE="${versionPre}"
export CARGO_PKG_HOMEPAGE="${crateHomepage}" export CARGO_PKG_HOMEPAGE="${crateHomepage}"
export NUM_JOBS=1 export NUM_JOBS=1

View File

@ -13,56 +13,34 @@ let
then "macos" then "macos"
else stdenv.hostPlatform.parsed.kernel.name; else stdenv.hostPlatform.parsed.kernel.name;
makeDeps = dependencies: crateRenames: # Create rustc arguments to link against the given list of dependencies and
(lib.concatMapStringsSep " " (dep: # renames
mkRustcDepArgs = dependencies: crateRenames:
lib.concatMapStringsSep " " (dep:
let let
extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName; extern = lib.replaceStrings ["-"] ["_"] dep.libName;
name = if builtins.hasAttr dep.crateName crateRenames then name = if lib.hasAttr dep.crateName crateRenames then
lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName} lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName}
else else
extern; extern;
in (if lib.lists.any (x: x == "lib") dep.crateType then in (if lib.any (x: x == "lib") dep.crateType then
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}.rlib" " --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}.rlib"
else else
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") " --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
) dependencies); ) dependencies;
echo_build_heading = colors: '' inherit (import ./log.nix { inherit lib; }) noisily echo_build_heading;
echo_build_heading() {
start=""
end=""
if [[ "${colors}" == "always" ]]; then
start="$(printf '\033[0;1;32m')" #set bold, and set green.
end="$(printf '\033[0m')" #returns to "normal"
fi
if (( $# == 1 )); then
echo "$start""Building $1""$end"
else
echo "$start""Building $1 ($2)""$end"
fi
}
'';
noisily = colors: verbose: ''
noisily() {
start=""
end=""
if [[ "${colors}" == "always" ]]; then
start="$(printf '\033[0;1;32m')" #set bold, and set green.
end="$(printf '\033[0m')" #returns to "normal"
fi
${lib.optionalString verbose ''
echo -n "$start"Running "$end"
echo $@
''}
$@
}
'';
configureCrate = import ./configure-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps; }; configureCrate = import ./configure-crate.nix {
buildCrate = import ./build-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps rust; }; inherit lib stdenv echo_build_heading noisily mkRustcDepArgs;
installCrate = import ./install-crate.nix; };
in buildCrate = import ./build-crate.nix {
inherit lib stdenv echo_build_heading noisily mkRustcDepArgs rust;
};
installCrate = import ./install-crate.nix;
in
crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides, crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides,
dependencies, buildDependencies, crateRenames, dependencies, buildDependencies, crateRenames,
@ -81,6 +59,15 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr
extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate; extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate;
buildInputs_ = buildInputs; buildInputs_ = buildInputs;
extraRustcOpts_ = extraRustcOpts; extraRustcOpts_ = extraRustcOpts;
# take a list of crates that we depend on and override them to fit our overrides, rustc, release, …
makeDependencies = map (dep: lib.getLib (dep.override { inherit release verbose crateOverrides; }));
# crate2nix has a hack for the old bash based build script that did split
# entries at `,`. No we have to work around that hack.
# https://github.com/kolloch/crate2nix/blame/5b19c1b14e1b0e5522c3e44e300d0b332dc939e7/crate2nix/templates/build.nix.tera#L89
crateBin = lib.filter (bin: !(bin ? name && bin.name == ",")) (crate.crateBin or []);
hasCrateBin = crate ? crateBin;
in in
stdenv.mkDerivation (rec { stdenv.mkDerivation (rec {
@ -94,42 +81,28 @@ stdenv.mkDerivation (rec {
name = "rust_${crate.crateName}-${crate.version}"; name = "rust_${crate.crateName}-${crate.version}";
depsBuildBuild = [ rust stdenv.cc ]; depsBuildBuild = [ rust stdenv.cc ];
buildInputs = (crate.buildInputs or []) ++ buildInputs_; buildInputs = (crate.buildInputs or []) ++ buildInputs_;
dependencies = dependencies = makeDependencies dependencies_;
builtins.map buildDependencies = makeDependencies buildDependencies_;
(dep: lib.getLib (dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; }))
dependencies_;
buildDependencies = completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);
builtins.map completeBuildDeps = lib.unique (
(dep: lib.getLib (dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; }))
buildDependencies_;
completeDeps = lib.lists.unique (dependencies ++ lib.lists.concatMap (dep: dep.completeDeps) dependencies);
completeBuildDeps = lib.lists.unique (
buildDependencies buildDependencies
++ lib.lists.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies ++ lib.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies
); );
crateFeatures = if crate ? features then crateFeatures = lib.optionalString (crate ? features)
lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features) #" (lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features));
else "";
libName = if crate ? libName then crate.libName else crate.crateName; libName = if crate ? libName then crate.libName else crate.crateName;
libPath = if crate ? libPath then crate.libPath else ""; libPath = if crate ? libPath then crate.libPath else "";
depsMetadata = builtins.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies); # Seed the symbol hashes with something unique every time.
metadata = builtins.substring 0 10 (builtins.hashString "sha256" (crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata )); # https://doc.rust-lang.org/1.0.0/rustc/metadata/loader/index.html#frobbing-symbols
metadata = let
crateBin = if crate ? crateBin then depsMetadata = lib.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies);
builtins.foldl' (bins: bin: let hashedMetadata = builtins.hashString "sha256"
name = (if bin ? name then bin.name else crateName); (crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata);
path = if bin ? path then bin.path else ""; in lib.substring 0 10 hashedMetadata;
in
bins + (if bin == "" then "" else ",") + "${name} ${path}"
) "" crate.crateBin
else "";
hasCrateBin = crate ? crateBin;
build = crate.build or ""; build = crate.build or "";
workspace_member = crate.workspace_member or "."; workspace_member = crate.workspace_member or ".";
@ -142,9 +115,12 @@ stdenv.mkDerivation (rec {
if lib.attrByPath ["plugin"] false crate then ["dylib"] else if lib.attrByPath ["plugin"] false crate then ["dylib"] else
(crate.type or ["lib"]); (crate.type or ["lib"]);
colors = lib.attrByPath [ "colors" ] "always" crate; colors = lib.attrByPath [ "colors" ] "always" crate;
extraLinkFlags = builtins.concatStringsSep " " (crate.extraLinkFlags or []); extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or []);
edition = crate.edition or null; edition = crate.edition or null;
extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}"); extraRustcOpts =
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
++ extraRustcOpts_
++ (lib.optional (edition != null) "--edition ${edition}");
configurePhase = configureCrate { configurePhase = configureCrate {
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
@ -155,7 +131,7 @@ stdenv.mkDerivation (rec {
buildPhase = buildCrate { buildPhase = buildCrate {
inherit crateName dependencies inherit crateName dependencies
crateFeatures crateRenames libName release libPath crateType crateFeatures crateRenames libName release libPath crateType
metadata crateBin hasCrateBin verbose colors metadata hasCrateBin crateBin verbose colors
extraRustcOpts; extraRustcOpts;
}; };
installPhase = installCrate crateName metadata; installPhase = installCrate crateName metadata;

View File

@ -3,23 +3,23 @@
kernel = stdenv.hostPlatform.parsed.kernel.name; kernel = stdenv.hostPlatform.parsed.kernel.name;
abi = stdenv.hostPlatform.parsed.abi.name; abi = stdenv.hostPlatform.parsed.abi.name;
cpu = stdenv.hostPlatform.parsed.cpu.name; cpu = stdenv.hostPlatform.parsed.cpu.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); updateFeatures = f: up: functions: lib.deepSeq f (lib.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; }); mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName: mkFeatures = feat: lib.foldl (features: featureName:
if feat.${featureName} or false then if feat.${featureName} or false then
[ featureName ] ++ features [ featureName ] ++ features
else else
features features
) [] (builtins.attrNames feat); ) [] (lib.attrNames feat);
include = includedFiles: src: builtins.filterSource (path: type: include = includedFiles: src: lib.filterSource (path: type:
lib.lists.any (f: lib.any (f:
let p = toString (src + ("/" + f)); let p = toString (src + ("/" + f));
in in
p == path || (lib.strings.hasPrefix (p + "/") path) p == path || (lib.strings.hasPrefix (p + "/") path)
) includedFiles ) includedFiles
) src; ) src;
exclude = excludedFiles: src: builtins.filterSource (path: type: exclude = excludedFiles: src: lib.filterSource (path: type:
lib.lists.all (f: lib.all (f:
!lib.strings.hasPrefix (toString (src + ("/" + f))) path !lib.strings.hasPrefix (toString (src + ("/" + f))) path
) excludedFiles ) excludedFiles
) src; ) src;

View File

@ -0,0 +1,117 @@
build_lib() {
lib_src=$1
echo_build_heading $lib_src ${libName}
noisily rustc \
--crate-name $CRATE_NAME \
$lib_src \
--out-dir target/lib \
--emit=dep-info,link \
-L dependency=target/deps \
--cap-lints allow \
$LIB_RUSTC_OPTS \
$BUILD_OUT_DIR \
$EXTRA_BUILD \
$EXTRA_FEATURES \
--color $colors
EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-$metadata.rlib"
if [ -e target/deps/lib$CRATE_NAME-$metadata$LIB_EXT ]; then
EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-$metadata$LIB_EXT"
fi
}
build_bin() {
crate_name=$1
crate_name_=$(echo $crate_name | tr '-' '_')
main_file=""
if [[ ! -z $2 ]]; then
main_file=$2
fi
echo_build_heading $@
noisily rustc \
--crate-name $crate_name_ \
$main_file \
--crate-type bin \
$BIN_RUSTC_OPTS \
--out-dir target/bin \
--emit=dep-info,link \
-L dependency=target/deps \
$LINK \
$EXTRA_LIB \
--cap-lints allow \
$BUILD_OUT_DIR \
$EXTRA_BUILD \
$EXTRA_FEATURES \
--color ${colors} \
if [ "$crate_name_" != "$crate_name" ]; then
mv target/bin/$crate_name_ target/bin/$crate_name
fi
}
setup_link_paths() {
EXTRA_LIB=""
if [[ -e target/link_ ]]; then
EXTRA_BUILD="$(cat target/link_) $EXTRA_BUILD"
fi
echo "$EXTRA_LINK_SEARCH" | while read i; do
if [[ ! -z "$i" ]]; then
for library in $i; do
echo "-L $library" >> target/link
L=$(echo $library | sed -e "s#$(pwd)/target/build#$lib/lib#")
echo "-L $L" >> target/link.final
done
fi
done
echo "$EXTRA_LINK" | while read i; do
if [[ ! -z "$i" ]]; then
for library in $i; do
echo "-l $library" >> target/link
echo "-l $library" >> target/link.final
done
fi
done
if [[ -e target/link ]]; then
sort -u target/link.final > target/link.final.sorted
mv target/link.final.sorted target/link.final
sort -u target/link > target/link.sorted
mv target/link.sorted target/link
tr '\n' ' ' < target/link > target/link_
LINK=$(cat target/link_)
fi
}
search_for_bin_path() {
# heuristic to "guess" the correct source file as found in cargo:
# https://github.com/rust-lang/cargo/blob/90fc9f620190d5fa3c80b0c8c65a1e1361e6b8ae/src/cargo/util/toml/targets.rs#L308-L325
BIN_NAME=$1
BIN_NAME_=$(echo $BIN_NAME | tr '-' '_')
# the first two cases are the "new" default IIRC
FILES=( "src/bin/$BIN_NAME.rs" "src/bin/$BIN_NAME/main.rs" "src/bin/$BIN_NAME_.rs" "src/bin/$BIN_NAME_/main.rs" "src/bin/main.rs" "src/main.rs" )
if ! [ -e "$LIB_PATH" -o -e src/lib.rs -o -e "src/$LIB_NAME.rs" ]; then
# if this is not a library the following path is also valid
FILES=( "src/$BIN_NAME.rs" "src/$BIN_NAME_.rs" "${FILES[@]}" )
fi
for file in "${FILES[@]}";
do
echo "checking file $file"
# first file that exists wins
if [[ -e "$file" ]]; then
BIN_PATH="$file"
break
fi
done
if [[ -z "$BIN_PATH" ]]; then
echo "failed to find file for binary target: $BIN_NAME" >&2
exit 1
fi
}

View File

@ -0,0 +1,33 @@
{ lib }:
{
echo_build_heading = colors: ''
echo_build_heading() {
start=""
end=""
${lib.optionalString (colors == "always") ''
start="$(printf '\033[0;1;32m')" #set bold, and set green.
end="$(printf '\033[0m')" #returns to "normal"
''}
if (( $# == 1 )); then
echo "$start""Building $1""$end"
else
echo "$start""Building $1 ($2)""$end"
fi
}
'';
noisily = colors: verbose: ''
noisily() {
start=""
end=""
${lib.optionalString (colors == "always") ''
start="$(printf '\033[0;1;32m')" #set bold, and set green.
end="$(printf '\033[0m')" #returns to "normal"
''}
${lib.optionalString verbose ''
echo -n "$start"Running "$end"
echo $@
''}
$@
}
'';
}

View File

@ -1,7 +1,7 @@
{ lib, fetchFromGitHub }: { lib, fetchFromGitHub }:
let let
version = "3.3.92"; version = "4.7.95";
in fetchFromGitHub { in fetchFromGitHub {
name = "material-design-icons-${version}"; name = "material-design-icons-${version}";
owner = "Templarian"; owner = "Templarian";
@ -10,14 +10,13 @@ in fetchFromGitHub {
postFetch = '' postFetch = ''
tar xf $downloadedFile --strip=1 tar xf $downloadedFile --strip=1
mkdir -p $out/share/fonts/{eot,svg,truetype,woff,woff2} mkdir -p $out/share/fonts/{eot,truetype,woff,woff2}
cp fonts/*.eot $out/share/fonts/eot/ cp fonts/*.eot $out/share/fonts/eot/
cp fonts/*.svg $out/share/fonts/svg/
cp fonts/*.ttf $out/share/fonts/truetype/ cp fonts/*.ttf $out/share/fonts/truetype/
cp fonts/*.woff $out/share/fonts/woff/ cp fonts/*.woff $out/share/fonts/woff/
cp fonts/*.woff2 $out/share/fonts/woff2/ cp fonts/*.woff2 $out/share/fonts/woff2/
''; '';
sha256 = "0dbm4qfd0b91yrw3cv4i377pnm98fgj936nk1m5wlx8mx8jahz48"; sha256 = "0da92kz8ryy60kb5xm52md13w28ih4sfap8g3v9b4ziyww66zjhz";
meta = with lib; { meta = with lib; {
description = "3200+ Material Design Icons from the Community"; description = "3200+ Material Design Icons from the Community";

View File

@ -2,7 +2,7 @@
let let
pname = "victor-mono"; pname = "victor-mono";
version = "1.2.7"; version = "1.3.0";
in fetchFromGitHub rec { in fetchFromGitHub rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -26,7 +26,7 @@ in fetchFromGitHub rec {
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname} unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
''; '';
sha256 = "0x4ydp11ry94wkkspnmy1xpzqq3m45xg60z1hq4ll9gmlccaknj0"; sha256 = "1lv2x7kfspabnhvm8z79n165fw3awvzj1r8f0g5zn26wgdalgw69";
meta = with lib; { meta = with lib; {
description = "Free programming font with cursive italics and ligatures"; description = "Free programming font with cursive italics and ligatures";

View File

@ -2,13 +2,13 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "evcxr"; pname = "evcxr";
version = "0.4.5"; version = "0.4.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "evcxr"; repo = "evcxr";
rev = "v${version}"; rev = "v${version}";
sha256 = "13fs9fgvdf8bh6vc8xs8qhil0a1qhm4gvv0ici37xh8a94ngsn7h"; sha256 = "1yzvqf93zz3ncck4dyq2kayp408lm3h6fx0fb212j7h70mlzx984";
}; };
cargoSha256 = "0g17g12isah4nkqp9i299qr1sz19k4czcc43rm1wbs0y9szaqvwc"; cargoSha256 = "0g17g12isah4nkqp9i299qr1sz19k4czcc43rm1wbs0y9szaqvwc";

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "quickjs"; pname = "quickjs";
version = "2019-10-27"; version = "2019-12-21";
src = fetchurl { src = fetchurl {
url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz"; url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz";
sha256 = "0xm16ja3c0k80jy0xkx0f40r44v2lgx2si4dnaw2w7c5nx7cmkai"; sha256 = "13hlx6qwrrxmlvvqcr3irxba6zmf05cf54l32vj50wc66s1qd41p";
}; };
makeFlags = [ "prefix=${placeholder ''out''}" ]; makeFlags = [ "prefix=${placeholder ''out''}" ];

View File

@ -0,0 +1,19 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "gsmlib";
version = "unstable-2017-10-06";
src = fetchFromGitHub {
owner = "x-logLT";
repo = "gsmlib";
rev = "4f794b14450132f81673f7d3570c5a859aecf7ae";
sha256 = "16v8aj914ac1ipf14a867ljib3gy7fhzd9ypxnsg9l0zi8mm3ml5";
};
nativeBuildInputs = [ autoreconfHook ];
meta = with stdenv.lib; {
description = "Library to access GSM mobile phones through GSM modems";
homepage = "https://github.com/x-logLT/gsmlib";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = [ maintainers.misuzu ];
};
}

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "libctb";
version = "0.16";
src = fetchurl {
url = "https://iftools.com/download/files/legacy/${pname}-${version}.tar.gz";
sha256 = "027wh89d0qyly3d9m6rg4x7x1gqz3y3cnxlgk0k8xgygcrm05c0w";
};
patches = [
./include-kbhit.patch
];
sourceRoot = "${pname}-${version}/build";
makeFlags = [
"prefix=$(out)"
];
meta = with stdenv.lib; {
description = "Communications toolbox";
homepage = "https://iftools.com";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = [ maintainers.misuzu ];
};
}

View File

@ -0,0 +1,13 @@
diff --git a/GNUmakefile b/GNUmakefile
index e39a687..026f9c4 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -140,7 +140,7 @@ all: ../lib/libctb$(LIBFLAG)$(GPIBFLAG)-0.16.a ../lib/libctb$(LIBFLAG)$(GPIBFLAG
install: install_ctb_lib install_ctb_dll
$(INSTALL) -d $(DESTDIR)$(prefix)/include/ctb-0.16
- for f in ctb.h fifo.h getopt.h $(GPIBINC) iobase.h linux/serport.h linux/timer.h portscan.h serport.h serportx.h timer.h; do \
+ for f in ctb.h fifo.h getopt.h $(GPIBINC) iobase.h kbhit.h linux/serport.h linux/timer.h portscan.h serport.h serportx.h timer.h; do \
if test ! -d $(DESTDIR)$(prefix)/include/ctb-0.16/`dirname $$f` ; then \
$(INSTALL) -d $(DESTDIR)$(prefix)/include/ctb-0.16/`dirname $$f`; \
fi; \

View File

@ -3,7 +3,7 @@
, systemd }: , systemd }:
let let
version = "2018-11-13"; version = "2019-12-08";
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "openzwave"; pname = "openzwave";
@ -14,8 +14,8 @@ in stdenv.mkDerivation {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "home-assistant"; owner = "home-assistant";
repo = "open-zwave"; repo = "open-zwave";
rev = "0679daef6aa5a39e2441a68f7b45cfe022c4d961"; rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
sha256 = "1d13maj93i6h792cbvqpx43ffss44dxmvbwj2777vzvvjib8m4n8"; sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
}; };
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ]; nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ];

View File

@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
"-DUSE_THIRDPARTY_LIBRARIES=OFF" "-DUSE_THIRDPARTY_LIBRARIES=OFF"
"-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include" "-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}" "-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
"-DBUILD_SHARED_LIBS=ON"
]; ];
NIX_LDFLAGS = "-ldl"; NIX_LDFLAGS = "-ldl";

View File

@ -1,4 +1,4 @@
{ stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib }: { stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib, tbb }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.0.0"; version = "2.0.0";
@ -12,7 +12,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
cmakeFlags = [ "-DWITH_VTK=ON" "-DBUILD_ALL_MODULES=ON" ]; cmakeFlags = [
"-DWITH_VTK=ON"
"-DBUILD_ALL_MODULES=ON"
"-DWITH_TBB=ON"
];
doCheck = true; doCheck = true;
@ -30,7 +34,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ cmake gtest ]; nativeBuildInputs = [ cmake gtest ];
buildInputs = [ boost eigen python vtk zlib ]; buildInputs = [ boost eigen python vtk zlib tbb ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://github.com/BioMedIA/MIRTK"; homepage = "https://github.com/BioMedIA/MIRTK";

View File

@ -31,6 +31,10 @@ nodePackages // {
''; '';
}; };
bitwarden-cli = pkgs.lib.overrideDerivation nodePackages."@bitwarden/cli" (drv: {
name = "bitwarden-cli-${drv.version}";
});
ios-deploy = nodePackages.ios-deploy.override (drv: { ios-deploy = nodePackages.ios-deploy.override (drv: {
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.buildPackages.rsync ]; nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.buildPackages.rsync ];
preRebuild = '' preRebuild = ''
@ -95,10 +99,6 @@ nodePackages // {
''; '';
}; };
texlab-citeproc-build-deps = nodePackages."texlab-citeproc-build-deps-../tools/misc/texlab/citeproc".override {
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.CoreServices ];
};
webtorrent-cli = nodePackages.webtorrent-cli.override { webtorrent-cli = nodePackages.webtorrent-cli.override {
buildInputs = [ nodePackages.node-gyp-build ]; buildInputs = [ nodePackages.node-gyp-build ];
}; };

View File

@ -2,6 +2,7 @@
"@angular/cli" "@angular/cli"
, "@antora/cli" , "@antora/cli"
, "@antora/site-generator-default" , "@antora/site-generator-default"
, "@bitwarden/cli"
, "@vue/cli" , "@vue/cli"
, "@webassemblyjs/cli" , "@webassemblyjs/cli"
, "@webassemblyjs/repl" , "@webassemblyjs/repl"
@ -125,7 +126,6 @@
, "swagger" , "swagger"
, {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"} , {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"}
, "tern" , "tern"
, { "texlab-citeproc-build-deps": "../tools/misc/texlab/citeproc" }
, "textlint" , "textlint"
, "textlint-plugin-latex" , "textlint-plugin-latex"
, "textlint-rule-abbr-within-parentheses" , "textlint-rule-abbr-within-parentheses"

File diff suppressed because it is too large Load Diff

View File

@ -157,13 +157,13 @@ let
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"; sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
}; };
}; };
"aws4-1.8.0" = { "aws4-1.9.0" = {
name = "aws4"; name = "aws4";
packageName = "aws4"; packageName = "aws4";
version = "1.8.0"; version = "1.9.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz"; url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="; sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
}; };
}; };
"balanced-match-1.0.0" = { "balanced-match-1.0.0" = {
@ -526,13 +526,13 @@ let
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"; sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
}; };
}; };
"fast-json-stable-stringify-2.0.0" = { "fast-json-stable-stringify-2.1.0" = {
name = "fast-json-stable-stringify"; name = "fast-json-stable-stringify";
packageName = "fast-json-stable-stringify"; packageName = "fast-json-stable-stringify";
version = "2.0.0"; version = "2.1.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz"; url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2"; sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
}; };
}; };
"fill-range-4.0.0" = { "fill-range-4.0.0" = {
@ -1219,22 +1219,22 @@ let
sha512 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg=="; sha512 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==";
}; };
}; };
"mime-db-1.40.0" = { "mime-db-1.42.0" = {
name = "mime-db"; name = "mime-db";
packageName = "mime-db"; packageName = "mime-db";
version = "1.40.0"; version = "1.42.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz"; url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="; sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
}; };
}; };
"mime-types-2.1.24" = { "mime-types-2.1.25" = {
name = "mime-types"; name = "mime-types";
packageName = "mime-types"; packageName = "mime-types";
version = "2.1.24"; version = "2.1.25";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz"; url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ=="; sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
}; };
}; };
"minimatch-3.0.4" = { "minimatch-3.0.4" = {
@ -1624,13 +1624,13 @@ let
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849"; sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
}; };
}; };
"psl-1.4.0" = { "psl-1.6.0" = {
name = "psl"; name = "psl";
packageName = "psl"; packageName = "psl";
version = "1.4.0"; version = "1.6.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz"; url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw=="; sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
}; };
}; };
"punycode-1.4.1" = { "punycode-1.4.1" = {
@ -1714,13 +1714,13 @@ let
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg=="; sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
}; };
}; };
"resolve-1.12.0" = { "resolve-1.14.1" = {
name = "resolve"; name = "resolve";
packageName = "resolve"; packageName = "resolve";
version = "1.12.0"; version = "1.14.1";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz"; url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w=="; sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
}; };
}; };
"resolve-dir-1.0.1" = { "resolve-dir-1.0.1" = {
@ -2497,7 +2497,7 @@ in
sources."regex-not-1.0.2" sources."regex-not-1.0.2"
sources."repeat-element-1.1.3" sources."repeat-element-1.1.3"
sources."repeat-string-1.6.1" sources."repeat-string-1.6.1"
sources."resolve-1.12.0" sources."resolve-1.14.1"
sources."resolve-dir-1.0.1" sources."resolve-dir-1.0.1"
sources."resolve-url-0.2.1" sources."resolve-url-0.2.1"
sources."ret-0.1.15" sources."ret-0.1.15"
@ -2608,7 +2608,7 @@ in
sources."assert-plus-1.0.0" sources."assert-plus-1.0.0"
sources."asynckit-0.4.0" sources."asynckit-0.4.0"
sources."aws-sign2-0.7.0" sources."aws-sign2-0.7.0"
sources."aws4-1.8.0" sources."aws4-1.9.0"
sources."balanced-match-1.0.0" sources."balanced-match-1.0.0"
sources."base64-js-1.3.1" sources."base64-js-1.3.1"
sources."bcrypt-pbkdf-1.0.2" sources."bcrypt-pbkdf-1.0.2"
@ -2631,7 +2631,7 @@ in
sources."extend-3.0.2" sources."extend-3.0.2"
sources."extsprintf-1.3.0" sources."extsprintf-1.3.0"
sources."fast-deep-equal-2.0.1" sources."fast-deep-equal-2.0.1"
sources."fast-json-stable-stringify-2.0.0" sources."fast-json-stable-stringify-2.1.0"
sources."findit-2.0.0" sources."findit-2.0.0"
sources."foreachasync-3.0.0" sources."foreachasync-3.0.0"
sources."forever-agent-0.6.1" sources."forever-agent-0.6.1"
@ -2671,8 +2671,8 @@ in
sources."json-stringify-safe-5.0.1" sources."json-stringify-safe-5.0.1"
sources."jsonfile-1.0.1" sources."jsonfile-1.0.1"
sources."jsprim-1.4.1" sources."jsprim-1.4.1"
sources."mime-db-1.40.0" sources."mime-db-1.42.0"
sources."mime-types-2.1.24" sources."mime-types-2.1.25"
sources."minimatch-3.0.4" sources."minimatch-3.0.4"
sources."minimist-0.0.8" sources."minimist-0.0.8"
sources."minipass-2.9.0" sources."minipass-2.9.0"
@ -2716,7 +2716,7 @@ in
sources."performance-now-2.1.0" sources."performance-now-2.1.0"
sources."process-nextick-args-2.0.1" sources."process-nextick-args-2.0.1"
sources."proto-list-1.2.4" sources."proto-list-1.2.4"
sources."psl-1.4.0" sources."psl-1.6.0"
sources."punycode-2.1.1" sources."punycode-2.1.1"
sources."qs-6.5.2" sources."qs-6.5.2"
(sources."readable-stream-2.3.6" // { (sources."readable-stream-2.3.6" // {
@ -2725,7 +2725,7 @@ in
]; ];
}) })
sources."request-2.88.0" sources."request-2.88.0"
sources."resolve-1.12.0" sources."resolve-1.14.1"
sources."retry-0.10.1" sources."retry-0.10.1"
sources."rimraf-2.6.3" sources."rimraf-2.6.3"
sources."safe-buffer-5.2.0" sources."safe-buffer-5.2.0"

View File

@ -85,13 +85,13 @@ let
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"; sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
}; };
}; };
"aws4-1.8.0" = { "aws4-1.9.0" = {
name = "aws4"; name = "aws4";
packageName = "aws4"; packageName = "aws4";
version = "1.8.0"; version = "1.9.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz"; url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="; sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
}; };
}; };
"balanced-match-1.0.0" = { "balanced-match-1.0.0" = {
@ -292,13 +292,13 @@ let
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"; sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
}; };
}; };
"fast-json-stable-stringify-2.0.0" = { "fast-json-stable-stringify-2.1.0" = {
name = "fast-json-stable-stringify"; name = "fast-json-stable-stringify";
packageName = "fast-json-stable-stringify"; packageName = "fast-json-stable-stringify";
version = "2.0.0"; version = "2.1.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz"; url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2"; sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
}; };
}; };
"findit-2.0.0" = { "findit-2.0.0" = {
@ -571,22 +571,22 @@ let
sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"; sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2";
}; };
}; };
"mime-db-1.40.0" = { "mime-db-1.42.0" = {
name = "mime-db"; name = "mime-db";
packageName = "mime-db"; packageName = "mime-db";
version = "1.40.0"; version = "1.42.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz"; url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="; sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
}; };
}; };
"mime-types-2.1.24" = { "mime-types-2.1.25" = {
name = "mime-types"; name = "mime-types";
packageName = "mime-types"; packageName = "mime-types";
version = "2.1.24"; version = "2.1.25";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz"; url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ=="; sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
}; };
}; };
"minimatch-3.0.4" = { "minimatch-3.0.4" = {
@ -841,13 +841,13 @@ let
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849"; sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
}; };
}; };
"psl-1.4.0" = { "psl-1.6.0" = {
name = "psl"; name = "psl";
packageName = "psl"; packageName = "psl";
version = "1.4.0"; version = "1.6.0";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz"; url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw=="; sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
}; };
}; };
"punycode-1.4.1" = { "punycode-1.4.1" = {
@ -895,13 +895,13 @@ let
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg=="; sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
}; };
}; };
"resolve-1.12.0" = { "resolve-1.14.1" = {
name = "resolve"; name = "resolve";
packageName = "resolve"; packageName = "resolve";
version = "1.12.0"; version = "1.14.1";
src = fetchurl { src = fetchurl {
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz"; url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w=="; sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
}; };
}; };
"retry-0.10.1" = { "retry-0.10.1" = {
@ -1276,7 +1276,7 @@ in
sources."assert-plus-1.0.0" sources."assert-plus-1.0.0"
sources."asynckit-0.4.0" sources."asynckit-0.4.0"
sources."aws-sign2-0.7.0" sources."aws-sign2-0.7.0"
sources."aws4-1.8.0" sources."aws4-1.9.0"
sources."balanced-match-1.0.0" sources."balanced-match-1.0.0"
sources."base64-js-1.3.1" sources."base64-js-1.3.1"
sources."bcrypt-pbkdf-1.0.2" sources."bcrypt-pbkdf-1.0.2"
@ -1299,7 +1299,7 @@ in
sources."extend-3.0.2" sources."extend-3.0.2"
sources."extsprintf-1.3.0" sources."extsprintf-1.3.0"
sources."fast-deep-equal-2.0.1" sources."fast-deep-equal-2.0.1"
sources."fast-json-stable-stringify-2.0.0" sources."fast-json-stable-stringify-2.1.0"
sources."findit-2.0.0" sources."findit-2.0.0"
sources."foreachasync-3.0.0" sources."foreachasync-3.0.0"
sources."forever-agent-0.6.1" sources."forever-agent-0.6.1"
@ -1339,8 +1339,8 @@ in
sources."json-stringify-safe-5.0.1" sources."json-stringify-safe-5.0.1"
sources."jsonfile-1.0.1" sources."jsonfile-1.0.1"
sources."jsprim-1.4.1" sources."jsprim-1.4.1"
sources."mime-db-1.40.0" sources."mime-db-1.42.0"
sources."mime-types-2.1.24" sources."mime-types-2.1.25"
sources."minimatch-3.0.4" sources."minimatch-3.0.4"
sources."minimist-0.0.8" sources."minimist-0.0.8"
sources."minipass-2.9.0" sources."minipass-2.9.0"
@ -1384,7 +1384,7 @@ in
sources."performance-now-2.1.0" sources."performance-now-2.1.0"
sources."process-nextick-args-2.0.1" sources."process-nextick-args-2.0.1"
sources."proto-list-1.2.4" sources."proto-list-1.2.4"
sources."psl-1.4.0" sources."psl-1.6.0"
sources."punycode-2.1.1" sources."punycode-2.1.1"
sources."qs-6.5.2" sources."qs-6.5.2"
(sources."readable-stream-2.3.6" // { (sources."readable-stream-2.3.6" // {
@ -1393,7 +1393,7 @@ in
]; ];
}) })
sources."request-2.88.0" sources."request-2.88.0"
sources."resolve-1.12.0" sources."resolve-1.14.1"
sources."retry-0.10.1" sources."retry-0.10.1"
sources."rimraf-2.6.3" sources."rimraf-2.6.3"
sources."safe-buffer-5.2.0" sources."safe-buffer-5.2.0"

View File

@ -0,0 +1,49 @@
{ stdenv
, buildPythonPackage
, django
, netaddr
, six
, fetchFromGitHub
# required for tests
#, djangorestframework
#, psycopg2
#, unittest2
}:
buildPythonPackage rec {
version = "1.2.2";
pname = "django-postgresql-netfields";
src = fetchFromGitHub {
owner = "jimfunk";
repo = "${pname}";
rev = "v${version}";
sha256 = "1rrh38f3zl3jk5ijs6g75dxxvxygf4lczbgc7ahrgzf58g4a48lm";
};
# tests need a postgres database
doCheck = false;
# keeping the dependencies below as comment for reference
# checkPhase = ''
# python manage.py test
# '';
# buildInputs = [
# djangorestframework
# psycopg2
# unittest2
# ];
propagatedBuildInputs = [
django
netaddr
six
];
meta = with stdenv.lib; {
description = "Django PostgreSQL netfields implementation";
homepage = https://github.com/jimfunk/django-postgresql-netfields;
license = licenses.bsd2;
};
}

View File

@ -10,5 +10,6 @@ python_openzwave.overridePythonAttrs (oldAttrs: rec {
sha256 = "2d500638270ee4f0e7e9e114d9b4402c94c232f314116cdcf88d7c1dc9a44427"; sha256 = "2d500638270ee4f0e7e9e114d9b4402c94c232f314116cdcf88d7c1dc9a44427";
}; };
patches = [];
meta.homepage = https://github.com/home-assistant/python-openzwave; meta.homepage = https://github.com/home-assistant/python-openzwave;
}) })

View File

@ -0,0 +1,31 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, future
, python
}:
buildPythonPackage rec {
pname = "junitparser";
version = "1.4.1";
src = fetchFromGitHub {
owner = "gastlygem";
repo = pname;
rev = version;
sha256 = "16xwayr0rbp7xdg7bzmyf8s7al0dhkbmkcnil66ax7r8bznp5lmp";
};
propagatedBuildInputs = [ future ];
checkPhase = ''
${python.interpreter} test.py
'';
meta = with lib; {
description = "A JUnit/xUnit Result XML Parser";
license = licenses.asl20;
homepage = https://github.com/gastlygem/junitparser;
maintainers = with maintainers; [ multun ];
};
}

View File

@ -0,0 +1,50 @@
{ lib
, blas
, buildPythonPackage
, cffi
, fetchFromGitHub
, liblapack
, nose
, numpy
, openblas
, useOpenblas ? true
}:
buildPythonPackage {
pname = "prox-tv";
version = "3.3.0";
src = fetchFromGitHub {
owner = "albarji";
repo = "proxTV";
rev = "e621585d5aaa7983fbee68583f7deae995d3bafb";
sha256 = "0mlrjbb5rw78dgijkr3bspmsskk6jqs9y7xpsgs35i46dvb327q5";
};
patches = lib.optional useOpenblas ./use-openblas.patch;
checkInputs = [
nose
];
propagatedBuildInputs = [
numpy
cffi
];
buildInputs = (
if useOpenblas then
[ openblas ]
else
[ blas liblapack ]
);
enableParallelBuilding = true;
meta = with lib; {
homepage = https://github.com/albarji/proxTV;
description = "A toolbox for fast Total Variation proximity operators";
license = licenses.bsd2;
maintainers = with maintainers; [ multun ];
};
}

View File

@ -0,0 +1,11 @@
index f100b35..448bbaf 100644
--- a/prox_tv/prox_tv_build.py
+++ b/prox_tv/prox_tv_build.py
@@ -109,6 +109,6 @@ ffi.set_source(
define_macros=[('NOMATLAB', 1)],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
- libraries=['blas', 'lapack'],
+ libraries=['openblas'],
include_dirs=['/usr/include']
)

View File

@ -0,0 +1,20 @@
diff --git a/pyozw_setup.py b/pyozw_setup.py
index b201840..37bf2a8 100644
--- a/pyozw_setup.py
+++ b/pyozw_setup.py
@@ -257,13 +257,13 @@ class Template(object):
if sys.platform.startswith("win"):
return ['Cython']
else:
- return ['Cython==0.28.6']
+ return ['Cython>=0.28.6']
def build_requires(self):
if sys.platform.startswith("win"):
return ['Cython']
else:
- return ['Cython==0.28.6']
+ return ['Cython>=0.28.6']
def build(self):
if len(self.ctx['extra_objects']) == 1 and os.path.isfile(self.ctx['extra_objects'][0]):

View File

@ -1,6 +1,6 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k { stdenv, buildPythonPackage, fetchPypi, isPy3k
, pkgconfig , pkgconfig
, systemd, libyaml, openzwave, cython , systemd, libyaml, openzwave, cython, pyserial
, six, pydispatcher, urwid }: , six, pydispatcher, urwid }:
buildPythonPackage rec { buildPythonPackage rec {
@ -17,7 +17,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ systemd libyaml openzwave cython ]; buildInputs = [ systemd libyaml openzwave cython ];
propagatedBuildInputs = [ six urwid pydispatcher ]; propagatedBuildInputs = [ six urwid pydispatcher pyserial ];
# primary location for the .xml files is in /etc/openzwave so we override the # primary location for the .xml files is in /etc/openzwave so we override the
# /usr/local/etc lookup instead as that allows us to dump new .xml files into # /usr/local/etc lookup instead as that allows us to dump new .xml files into
@ -27,6 +27,8 @@ buildPythonPackage rec {
--replace /usr/local/etc/openzwave ${openzwave}/etc/openzwave --replace /usr/local/etc/openzwave ${openzwave}/etc/openzwave
''; '';
patches = [ ./cython.patch ];
# no tests available # no tests available
doCheck = false; doCheck = false;

View File

@ -10,11 +10,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "stm32loader"; pname = "stm32loader";
version = "0.5.0"; version = "0.5.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1w6jg4dcyz6si6dcyx727sxi75wnl0j89xkiwqmsw286s1y8ijjw"; sha256 = "0135qzxlrivvkq6wgkw7shfz94n755qs2c1754p1hc2jk0nqayrg";
}; };
propagatedBuildInputs = [ progress pyserial ]; propagatedBuildInputs = [ progress pyserial ];

View File

@ -9,6 +9,7 @@ let
ruby_2_4 ruby_2_4
ruby_2_5 ruby_2_5
ruby_2_6 ruby_2_6
ruby_2_7
]; ];
gemTests = gemTests =

View File

@ -1,19 +1,19 @@
{ buildGoPackage, fetchFromGitHub, lib }: { buildGoModule, fetchFromGitHub, lib }:
buildGoPackage rec { buildGoModule rec {
pname = "golangci-lint"; pname = "golangci-lint";
version = "1.21.0"; version = "1.22.2";
goPackagePath = "github.com/golangci/golangci-lint";
subPackages = [ "cmd/golangci-lint" ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "golangci"; owner = "golangci";
repo = "golangci-lint"; repo = "golangci-lint";
rev = "v${version}"; rev = "v${version}";
sha256 = "0knvb59mg9jrzmfs5nzglz4nv047ayq1xz6dkis74wl1g9xi6yr5"; sha256 = "1wwp6ppm5p2cf7jbcgmqm6alzaj34sa079d98afw21yr81qxvvid";
}; };
modSha256 = "02j2cf5778ds0vwz0kkd9c1x5ap732vkq20bfg440spfajscvndm";
subPackages = [ "cmd/golangci-lint" ];
meta = with lib; { meta = with lib; {
description = "Linters Runner for Go. 5x faster than gometalinter. Nice colored output."; description = "Linters Runner for Go. 5x faster than gometalinter. Nice colored output.";
homepage = https://golangci.com/; homepage = https://golangci.com/;

View File

@ -0,0 +1,24 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kcli";
version = "1.8.2";
src = fetchFromGitHub {
owner = "cswank";
repo = "kcli";
rev = version;
sha256 = "1m9967f9wk1113ap2qmqinqg7gvpmg5y2g1ji0q818qbandzlh23";
};
modSha256 = "1wcqh3306q9wxb6pnl8cpk73vmy36bjv2gil03j7j4pajs1f2lwn";
subPackages = [ "." ];
meta = with stdenv.lib; {
description = "A kafka command line browser";
homepage = "https://github.com/cswank/kcli";
license = licenses.mit;
maintainers = with maintainers; [ cswank ];
};
}

View File

@ -1,31 +0,0 @@
{
"name": "citeproc",
"version": "0.1.0",
"description": "Render BibTeX citations",
"repository": "https://github.com/latex-lsp/citeproc.git",
"author": "Eric Förster <efoerster@users.noreply.github.com>",
"license": "MIT",
"scripts": {
"dist": "webpack",
"format": "prettier --write \"src/**/*.{js,json}\" \"*.{js,json,yml,md}\" \".vscode/**/*.{json}\""
},
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@citation-js/core": "^0.4.8",
"@citation-js/plugin-bibtex": "^0.4.8",
"@citation-js/plugin-csl": "^0.4.8",
"@types/node": "^11.13.17",
"@types/webpack": "^4.4.35",
"babel-loader": "^8.0.6",
"babel-polyfill": "^6.26.0",
"null-loader": "^0.1.1",
"prettier": "^1.18.2",
"ts-loader": "^5.4.5",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.15.0",
"webpack": "^4.35.3",
"webpack-cli": "^3.3.6"
}
}

View File

@ -1,14 +0,0 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p jq
set -eu -o pipefail
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
echo "Usage: $0 <git release tag>"
exit 1
fi
TEXLAB_WEB_SRC="https://raw.githubusercontent.com/latex-lsp/texlab/$1"
curl --silent "$TEXLAB_WEB_SRC/src/citeproc/js/package.json" | \
jq '. + {"dependencies": .devDependencies} | del(.devDependencies)' > package.json

View File

@ -3,32 +3,24 @@
, fetchFromGitHub , fetchFromGitHub
, nodejs , nodejs
, Security , Security
, texlab-citeproc-build-deps
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "texlab"; pname = "texlab";
version = "1.7.0"; version = "1.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "latex-lsp"; owner = "latex-lsp";
repo = pname; repo = pname;
rev = "v${version}"; # 1.9.0 + patches for building citeproc-db, see https://github.com/latex-lsp/texlab/pull/137
sha256 = "0b9lw6cmh7gyzj0pb3ghvqc3q7lzl12bfg9pjhl31lib3mmga8yb"; rev = "e38fe4bedc9d8094649a9d2753ca9855e0c18882";
sha256 = "0j87gmzyqrpgxrgalvlfqj5cj8j0h23hbbv8vdz2dhc847xhhfq1";
}; };
cargoSha256 = "0qnysl0ayc242dgvanqgmx8v4a2cjg0f1lhbyw16qjv61qcsx8y5"; cargoSha256 = "09d9r7aal1q00idv08zdw7dygyasyp5l6jrh96cdclf63h1p4fk9";
nativeBuildInputs = [ nodejs ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
preBuild = ''
rm build.rs
ln -s ${texlab-citeproc-build-deps}/lib/node_modules/citeproc/node_modules src/citeproc/js
(cd src/citeproc/js && npm run dist)
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An implementation of the Language Server Protocol for LaTeX"; description = "An implementation of the Language Server Protocol for LaTeX";
homepage = https://texlab.netlify.com/; homepage = https://texlab.netlify.com/;

View File

@ -98,12 +98,14 @@ dependencies = [
[[package]] [[package]]
name = "cargo-make" name = "cargo-make"
version = "0.24.2" version = "0.25.0"
dependencies = [ dependencies = [
"ci_info 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "ci_info 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "colored 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"duckscript 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"duckscriptsdk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"envmnt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "envmnt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"fern 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "fern 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
"git_info 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "git_info 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -112,11 +114,11 @@ dependencies = [
"indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"run_script 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "run_script 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rust_info 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rust_info 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"shell2batch 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "shell2batch 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -173,7 +175,7 @@ dependencies = [
[[package]] [[package]]
name = "colored" name = "colored"
version = "1.9.0" version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
@ -215,6 +217,21 @@ dependencies = [
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "duckscript"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "duckscriptsdk"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"duckscript 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"home 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "envmnt" name = "envmnt"
version = "0.7.4" version = "0.7.4"
@ -292,7 +309,7 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -461,7 +478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "run_script" name = "run_script"
version = "0.3.2" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -508,12 +525,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.103" version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.103" version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -586,7 +603,7 @@ name = "toml"
version = "0.5.5" version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -656,11 +673,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum ci_info 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4e9091c3d285e7046afdb70fc7413d1ac670288705e151443f868f71e66ed2a" "checksum ci_info 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4e9091c3d285e7046afdb70fc7413d1ac670288705e151443f868f71e66ed2a"
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
"checksum colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "433e7ac7d511768127ed85b0c4947f47a254131e37864b2dc13f52aa32cd37e5" "checksum colored 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f930f8b286023ed451756fe2527d73484d667adf9e905e9932e81d52996a343a"
"checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120"
"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6"
"checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" "checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" "checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b"
"checksum duckscript 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f34baed35ba3d92eaf95fd023b63f3206e429d408bb54bcd55c71e1e43c4cae8"
"checksum duckscriptsdk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db947cb1b8ef6fc232027e03ab36487fa8bd210de7ec9b4e0e70637dc5b8acf0"
"checksum envmnt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "24c6fdfb01bf7386076c5f655278306bbbed4ecc8abe30981217a11079fe3f2b" "checksum envmnt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "24c6fdfb01bf7386076c5f655278306bbbed4ecc8abe30981217a11079fe3f2b"
"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
@ -692,15 +711,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d" "checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d"
"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" "checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
"checksum run_script 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61b3a5ed82e15afc3e238178e2d22113af69ac88bd64a04499f025478853937f" "checksum run_script 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc7ecc900fbff3d58006c8a41a84e987f13c3d590bc7268d747245f4b19878dc"
"checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" "checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf"
"checksum rust_info 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e4e04a5022c08c95c2285b0beb4cdd24c9b20bc018a263d6fdb0372f7a597db" "checksum rust_info 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e4e04a5022c08c95c2285b0beb4cdd24c9b20bc018a263d6fdb0372f7a597db"
"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
"checksum shell2batch 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "185a52ee351c1001753c9e3b2eb48c525ff7f51803a4f2cef4365b5c3b743f65" "checksum shell2batch 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "185a52ee351c1001753c9e3b2eb48c525ff7f51803a4f2cef4365b5c3b743f65"
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
"checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238" "checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"

View File

@ -2,7 +2,7 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "cargo-make"; pname = "cargo-make";
version = "0.24.2"; version = "0.25.0";
src = src =
let let
@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
owner = "sagiegurari"; owner = "sagiegurari";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "02fc3vf802dzqvyh61cmkjf3vqf5xsl8dhjggns7p5zr2aqh8pfi"; sha256 = "1dvn3sjvvlllj99a94jl6yvdkv3a5qrrn3drdnx2s0v1w4djl5z4";
}; };
in in
runCommand "cargo-make-src" {} '' runCommand "cargo-make-src" {} ''
@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "1x2pkis82hsikjqgma7f6wmkcmviiqwc7pvdpmww61iq2aqfg7ds"; cargoSha256 = "07xjxc9vzysl8zh7699ardmr7sqc8jsq0nzfvjsx6x2mjllkp67n";
# Some tests fail because they need network access. # Some tests fail because they need network access.
# However, Travis ensures a proper build. # However, Travis ensures a proper build.

View File

@ -3,8 +3,8 @@
let let
major = "2019"; major = "2019";
minor = "05"; minor = "11";
patch = "21"; patch = "01";
version = "${major}.${minor}.${patch}"; version = "${major}.${minor}.${patch}";
@ -16,7 +16,7 @@ let
owner = "daid"; owner = "daid";
repo = "SeriousProton"; repo = "SeriousProton";
rev = "EE-${version}"; rev = "EE-${version}";
sha256 = "0q6in9rfs3b3qrfj2j6aj64z110k1yall4iqpp68rpp9r1dsh26p"; sha256 = "1sc1z9n99jspa8jnk0pwdzynnadvcmb3pxl5cndw3z90xjwpzivw";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
@ -42,7 +42,7 @@ stdenv.mkDerivation {
owner = "daid"; owner = "daid";
repo = "EmptyEpsilon"; repo = "EmptyEpsilon";
rev = "EE-${version}"; rev = "EE-${version}";
sha256 = "0v2xz1wlji6m6311r3vpkdil3a7l1w5nsz5yqd1l8bimy11rdr55"; sha256 = "09jizc6h7jbsp8bzv05pvb5z24zadjzjx1slj5317axsb170v81p";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }: { stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }:
let let cfg = import ./version.nix; in
ver = "2019.5";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "alfred-${ver}"; pname = "alfred";
inherit (cfg) version;
src = fetchurl { src = fetchurl {
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz"; url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz";
sha256 = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa"; sha256 = cfg.sha256.${pname};
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, libnl }: { stdenv, fetchurl, pkgconfig, libnl }:
let let cfg = import ./version.nix; in
ver = "2019.3";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "batctl-${ver}"; pname = "batctl";
inherit (cfg) version;
src = fetchurl { src = fetchurl {
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz"; url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz";
sha256 = "0307a01n72kg7vcm60mi8jna6bydiin2cr3ylrixra1596hkzn9b"; sha256 = cfg.sha256.${pname};
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -1,13 +1,14 @@
{ stdenv, fetchurl, kernel }: { stdenv, fetchurl, kernel }:
let base = "batman-adv-2019.2"; in let cfg = import ./version.nix; in
stdenv.mkDerivation { stdenv.mkDerivation rec {
name = "${base}-${kernel.version}"; pname = "batman-adv";
version = "${cfg.version}-${kernel.version}";
src = fetchurl { src = fetchurl {
url = "http://downloads.open-mesh.org/batman/releases/${base}/${base}.tar.gz"; url = "http://downloads.open-mesh.org/batman/releases/${pname}-${cfg.version}/${pname}-${cfg.version}.tar.gz";
sha256 = "1j5day3hia5nd21kb3msjblrybfr5sjnhrx7h5bb5ll8rykgdhvh"; sha256 = cfg.sha256.${pname};
}; };
nativeBuildInputs = kernel.moduleBuildDependencies; nativeBuildInputs = kernel.moduleBuildDependencies;

View File

@ -0,0 +1,9 @@
{
version = "2019.5";
sha256 = {
batman-adv = "1v18zvvg12jgywncbhxshgjc93r72ajpxgw22zp0zx22g2q13z99";
alfred = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa";
batctl = "1b9w4636dq8m38nzr8j0v0j3b0vdsw84c58c2isc33h66dx8brgz";
};
}

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.14.160"; version = "4.14.161";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0b59xyr8if0qcbnwqa88y275g9rzhjbbp8589i8xxpmws6x2c0y6"; sha256 = "1jc1izlvgymp9x61r4yz2xhplwmp6x8laxqj9wy33iz6a2gn48wx";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.19.91"; version = "4.19.92";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0irl5jlh5rrdfz5g28x4ifbillvspwd8fy4wi3qhmv9dw7gc60zl"; sha256 = "18l3k0hgyanh6axgmmaaff139vpw6lf3fcf9iglpqwgspgw7rhr9";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "5.4.6"; version = "5.4.7";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "1j4916izy2nrzq7g6m5m365r60hhhx9rqcanjvaxv5x3vsy639gx"; sha256 = "1jgwg5qb7lb30m5ywvpfagzrl6d0i524qpy3v99mina6j4fv5jdb";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchsvn, linux { stdenv, lib, fetchsvn, linux
, scripts ? fetchsvn { , scripts ? fetchsvn {
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/";
rev = "17153"; rev = "17161";
sha256 = "0hyd7wp73w4555d42xcvk4x4nxrfckbzah2ckb4d2aqzxab87789"; sha256 = "0hyd7wp73w4555d42xcvk4x4nxrfckbzah2ckb4d2aqzxab87789";
} }
, ... , ...

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "power-calibrate"; pname = "power-calibrate";
version = "0.01.28"; version = "0.01.29";
src = fetchurl { src = fetchurl {
url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.gz"; url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.gz";
sha256 = "1miyjs0vngzfdlsxhn5gndcalzkh28grg4m6faivvp1c6mjp794m"; sha256 = "1v8wvhjqglkvk9cl2b48lkcwhbc6nsdi3hjd7sap4hyvd6703pgs";
}; };
installFlags = [ installFlags = [

View File

@ -12,13 +12,13 @@ buildGoModule rec {
pname = "gotify-server"; pname = "gotify-server";
# Note that when this is updated, along with the hash, the `ui.nix` file # Note that when this is updated, along with the hash, the `ui.nix` file
# should include the same changes to the version and the sha256. # should include the same changes to the version and the sha256.
version = "2.0.12"; version = "2.0.13";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "gotify"; owner = "gotify";
repo = "server"; repo = "server";
rev = "v${version}"; rev = "v${version}";
sha256 = "0pkws83ymmlxcdxadb1w6rmibw84vzhx9xrhxc6b1rjncb80l0kk"; sha256 = "11ycs1ci1z8wm4fjgk4454kgszr4s8q9dc96pl77yvlngi4dk46d";
}; };
modSha256 = "1awhbc8qs2bwv6y2vwd92r4ys0l1bzymrb36iamr040x961682wv"; modSha256 = "1awhbc8qs2bwv6y2vwd92r4ys0l1bzymrb36iamr040x961682wv";

View File

@ -8,13 +8,13 @@ yarn2nix-moretea.mkYarnPackage rec {
packageJSON = ./package.json; packageJSON = ./package.json;
yarnNix = ./yarndeps.nix; yarnNix = ./yarndeps.nix;
version = "2.0.12"; version = "2.0.13";
src_all = fetchFromGitHub { src_all = fetchFromGitHub {
owner = "gotify"; owner = "gotify";
repo = "server"; repo = "server";
rev = "v${version}"; rev = "v${version}";
sha256 = "0pkws83ymmlxcdxadb1w6rmibw84vzhx9xrhxc6b1rjncb80l0kk"; sha256 = "11ycs1ci1z8wm4fjgk4454kgszr4s8q9dc96pl77yvlngi4dk46d";
}; };
src = "${src_all}/ui"; src = "${src_all}/ui";

View File

@ -9,6 +9,7 @@
, withRuby_2_4 ? false, ruby_2_4 , withRuby_2_4 ? false, ruby_2_4
, withRuby_2_5 ? false, ruby_2_5 , withRuby_2_5 ? false, ruby_2_5
, withRuby_2_6 ? true, ruby_2_6 , withRuby_2_6 ? true, ruby_2_6
, withRuby_2_7 ? true, ruby_2_7
, withSSL ? true, openssl ? null , withSSL ? true, openssl ? null
, withIPv6 ? true , withIPv6 ? true
, withDebug ? false , withDebug ? false
@ -40,6 +41,7 @@ stdenv.mkDerivation rec {
++ optional withRuby_2_4 ruby_2_4 ++ optional withRuby_2_4 ruby_2_4
++ optional withRuby_2_5 ruby_2_5 ++ optional withRuby_2_5 ruby_2_5
++ optional withRuby_2_6 ruby_2_6 ++ optional withRuby_2_6 ruby_2_6
++ optional withRuby_2_7 ruby_2_7
++ optional withSSL openssl; ++ optional withSSL openssl;
configureFlags = [ configureFlags = [
@ -62,6 +64,7 @@ stdenv.mkDerivation rec {
${optionalString withRuby_2_4 "./configure ruby --module=ruby24 --ruby=${ruby_2_4}/bin/ruby"} ${optionalString withRuby_2_4 "./configure ruby --module=ruby24 --ruby=${ruby_2_4}/bin/ruby"}
${optionalString withRuby_2_5 "./configure ruby --module=ruby25 --ruby=${ruby_2_5}/bin/ruby"} ${optionalString withRuby_2_5 "./configure ruby --module=ruby25 --ruby=${ruby_2_5}/bin/ruby"}
${optionalString withRuby_2_6 "./configure ruby --module=ruby26 --ruby=${ruby_2_6}/bin/ruby"} ${optionalString withRuby_2_6 "./configure ruby --module=ruby26 --ruby=${ruby_2_6}/bin/ruby"}
${optionalString withRuby_2_7 "./configure ruby --module=ruby27 --ruby=${ruby_2_7}/bin/ruby"}
''; '';
meta = { meta = {

View File

@ -23,11 +23,11 @@ let
in buildPythonApplication rec { in buildPythonApplication rec {
pname = "matrix-synapse"; pname = "matrix-synapse";
version = "1.7.2"; version = "1.7.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1nhzjmxzv5bvihl58cdpjw3hdghbh2pz7sg437k841mjn1qqq5lx"; sha256 = "1vpwf6jqwb66mq31lk5f0wzfsqa2l65rd7b1zqjbhvmz0js8kz5f";
}; };
patches = [ patches = [

View File

@ -1,5 +1,21 @@
{ fetchFromGitHub, stdenv, lib, pkgconfig, autoreconfHook
, ncurses, gnutls, readline
, openssl, perl, sqlite, libjpeg, speex, pcre
, ldns, libedit, yasm, which, libsndfile, libtiff
, curl, lua, libmysqlclient, postgresql, libopus, libctb, gsmlib
, SystemConfiguration
, modules ? null
}:
let let
availableModules = import ./modules.nix {
inherit curl lua libmysqlclient postgresql libopus libctb gsmlib;
};
# the default list from v1.8.7, except with applications/mod_signalwire also disabled # the default list from v1.8.7, except with applications/mod_signalwire also disabled
defaultModules = mods: with mods; [ defaultModules = mods: with mods; [
applications.commands applications.commands
@ -27,6 +43,9 @@ defaultModules = mods: with mods; [
codecs.h26x codecs.h26x
codecs.opus codecs.opus
databases.mariadb
databases.pgsql
dialplans.asterisk dialplans.asterisk
dialplans.xml dialplans.xml
@ -57,26 +76,9 @@ defaultModules = mods: with mods; [
xml_int.cdr xml_int.cdr
xml_int.rpc xml_int.rpc
xml_int.scgi xml_int.scgi
]; ] ++ lib.optionals stdenv.isLinux [ endpoints.gsmopen ];
in enabledModules = (if modules != null then modules else defaultModules) availableModules;
{ fetchurl, stdenv, lib, ncurses, curl, pkgconfig, gnutls, readline
, openssl, perl, sqlite, libjpeg, speex, pcre
, ldns, libedit, yasm, which, lua, libopus, libsndfile, libtiff
, modules ? defaultModules
, postgresql
, enablePostgres ? true
, SystemConfiguration
}:
let
availableModules = import ./modules.nix { inherit curl lua libopus; };
enabledModules = modules availableModules;
modulesConf = let modulesConf = let
lst = builtins.map (mod: mod.path) enabledModules; lst = builtins.map (mod: mod.path) enabledModules;
@ -86,11 +88,13 @@ modulesConf = let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "freeswitch-1.8.7"; pname = "freeswitch";
version = "1.10.2";
src = fetchurl { src = fetchFromGitHub {
url = "https://files.freeswitch.org/freeswitch-releases/${name}.tar.bz2"; owner = "signalwire";
sha256 = "0k52mxdfc5w9fdnz8kvfjiwnnjjhnpkirnyrfkhq7bad84m731z4"; repo = pname;
rev = "v${version}";
sha256 = "1fmrm51zgrasjbmhs0pzb1lyca3ddx0wd35shvxnkjnifi8qd1h7";
}; };
postPatch = '' postPatch = ''
patchShebangs libs/libvpx/build/make/rtcd.pl patchShebangs libs/libvpx/build/make/rtcd.pl
@ -98,23 +102,21 @@ stdenv.mkDerivation rec {
--replace AS=\''${AS} AS=yasm --replace AS=\''${AS} AS=yasm
''; '';
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ buildInputs = [
openssl ncurses gnutls readline perl libjpeg openssl ncurses gnutls readline perl libjpeg
sqlite pcre speex ldns libedit yasm which sqlite pcre speex ldns libedit yasm which
libsndfile libtiff libsndfile libtiff
] ]
++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules) ++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules)
++ lib.optionals enablePostgres [ postgresql ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_CFLAGS_COMPILE = "-Wno-error";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
configureFlags = lib.optionals enablePostgres [ "--enable-core-pgsql-support" ];
preConfigure = '' preConfigure = ''
./bootstrap.sh
cp "${modulesConf}" modules.conf cp "${modulesConf}" modules.conf
''; '';
@ -127,7 +129,7 @@ stdenv.mkDerivation rec {
description = "Cross-Platform Scalable FREE Multi-Protocol Soft Switch"; description = "Cross-Platform Scalable FREE Multi-Protocol Soft Switch";
homepage = https://freeswitch.org/; homepage = https://freeswitch.org/;
license = stdenv.lib.licenses.mpl11; license = stdenv.lib.licenses.mpl11;
maintainers = with stdenv.lib.maintainers; [ ]; maintainers = with stdenv.lib.maintainers; [ misuzu ];
platforms = with stdenv.lib.platforms; unix; platforms = with stdenv.lib.platforms; unix;
}; };
} }

View File

@ -1,6 +1,10 @@
{ libopus { libopus
, libctb
, gsmlib
, lua , lua
, curl , curl
, libmysqlclient
, postgresql
}: }:
let let
@ -101,6 +105,11 @@ in
theora = mk "codecs/mod_theora" []; theora = mk "codecs/mod_theora" [];
}; };
databases = {
mariadb = mk "databases/mod_mariadb" [ libmysqlclient ];
pgsql = mk "databases/mod_pgsql" [ postgresql ];
};
dialplans = { dialplans = {
asterisk = mk "dialplans/mod_dialplan_asterisk" []; asterisk = mk "dialplans/mod_dialplan_asterisk" [];
directory = mk "dialplans/mod_dialplan_directory" []; directory = mk "dialplans/mod_dialplan_directory" [];
@ -114,7 +123,7 @@ in
endpoints = { endpoints = {
alsa = mk "endpoints/mod_alsa" []; alsa = mk "endpoints/mod_alsa" [];
dingaling = mk "endpoints/mod_dingaling" []; dingaling = mk "endpoints/mod_dingaling" [];
gsmopen = mk "endpoints/mod_gsmopen" []; gsmopen = mk "endpoints/mod_gsmopen" [ gsmlib libctb ];
h323 = mk "endpoints/mod_h323" []; h323 = mk "endpoints/mod_h323" [];
khomp = mk "endpoints/mod_khomp" []; khomp = mk "endpoints/mod_khomp" [];
loopback = mk "endpoints/mod_loopback" []; loopback = mk "endpoints/mod_loopback" [];

View File

@ -23,4 +23,8 @@ buildRustPackage rec {
platforms = platforms.all; platforms = platforms.all;
broken = stdenv.isDarwin; broken = stdenv.isDarwin;
}; };
passthru = {
shellPath = "/bin/ion";
};
} }

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