Merge master into staging-next
This commit is contained in:
commit
f08e3e38d4
118 changed files with 2412 additions and 2737 deletions
10
.github/CODEOWNERS
vendored
10
.github/CODEOWNERS
vendored
|
@ -11,7 +11,7 @@
|
|||
/.github/CODEOWNERS @edolstra
|
||||
|
||||
# Libraries
|
||||
/lib @edolstra @nbp
|
||||
/lib @edolstra @nbp @infinisil
|
||||
/lib/systems @nbp @ericson2314 @matthewbauer
|
||||
/lib/generators.nix @edolstra @nbp @Profpatsch
|
||||
/lib/debug.nix @edolstra @nbp @Profpatsch
|
||||
|
@ -30,9 +30,9 @@
|
|||
/pkgs/build-support/setup-hooks @Ericson2314
|
||||
|
||||
# NixOS Internals
|
||||
/nixos/default.nix @nbp
|
||||
/nixos/lib/from-env.nix @nbp
|
||||
/nixos/lib/eval-config.nix @nbp
|
||||
/nixos/default.nix @nbp @infinisil
|
||||
/nixos/lib/from-env.nix @nbp @infinisil
|
||||
/nixos/lib/eval-config.nix @nbp @infinisil
|
||||
/nixos/doc/manual/configuration/abstractions.xml @nbp
|
||||
/nixos/doc/manual/configuration/config-file.xml @nbp
|
||||
/nixos/doc/manual/configuration/config-syntax.xml @nbp
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
# Haskell
|
||||
/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/generic-builder.nix @basvandijk @cdepillabout
|
||||
/pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout
|
||||
|
|
|
@ -102,7 +102,7 @@ let
|
|||
commitIdFromGitRepo cleanSourceWith pathHasContext
|
||||
canCleanSource;
|
||||
inherit (modules) evalModules closeModules unifyModuleSyntax
|
||||
applyIfFunction unpackSubmodule packSubmodule mergeModules
|
||||
applyIfFunction mergeModules
|
||||
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
|
||||
pushDownProperties dischargeProperties filterOverrides
|
||||
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride
|
||||
|
|
|
@ -103,42 +103,42 @@ rec {
|
|||
toClosureList = file: parentKey: imap1 (n: x:
|
||||
if isAttrs x || isFunction x then
|
||||
let key = "${parentKey}:anon-${toString n}"; in
|
||||
unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
|
||||
unifyModuleSyntax file key (applyIfFunction key x args)
|
||||
else
|
||||
let file = toString x; key = toString x; in
|
||||
unifyModuleSyntax file key (applyIfFunction key (import x) args));
|
||||
in
|
||||
builtins.genericClosure {
|
||||
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
|
||||
of ‘options’, ‘config’ and ‘imports’ attributes. */
|
||||
unifyModuleSyntax = file: key: m:
|
||||
let metaSet = if m ? meta
|
||||
then { meta = m.meta; }
|
||||
else {};
|
||||
let addMeta = config: if m ? meta
|
||||
then mkMerge [ config { meta = m.meta; } ]
|
||||
else config;
|
||||
in
|
||||
if m ? config || m ? options then
|
||||
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
|
||||
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'."
|
||||
else
|
||||
{ file = m._file or file;
|
||||
{ _file = m._file or file;
|
||||
key = toString m.key or key;
|
||||
disabledModules = m.disabledModules or [];
|
||||
imports = m.imports or [];
|
||||
options = m.options or {};
|
||||
config = mkMerge [ (m.config or {}) metaSet ];
|
||||
config = addMeta (m.config or {});
|
||||
}
|
||||
else
|
||||
{ file = m._file or file;
|
||||
{ _file = m._file or file;
|
||||
key = toString m.key or key;
|
||||
disabledModules = m.disabledModules or [];
|
||||
imports = m.require or [] ++ m.imports or [];
|
||||
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
|
||||
|
@ -171,17 +171,6 @@ rec {
|
|||
else
|
||||
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
|
||||
declarations in all modules, combining them into a single set.
|
||||
At the same time, for each option declaration, it will merge the
|
||||
|
@ -189,7 +178,7 @@ rec {
|
|||
in the ‘value’ attribute of each option. */
|
||||
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:
|
||||
let
|
||||
|
@ -223,7 +212,7 @@ rec {
|
|||
) {} modules;
|
||||
# an attrset 'name' => list of submodules that declare ‘name’.
|
||||
declsByName = byName "options" (module: option:
|
||||
[{ inherit (module) file; options = option; }]
|
||||
[{ inherit (module) _file; options = option; }]
|
||||
) options;
|
||||
# an attrset 'name' => list of submodules that define ‘name’.
|
||||
defnsByName = byName "config" (module: value:
|
||||
|
@ -250,7 +239,7 @@ rec {
|
|||
firstOption = findFirst (m: isOption m.options) "" decls;
|
||||
firstNonOption = findFirst (m: !isOption m.options) "" decls;
|
||||
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
|
||||
mergeModules' loc decls defns
|
||||
))
|
||||
|
@ -267,7 +256,14 @@ rec {
|
|||
|
||||
'opts' is a list of modules. Each module has an options attribute which
|
||||
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:
|
||||
let t = res.type;
|
||||
t' = opt.options.type;
|
||||
|
@ -284,7 +280,7 @@ rec {
|
|||
bothHave "apply" ||
|
||||
(bothHave "type" && (! typesMergeable))
|
||||
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
|
||||
let
|
||||
/* 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
|
||||
submodule defines any filename, then we ignore the enclosing option file. */
|
||||
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;
|
||||
submodules =
|
||||
if getSubModules != null then map (packSubmodule opt.file) getSubModules ++ res.options
|
||||
else if opt.options ? options then map (coerceOption opt.file) options' ++ 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 res.options;
|
||||
in opt.options // res //
|
||||
{ declarations = res.declarations ++ [opt.file];
|
||||
{ declarations = res.declarations ++ [opt._file];
|
||||
options = submodules;
|
||||
} // typeSet
|
||||
) { inherit loc; declarations = []; options = []; } opts;
|
||||
|
|
|
@ -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.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
|
||||
====== module tests ======
|
||||
$pass Pass
|
||||
|
|
30
lib/tests/modules/declare-submoduleWith-modules.nix
Normal file
30
lib/tests/modules/declare-submoduleWith-modules.nix
Normal 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;
|
||||
}
|
||||
];
|
||||
}
|
13
lib/tests/modules/declare-submoduleWith-noshorthand.nix
Normal file
13
lib/tests/modules/declare-submoduleWith-noshorthand.nix
Normal 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 = {};
|
||||
};
|
||||
}
|
12
lib/tests/modules/declare-submoduleWith-path.nix
Normal file
12
lib/tests/modules/declare-submoduleWith-path.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }: {
|
||||
options.submodule = lib.mkOption {
|
||||
type = lib.types.submoduleWith {
|
||||
modules = [
|
||||
./declare-enable.nix
|
||||
];
|
||||
};
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.submodule = ./define-enable.nix;
|
||||
}
|
14
lib/tests/modules/declare-submoduleWith-shorthand.nix
Normal file
14
lib/tests/modules/declare-submoduleWith-shorthand.nix
Normal 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 = {};
|
||||
};
|
||||
}
|
17
lib/tests/modules/declare-submoduleWith-special.nix
Normal file
17
lib/tests/modules/declare-submoduleWith-special.nix
Normal 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 = {};
|
||||
};
|
||||
}
|
3
lib/tests/modules/define-submoduleWith-noshorthand.nix
Normal file
3
lib/tests/modules/define-submoduleWith-noshorthand.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
submodule.config.config = true;
|
||||
}
|
3
lib/tests/modules/define-submoduleWith-shorthand.nix
Normal file
3
lib/tests/modules/define-submoduleWith-shorthand.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
submodule.config = true;
|
||||
}
|
|
@ -358,25 +358,43 @@ rec {
|
|||
};
|
||||
|
||||
# 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
|
||||
opts' = toList opts;
|
||||
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
|
||||
mkOptionType rec {
|
||||
name = "submodule";
|
||||
check = x: isAttrs x || isFunction x;
|
||||
check = x: isAttrs x || isFunction x || path.check x;
|
||||
merge = loc: defs:
|
||||
let
|
||||
coerce = def: if isFunction def then def else { config = def; };
|
||||
modules = opts' ++ map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs;
|
||||
in (evalModules {
|
||||
inherit modules;
|
||||
(evalModules {
|
||||
modules = allModules defs;
|
||||
inherit specialArgs;
|
||||
args.name = last loc;
|
||||
prefix = loc;
|
||||
}).config;
|
||||
getSubOptions = prefix: (evalModules
|
||||
{ modules = opts'; inherit prefix;
|
||||
{ inherit modules prefix specialArgs;
|
||||
# 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"
|
||||
# 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.
|
||||
args.name = "‹name›";
|
||||
}).options;
|
||||
getSubModules = opts';
|
||||
substSubModules = m: submodule m;
|
||||
functor = (defaultFunctor name) // {
|
||||
# Merging of submodules is done as part of mergeOptionDecls, as we have to annotate
|
||||
# each submodule with its location.
|
||||
payload = [];
|
||||
binOp = lhs: rhs: [];
|
||||
getSubModules = modules;
|
||||
substSubModules = m: submoduleWith (attrs // {
|
||||
modules = m;
|
||||
});
|
||||
functor = defaultFunctor name // {
|
||||
type = types.submoduleWith;
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1471,6 +1471,12 @@
|
|||
githubId = 143982;
|
||||
name = "Charles Strahan";
|
||||
};
|
||||
cswank = {
|
||||
email = "craigswank@gmail.com";
|
||||
github = "cswank";
|
||||
githubId = 490965;
|
||||
name = "Craig Swank";
|
||||
};
|
||||
cwoac = {
|
||||
email = "oliver@codersoffortune.net";
|
||||
github = "cwoac";
|
||||
|
@ -4846,6 +4852,12 @@
|
|||
githubId = 69918;
|
||||
name = "Stefan Dorn";
|
||||
};
|
||||
multun = {
|
||||
email = "victor.collod@epita.fr";
|
||||
github = "multun";
|
||||
githubId = 5047140;
|
||||
name = "Victor Collod";
|
||||
};
|
||||
mvnetbiz = {
|
||||
email = "mvnetbiz@gmail.com";
|
||||
github = "mvnetbiz";
|
||||
|
@ -5822,6 +5834,12 @@
|
|||
github = "rickynils";
|
||||
name = "Rickard Nilsson";
|
||||
};
|
||||
rika = {
|
||||
email = "rika@paymentswit.ch";
|
||||
github = "NekomimiScience";
|
||||
githubId = 1810487;
|
||||
name = "Rika";
|
||||
};
|
||||
rileyinman = {
|
||||
email = "rileyminman@gmail.com";
|
||||
github = "rileyinman";
|
||||
|
|
|
@ -257,14 +257,68 @@
|
|||
<listitem>
|
||||
<para>
|
||||
A set of sub options <replaceable>o</replaceable>.
|
||||
<replaceable>o</replaceable> can be an attribute set or a function
|
||||
returning an attribute set. Submodules are used in composed types to
|
||||
create modular options. Submodule are detailed in
|
||||
<replaceable>o</replaceable> can be an attribute set, a function
|
||||
returning an attribute set, or a path to a file containing such a value. Submodules are used 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
|
||||
linkend='section-option-types-submodule' />.
|
||||
</para>
|
||||
</listitem>
|
||||
</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'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'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>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -198,10 +198,11 @@ in
|
|||
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
|
||||
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_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=="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", 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=="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-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
|
||||
'';
|
||||
|
||||
boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];
|
||||
|
|
|
@ -66,7 +66,7 @@ in
|
|||
type = types.package;
|
||||
default = pkgs.redmine;
|
||||
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 {
|
||||
|
|
|
@ -11,6 +11,7 @@ let
|
|||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
enableIwd = cfg.wifi.backend == "iwd";
|
||||
in {
|
||||
|
||||
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 {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
|
@ -76,9 +88,6 @@ in {
|
|||
assertions = [{
|
||||
assertion = !config.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;
|
||||
message = "You can not use services.connman with networking.networkmanager";
|
||||
|
@ -89,12 +98,18 @@ in {
|
|||
systemd.services.connman = {
|
||||
description = "Connection service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "syslog.target" ];
|
||||
after = [ "syslog.target" ] ++ optional enableIwd "iwd.service";
|
||||
requires = optional enableIwd "iwd.service";
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "net.connman";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
@ -125,7 +140,12 @@ in {
|
|||
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
wireless.enable = true;
|
||||
wireless = {
|
||||
enable = mkIf (!enableIwd) true;
|
||||
iwd = mkIf enableIwd {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
networkmanager.enable = false;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -308,6 +308,7 @@ in {
|
|||
|
||||
if [ "$2" != "up" ]; then
|
||||
logger "exit: event $2 != up"
|
||||
exit
|
||||
fi
|
||||
|
||||
# coreutils and iproute are in PATH too
|
||||
|
|
|
@ -112,12 +112,12 @@ in {
|
|||
addresses = [ "tcp://192.168.0.10:51820" ];
|
||||
};
|
||||
};
|
||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
default = name;
|
||||
description = ''
|
||||
Name of the device
|
||||
'';
|
||||
|
@ -175,7 +175,7 @@ in {
|
|||
devices = [ "bigbox" ];
|
||||
};
|
||||
};
|
||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -190,7 +190,7 @@ in {
|
|||
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
default = name;
|
||||
description = ''
|
||||
The path to the folder which should be shared.
|
||||
'';
|
||||
|
@ -198,7 +198,7 @@ in {
|
|||
|
||||
id = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
default = name;
|
||||
description = ''
|
||||
The id of the folder. Must be the same on all devices.
|
||||
'';
|
||||
|
@ -206,7 +206,7 @@ in {
|
|||
|
||||
label = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
default = name;
|
||||
description = ''
|
||||
The label of the folder.
|
||||
'';
|
||||
|
|
|
@ -567,7 +567,7 @@ in
|
|||
|
||||
sslProtocols = mkOption {
|
||||
type = types.str;
|
||||
default = "All -SSLv2 -SSLv3 -TLSv1";
|
||||
default = "All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1";
|
||||
example = "All -SSLv2 -SSLv3";
|
||||
description = "Allowed SSL/TLS protocol versions.";
|
||||
};
|
||||
|
|
|
@ -186,7 +186,7 @@ let
|
|||
++ map escapeShellArg container.cmd
|
||||
);
|
||||
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";
|
||||
|
||||
### There is no generalized way of supporting `reload` for docker
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "3proxy";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ misuzu ];
|
||||
|
@ -134,29 +134,52 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
$peer1->waitForUnit("3proxy.service");
|
||||
peer1.wait_for_unit("3proxy.service")
|
||||
peer1.wait_for_open_port("9999")
|
||||
|
||||
# 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("${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");
|
||||
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(
|
||||
"${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
|
||||
$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->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");
|
||||
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.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
|
||||
$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->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");
|
||||
$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");
|
||||
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.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"
|
||||
)
|
||||
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"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# This test runs haka and probes it with hakactl
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "haka";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ tvestelind ];
|
||||
|
@ -15,10 +15,10 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$haka->waitForUnit("haka.service");
|
||||
$haka->succeed("hakactl status");
|
||||
$haka->succeed("hakactl stop");
|
||||
haka.wait_for_unit("haka.service")
|
||||
haka.succeed("hakactl status")
|
||||
haka.succeed("hakactl stop")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
# Test whether fast reboots via kexec work.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||
name = "kexec";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
meta = with lib.maintainers; {
|
||||
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 = { ... }:
|
||||
|
@ -11,9 +17,9 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
$machine->execute("systemctl kexec &");
|
||||
$machine->{connected} = 0;
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.execute("systemctl kexec &")
|
||||
machine.connected = False
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -27,6 +27,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
|
||||
{
|
||||
users.users.testuser = { };
|
||||
users.users.testuser2 = { };
|
||||
services.mysql.enable = true;
|
||||
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
|
||||
ALTER USER root@localhost IDENTIFIED WITH unix_socket;
|
||||
|
@ -34,12 +35,17 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
DELETE FROM mysql.user WHERE user = ''';
|
||||
FLUSH PRIVILEGES;
|
||||
'';
|
||||
services.mysql.ensureDatabases = [ "testdb" ];
|
||||
services.mysql.ensureDatabases = [ "testdb" "testdb2" ];
|
||||
services.mysql.ensureUsers = [{
|
||||
name = "testuser";
|
||||
ensurePermissions = {
|
||||
"testdb.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
} {
|
||||
name = "testuser2";
|
||||
ensurePermissions = {
|
||||
"testdb2.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
}];
|
||||
services.mysql.package = pkgs.mariadb;
|
||||
};
|
||||
|
@ -47,7 +53,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
start_all
|
||||
start_all()
|
||||
|
||||
mysql.wait_for_unit("mysql")
|
||||
mysql.succeed("echo 'use empty_testdb;' | mysql -u root")
|
||||
|
@ -62,6 +68,14 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
mariadb.succeed(
|
||||
"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(
|
||||
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
|
||||
)
|
||||
|
|
|
@ -25,6 +25,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
|
||||
# check if the netdata main page loads.
|
||||
netdata.succeed("curl --fail http://localhost:19999/")
|
||||
netdata.succeed("sleep 4")
|
||||
|
||||
# check if netdata can read disk ops for root owned processes.
|
||||
# if > 0, successful. verifies both netdata working and
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
{ fetchurl, bitwig-studio1,
|
||||
pulseaudio }:
|
||||
{ fetchurl, bitwig-studio1, pulseaudio, xorg }:
|
||||
|
||||
bitwig-studio1.overrideAttrs (oldAttrs: rec {
|
||||
name = "bitwig-studio-${version}";
|
||||
version = "3.0.3";
|
||||
version = "3.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
|
||||
sha256 = "162l95imq2fb4blfkianlkymm690by9ri73xf9zigknqf0gacgsa";
|
||||
sha256 = "1mgyyl1mr8hmzn3qdmg77km6sk58hyd0gsqr9jksh0a8p6hj24pk";
|
||||
};
|
||||
|
||||
buildInputs = oldAttrs.buildInputs ++ [ xorg.libXtst ];
|
||||
|
||||
runtimeDependencies = [
|
||||
pulseaudio
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
${oldAttrs.installPhase}
|
||||
|
||||
# recover commercial jre
|
||||
rm -f $out/libexec/lib/jre
|
||||
cp -r opt/bitwig-studio/lib/jre $out/libexec/lib
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "qsampler";
|
||||
version = "0.6.0";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
|
||||
sha256 = "1krhjyd67hvnv6sgndwq81lfvnb4qkhc7da1119fn2lzl7hx9wh3";
|
||||
sha256 = "1wr7k739zx2nz00b810f60g9k3y92w05nfci987hw7y2sks9rd8j";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools
|
||||
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools, wrapQtAppsHook
|
||||
, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
|
||||
, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
|
||||
|
||||
|
@ -15,7 +15,8 @@ stdenv.mkDerivation (rec {
|
|||
substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake makedepend perl pkgconfig qttools ];
|
||||
nativeBuildInputs =
|
||||
[ cmake makedepend perl pkgconfig qttools wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
dssi
|
||||
|
|
|
@ -18,9 +18,9 @@ let
|
|||
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "4.0.0.6"; # "Android Studio 4.0 Canary 6"
|
||||
build = "193.6052267";
|
||||
sha256Hash = "1naxyfnrj7milqha7xbwbcvyi81a7fqb7jsm03hhq5xs2sw55m1c";
|
||||
version = "4.0.0.7"; # "Android Studio 4.0 Canary 7"
|
||||
build = "193.6085562";
|
||||
sha256Hash = "0vk1vwh2yhsmadkb3v3m042ckzizc41ckqvj3jax8p86gl0b4whj";
|
||||
};
|
||||
in {
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
let
|
||||
versions = {
|
||||
atom = {
|
||||
version = "1.36.1";
|
||||
sha256 = "1m7q2r3zx463k7kpqb364piqrr69wrhs033ibzxdx9y7r4204qp4";
|
||||
version = "1.42.0";
|
||||
sha256 = "1ira528nwxi30jfwyivlac3wkkqb9d2z4jhxwq5m7mnpm5yli6jy";
|
||||
};
|
||||
|
||||
atom-beta = {
|
||||
version = "1.37.0";
|
||||
version = "1.43.0";
|
||||
beta = 0;
|
||||
sha256 = "0aq8r5vfgq7r31qajjgcg4n5a57a2m8fvq6fzy9vq5gawkvmaxxx";
|
||||
sha256 = "06if3w5hx7njmyal0012zawn8f5af1z4bjcbzj2c0gd15nlsgm95";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig
|
||||
, libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr
|
||||
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret
|
||||
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -10,7 +10,7 @@ let
|
|||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
|
||||
xorg.libxcb libsecret
|
||||
xorg.libxcb libsecret libuuid at-spi2-atk
|
||||
];
|
||||
|
||||
libPathNative = lib.makeLibraryPath packages;
|
||||
|
|
|
@ -3,56 +3,43 @@
|
|||
, xorg ? null
|
||||
, vulkan-loader ? null }:
|
||||
|
||||
assert stdenv.isLinux -> xorg != null;
|
||||
assert stdenv.isLinux -> vulkan-loader != null;
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
graphicsBackend = if stdenv.isDarwin then "metal" else "vulkan";
|
||||
in
|
||||
with stdenv.lib;
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rx";
|
||||
version = "0.2.0";
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rx";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cloudhead";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0f6cw8zqr45bprj8ibhp89bb2a077g4zinfrdn943csdmh47qzcl";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "cloudhead";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0mhpq9x54d884ydmfv1358sgc4jc7bghfx2y0k7p879hyyxr52v1";
|
||||
};
|
||||
|
||||
cargoSha256 = "05bqsw0nw24xysq86qa3hx9b5ncf50wfxsgpy388yrs2dfnphwlx";
|
||||
cargoSha256 = "0fnrgijfkvapj1yyy9grnqh2vkciisf029af0gfwyzsxzdi62gg5";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||
|
||||
buildInputs = optionals stdenv.isLinux
|
||||
(with xorg; [
|
||||
# glfw-sys dependencies:
|
||||
libX11 libXrandr libXinerama libXcursor libXi libXext
|
||||
]);
|
||||
buildInputs = optionals stdenv.isLinux
|
||||
(with xorg; [
|
||||
# glfw-sys dependencies:
|
||||
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
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
echo "Running cargo test"
|
||||
cargo test --features=${graphicsBackend}
|
||||
runHook postCheck
|
||||
'';
|
||||
postInstall = optional stdenv.isLinux ''
|
||||
mkdir -p $out/share/applications
|
||||
cp $src/rx.desktop $out/share/applications
|
||||
wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
||||
'';
|
||||
|
||||
postInstall = optional stdenv.isLinux ''
|
||||
mkdir -p $out/share/applications
|
||||
cp $src/rx.desktop $out/share/applications
|
||||
wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
meta = {
|
||||
description = "Modern and extensible pixel editor implemented in Rust";
|
||||
homepage = "https://cloudhead.io/rx/";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ minijackson filalex77 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,19 +9,25 @@ assert ncursesSupport -> ncurses != null;
|
|||
assert waylandSupport -> wayland != null;
|
||||
assert x11Support -> xlibs != null && xorg != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bemenu";
|
||||
version = "0.1.0";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Cloudef";
|
||||
repo = "bemenu";
|
||||
rev = "33e540a2b04ce78f5c7ab4a60b899c67f586cc32";
|
||||
sha256 = "11h55m9dx6ai12pqij52ydjm36dvrcc856pa834njihrp626pl4w";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "03k8wijdgj5nwmvgjhsrlh918n719789fhs4dqm23pd00rapxipk";
|
||||
};
|
||||
|
||||
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; [
|
||||
cairo
|
||||
fribidi
|
||||
|
|
|
@ -4,18 +4,20 @@ with stdenv.lib;
|
|||
|
||||
perlPackages.buildPerlPackage rec {
|
||||
pname = "get_iplayer";
|
||||
version = "2.99";
|
||||
version = "3.24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "get-iplayer";
|
||||
repo = "get_iplayer";
|
||||
rev = "v${version}";
|
||||
sha256 = "085bgwkjnaqp96gvd2s8qmkw69rz91si1sgzqdqbplkzj9bk2qii";
|
||||
sha256 = "0yd84ncb6cjrk4v4kz3zrddkl7iwkm3zlfbjyswd9hanp8fvd4q3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ perl ];
|
||||
propagatedBuildInputs = with perlPackages; [HTMLParser HTTPCookies LWP XMLLibXML XMLSimple];
|
||||
propagatedBuildInputs = with perlPackages; [
|
||||
HTMLParser HTTPCookies LWP LWPProtocolHttps XMLLibXML XMLSimple
|
||||
];
|
||||
|
||||
preConfigure = "touch Makefile.PL";
|
||||
doCheck = false;
|
||||
|
@ -33,6 +35,7 @@ perlPackages.buildPerlPackage rec {
|
|||
license = licenses.gpl3Plus;
|
||||
homepage = https://squarepenguin.co.uk/;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ rika ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
23
pkgs/applications/misc/heimer/default.nix
Normal file
23
pkgs/applications/misc/heimer/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
let
|
||||
pname = "joplin-desktop";
|
||||
version = "1.0.167";
|
||||
version = "1.0.177";
|
||||
in appimageTools.wrapType2 rec {
|
||||
name = "${pname}-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage";
|
||||
sha256 = "062f2av60490ffrml0q8zv68yir6zaqif0g3d32c985gcvmgn9lw";
|
||||
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.AppImage";
|
||||
sha256 = "023q3yxqsv0vd76bvfhyhh0pnfia01rflfpyv0i6w6xnb5hm2jp7";
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,22 +2,23 @@
|
|||
, pkgconfig, meson, ninja, python3
|
||||
, wrapGAppsHook, vala, shared-mime-info
|
||||
, cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive
|
||||
, discount, gtksourceview3
|
||||
, hicolor-icon-theme # for setup-hook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "minder";
|
||||
version = "1.5.1";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "phase1geo";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1z3if8bbiigb3m5py641y0j8d9z0s6kbb325waxbqs240pcxipml";
|
||||
sha256 = "0zma6hjx0068ih7fagb1gg5cgci0ccc764sd8qw6iglg61aihpx7";
|
||||
};
|
||||
|
||||
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 = ''
|
||||
chmod +x meson/post_install.py
|
||||
|
|
|
@ -26,13 +26,13 @@ assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "polybar";
|
||||
version = "3.4.1";
|
||||
version = "3.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1z1m6dxh2i5vsnkzaccb9j02ab05wgmcgig5d0l9w856g5jp3zmy";
|
||||
sha256 = "1ss4wzy68dpqr5a4m090nn36v8wsp4a7pj6whcxxdrrimgww5r88";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@ assert imagePreviewSupport -> w3m != null;
|
|||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "ranger-${version}";
|
||||
version = "1.9.2";
|
||||
version = "1.9.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ranger";
|
||||
repo = "ranger";
|
||||
rev = "v${version}";
|
||||
sha256= "1ws6g8z1m1hfp8bv4msvbaa9f7948p687jmc8h69yib4jkv3qyax";
|
||||
sha256= "1rygfryczanvqxn43lmlkgs04sbqznbvbb9hlbm3h5qgdcl0xlw8";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
|
|
@ -55,6 +55,7 @@ in stdenv.mkDerivation rec {
|
|||
configurePhase = ''
|
||||
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
|
||||
export MOZCONFIG=$(pwd)/mozconfig
|
||||
export MOZ_NOSPAM=1
|
||||
export builddir=$(pwd)/pmbuild
|
||||
|
||||
echo > $MOZCONFIG "
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
let
|
||||
pname = "ssb-patchwork";
|
||||
version = "3.17.1";
|
||||
version = "3.17.2";
|
||||
name = "Patchwork-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
|
||||
sha256 = "06wcgdcagmh80nr8nyrnz83wgq7j8r96hn3ccka7nmn02pdgvp3k";
|
||||
sha256 = "1pmy01jwdr461vsl4fsxi3jaqnjx9yl5dw4987y5g73qx21qc5d5";
|
||||
};
|
||||
|
||||
binary = appimageTools.wrapType2 {
|
||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
|||
|
||||
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
||||
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 = ''
|
||||
install -Dm755 gitstatusd $out/bin/gitstatusd
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mpv-mpris-${version}.so";
|
||||
version = "0.2";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hoyon";
|
||||
repo = "mpv-mpris";
|
||||
rev = version;
|
||||
sha256 = "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx";
|
||||
sha256 = "02lqsgp296s8wr0yh6wm8h7nhn53rj254zahpzbwdv15apgy0z17";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
|
|
@ -35,7 +35,7 @@ let
|
|||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.1.0";
|
||||
version = "4.2.0";
|
||||
pname = "qemu"
|
||||
+ stdenv.lib.optionalString xenSupport "-xen"
|
||||
+ stdenv.lib.optionalString hostCpuOnly "-host-cpu-only"
|
||||
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2";
|
||||
sha256 = "1bpl6hwiw1jdxk4xmqp10qgki0dji0l2rzr10dyhyk8d85vxxw29";
|
||||
sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
|
||||
|
@ -77,6 +77,13 @@ stdenv.mkDerivation rec {
|
|||
./no-etc-install.patch
|
||||
./fix-qemu-ga.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
|
||||
++ optionals stdenv.hostPlatform.isMusl [
|
||||
(fetchpatch {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 85862fb8..ed52c5ec 100644
|
||||
--- a/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: all $(if $(BUILD_DOCS),install-doc) install-datadir \
|
||||
install: all $(if $(BUILD_DOCS),install-doc) \
|
||||
- install-datadir install-localstatedir install-includedir \
|
||||
+ install-datadir install-includedir \
|
||||
$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
|
||||
recurse-install
|
||||
ifneq ($(TOOLS),)
|
||||
|
|
|
@ -1,151 +1,76 @@
|
|||
{ lib, stdenv, echo_build_heading, noisily, makeDeps, rust }:
|
||||
{ lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs, rust }:
|
||||
{ crateName,
|
||||
dependencies,
|
||||
crateFeatures, crateRenames, libName, release, libPath,
|
||||
crateType, metadata, crateBin, hasCrateBin,
|
||||
extraRustcOpts, verbose, colors }:
|
||||
extraRustcOpts, verbose, colors,
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
deps = makeDeps dependencies crateRenames;
|
||||
rustcOpts =
|
||||
lib.lists.foldl' (opts: opt: opts + " " + opt)
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||
baseRustcOpts =
|
||||
[(if release then "-C opt-level=3" else "-C debuginfo=2")]
|
||||
++ ["-C codegen-units=$NIX_BUILD_CORES"]
|
||||
++ [(mkRustcDepArgs dependencies crateRenames)]
|
||||
++ [crateFeatures]
|
||||
++ 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}";
|
||||
|
||||
|
||||
# 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 ''
|
||||
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}
|
||||
${noisily colors verbose}
|
||||
|
||||
build_lib() {
|
||||
lib_src=$1
|
||||
echo_build_heading $lib_src ${libName}
|
||||
# configure & source common build functions
|
||||
LIB_RUSTC_OPTS="${libRustcOpts}"
|
||||
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 \
|
||||
${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}
|
||||
CRATE_NAME='${lib.replaceStrings ["-"] ["_"] libName}'
|
||||
|
||||
EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib"
|
||||
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
|
||||
}
|
||||
setup_link_paths
|
||||
|
||||
build_bin() {
|
||||
crate_name=$1
|
||||
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}
|
||||
if [[ -e "$LIB_PATH" ]]; then
|
||||
build_lib $LIB_PATH
|
||||
elif [[ -e src/lib.rs ]]; then
|
||||
build_lib src/lib.rs
|
||||
elif [[ -e src/${libName}.rs ]]; then
|
||||
build_lib src/${libName}.rs
|
||||
elif [[ -e "src/$LIB_NAME.rs" ]]; then
|
||||
build_lib src/$LIB_NAME.rs
|
||||
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
|
||||
${lib.optionalString (crateBin != "") ''
|
||||
printf "%s\n" "${crateBin}" | head -n1 | tr -s ',' '\n' | while read -r BIN_NAME BIN_PATH; do
|
||||
${lib.optionalString (lib.length crateBin > 0) (lib.concatMapStringsSep "\n" (bin: ''
|
||||
mkdir -p target/bin
|
||||
# filter empty entries / empty "lines"
|
||||
if [[ -z "$BIN_NAME" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -z "$BIN_PATH" ]]; then
|
||||
# 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
|
||||
BIN_NAME='${bin.name or crateName}'
|
||||
${if !bin ? path then ''
|
||||
BIN_PATH=""
|
||||
search_for_bin_path "$BIN_NAME"
|
||||
'' else ''
|
||||
BIN_PATH='${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
|
||||
mkdir -p target/bin
|
||||
build_bin ${crateName} src/main.rs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, echo_build_heading, noisily, makeDeps }:
|
||||
{ lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs }:
|
||||
{ build
|
||||
, buildDependencies
|
||||
, colors
|
||||
|
@ -20,12 +20,12 @@
|
|||
, verbose
|
||||
, workspace_member }:
|
||||
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_);
|
||||
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")
|
||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||
buildDeps = makeDeps buildDependencies crateRenames;
|
||||
buildDeps = mkRustcDepArgs buildDependencies crateRenames;
|
||||
authors = lib.concatStringsSep ":" crateAuthors;
|
||||
optLevel = if release then 3 else 0;
|
||||
completeDepsDir = lib.concatStringsSep " " completeDeps;
|
||||
|
@ -90,9 +90,9 @@ in ''
|
|||
export HOST="${stdenv.hostPlatform.config}"
|
||||
export PROFILE=${if release then "release" else "debug"}
|
||||
export OUT_DIR=$(pwd)/target/build/${crateName}.out
|
||||
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
|
||||
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
|
||||
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
|
||||
export CARGO_PKG_VERSION_MAJOR=${lib.elemAt version 0}
|
||||
export CARGO_PKG_VERSION_MINOR=${lib.elemAt version 1}
|
||||
export CARGO_PKG_VERSION_PATCH=${lib.elemAt version 2}
|
||||
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
||||
export CARGO_PKG_HOMEPAGE="${crateHomepage}"
|
||||
export NUM_JOBS=1
|
||||
|
|
|
@ -13,56 +13,34 @@ let
|
|||
then "macos"
|
||||
else stdenv.hostPlatform.parsed.kernel.name;
|
||||
|
||||
makeDeps = dependencies: crateRenames:
|
||||
(lib.concatMapStringsSep " " (dep:
|
||||
# Create rustc arguments to link against the given list of dependencies and
|
||||
# renames
|
||||
mkRustcDepArgs = dependencies: crateRenames:
|
||||
lib.concatMapStringsSep " " (dep:
|
||||
let
|
||||
extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName;
|
||||
name = if builtins.hasAttr dep.crateName crateRenames then
|
||||
extern = lib.replaceStrings ["-"] ["_"] dep.libName;
|
||||
name = if lib.hasAttr dep.crateName crateRenames then
|
||||
lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName}
|
||||
else
|
||||
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"
|
||||
else
|
||||
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
|
||||
) dependencies);
|
||||
) dependencies;
|
||||
|
||||
echo_build_heading = colors: ''
|
||||
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 $@
|
||||
''}
|
||||
$@
|
||||
}
|
||||
'';
|
||||
inherit (import ./log.nix { inherit lib; }) noisily echo_build_heading;
|
||||
|
||||
configureCrate = import ./configure-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps; };
|
||||
buildCrate = import ./build-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps rust; };
|
||||
installCrate = import ./install-crate.nix;
|
||||
configureCrate = import ./configure-crate.nix {
|
||||
inherit lib stdenv echo_build_heading noisily mkRustcDepArgs;
|
||||
};
|
||||
|
||||
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,
|
||||
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;
|
||||
buildInputs_ = buildInputs;
|
||||
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
|
||||
stdenv.mkDerivation (rec {
|
||||
|
||||
|
@ -94,42 +81,28 @@ stdenv.mkDerivation (rec {
|
|||
name = "rust_${crate.crateName}-${crate.version}";
|
||||
depsBuildBuild = [ rust stdenv.cc ];
|
||||
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
||||
dependencies =
|
||||
builtins.map
|
||||
(dep: lib.getLib (dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; }))
|
||||
dependencies_;
|
||||
dependencies = makeDependencies dependencies_;
|
||||
buildDependencies = makeDependencies buildDependencies_;
|
||||
|
||||
buildDependencies =
|
||||
builtins.map
|
||||
(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 (
|
||||
completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);
|
||||
completeBuildDeps = lib.unique (
|
||||
buildDependencies
|
||||
++ lib.lists.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies
|
||||
++ lib.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies
|
||||
);
|
||||
|
||||
crateFeatures = if crate ? features then
|
||||
lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features) #"
|
||||
else "";
|
||||
crateFeatures = lib.optionalString (crate ? features)
|
||||
(lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features));
|
||||
|
||||
libName = if crate ? libName then crate.libName else crate.crateName;
|
||||
libPath = if crate ? libPath then crate.libPath else "";
|
||||
|
||||
depsMetadata = builtins.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies);
|
||||
metadata = builtins.substring 0 10 (builtins.hashString "sha256" (crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata ));
|
||||
|
||||
crateBin = if crate ? crateBin then
|
||||
builtins.foldl' (bins: bin: let
|
||||
name = (if bin ? name then bin.name else crateName);
|
||||
path = if bin ? path then bin.path else "";
|
||||
in
|
||||
bins + (if bin == "" then "" else ",") + "${name} ${path}"
|
||||
|
||||
) "" crate.crateBin
|
||||
else "";
|
||||
hasCrateBin = crate ? crateBin;
|
||||
# Seed the symbol hashes with something unique every time.
|
||||
# https://doc.rust-lang.org/1.0.0/rustc/metadata/loader/index.html#frobbing-symbols
|
||||
metadata = let
|
||||
depsMetadata = lib.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies);
|
||||
hashedMetadata = builtins.hashString "sha256"
|
||||
(crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata);
|
||||
in lib.substring 0 10 hashedMetadata;
|
||||
|
||||
build = crate.build or "";
|
||||
workspace_member = crate.workspace_member or ".";
|
||||
|
@ -142,9 +115,12 @@ stdenv.mkDerivation (rec {
|
|||
if lib.attrByPath ["plugin"] false crate then ["dylib"] else
|
||||
(crate.type or ["lib"]);
|
||||
colors = lib.attrByPath [ "colors" ] "always" crate;
|
||||
extraLinkFlags = builtins.concatStringsSep " " (crate.extraLinkFlags or []);
|
||||
extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or []);
|
||||
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 {
|
||||
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
|
||||
|
@ -155,7 +131,7 @@ stdenv.mkDerivation (rec {
|
|||
buildPhase = buildCrate {
|
||||
inherit crateName dependencies
|
||||
crateFeatures crateRenames libName release libPath crateType
|
||||
metadata crateBin hasCrateBin verbose colors
|
||||
metadata hasCrateBin crateBin verbose colors
|
||||
extraRustcOpts;
|
||||
};
|
||||
installPhase = installCrate crateName metadata;
|
||||
|
|
|
@ -3,23 +3,23 @@
|
|||
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
||||
abi = stdenv.hostPlatform.parsed.abi.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; });
|
||||
mkFeatures = feat: lib.lists.foldl (features: featureName:
|
||||
mkFeatures = feat: lib.foldl (features: featureName:
|
||||
if feat.${featureName} or false then
|
||||
[ featureName ] ++ features
|
||||
else
|
||||
features
|
||||
) [] (builtins.attrNames feat);
|
||||
include = includedFiles: src: builtins.filterSource (path: type:
|
||||
lib.lists.any (f:
|
||||
) [] (lib.attrNames feat);
|
||||
include = includedFiles: src: lib.filterSource (path: type:
|
||||
lib.any (f:
|
||||
let p = toString (src + ("/" + f));
|
||||
in
|
||||
p == path || (lib.strings.hasPrefix (p + "/") path)
|
||||
) includedFiles
|
||||
) src;
|
||||
exclude = excludedFiles: src: builtins.filterSource (path: type:
|
||||
lib.lists.all (f:
|
||||
exclude = excludedFiles: src: lib.filterSource (path: type:
|
||||
lib.all (f:
|
||||
!lib.strings.hasPrefix (toString (src + ("/" + f))) path
|
||||
) excludedFiles
|
||||
) src;
|
||||
|
|
117
pkgs/build-support/rust/build-rust-crate/lib.sh
Normal file
117
pkgs/build-support/rust/build-rust-crate/lib.sh
Normal 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
|
||||
}
|
33
pkgs/build-support/rust/build-rust-crate/log.nix
Normal file
33
pkgs/build-support/rust/build-rust-crate/log.nix
Normal 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 $@
|
||||
''}
|
||||
$@
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
version = "3.3.92";
|
||||
version = "4.7.95";
|
||||
in fetchFromGitHub {
|
||||
name = "material-design-icons-${version}";
|
||||
owner = "Templarian";
|
||||
|
@ -10,14 +10,13 @@ in fetchFromGitHub {
|
|||
|
||||
postFetch = ''
|
||||
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/*.svg $out/share/fonts/svg/
|
||||
cp fonts/*.ttf $out/share/fonts/truetype/
|
||||
cp fonts/*.woff $out/share/fonts/woff/
|
||||
cp fonts/*.woff2 $out/share/fonts/woff2/
|
||||
'';
|
||||
sha256 = "0dbm4qfd0b91yrw3cv4i377pnm98fgj936nk1m5wlx8mx8jahz48";
|
||||
sha256 = "0da92kz8ryy60kb5xm52md13w28ih4sfap8g3v9b4ziyww66zjhz";
|
||||
|
||||
meta = with lib; {
|
||||
description = "3200+ Material Design Icons from the Community";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
pname = "victor-mono";
|
||||
version = "1.2.7";
|
||||
version = "1.3.0";
|
||||
in fetchFromGitHub rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
|
@ -26,7 +26,7 @@ in fetchFromGitHub rec {
|
|||
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
|
||||
'';
|
||||
|
||||
sha256 = "0x4ydp11ry94wkkspnmy1xpzqq3m45xg60z1hq4ll9gmlccaknj0";
|
||||
sha256 = "1lv2x7kfspabnhvm8z79n165fw3awvzj1r8f0g5zn26wgdalgw69";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free programming font with cursive italics and ligatures";
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "evcxr";
|
||||
version = "0.4.5";
|
||||
version = "0.4.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "evcxr";
|
||||
rev = "v${version}";
|
||||
sha256 = "13fs9fgvdf8bh6vc8xs8qhil0a1qhm4gvv0ici37xh8a94ngsn7h";
|
||||
sha256 = "1yzvqf93zz3ncck4dyq2kayp408lm3h6fx0fb212j7h70mlzx984";
|
||||
};
|
||||
|
||||
cargoSha256 = "0g17g12isah4nkqp9i299qr1sz19k4czcc43rm1wbs0y9szaqvwc";
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "quickjs";
|
||||
version = "2019-10-27";
|
||||
version = "2019-12-21";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0xm16ja3c0k80jy0xkx0f40r44v2lgx2si4dnaw2w7c5nx7cmkai";
|
||||
sha256 = "13hlx6qwrrxmlvvqcr3irxba6zmf05cf54l32vj50wc66s1qd41p";
|
||||
};
|
||||
|
||||
makeFlags = [ "prefix=${placeholder ''out''}" ];
|
||||
|
|
19
pkgs/development/libraries/gsmlib/default.nix
Normal file
19
pkgs/development/libraries/gsmlib/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
23
pkgs/development/libraries/libctb/default.nix
Normal file
23
pkgs/development/libraries/libctb/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
13
pkgs/development/libraries/libctb/include-kbhit.patch
Normal file
13
pkgs/development/libraries/libctb/include-kbhit.patch
Normal 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; \
|
|
@ -3,7 +3,7 @@
|
|||
, systemd }:
|
||||
|
||||
let
|
||||
version = "2018-11-13";
|
||||
version = "2019-12-08";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "openzwave";
|
||||
|
@ -14,8 +14,8 @@ in stdenv.mkDerivation {
|
|||
src = fetchFromGitHub {
|
||||
owner = "home-assistant";
|
||||
repo = "open-zwave";
|
||||
rev = "0679daef6aa5a39e2441a68f7b45cfe022c4d961";
|
||||
sha256 = "1d13maj93i6h792cbvqpx43ffss44dxmvbwj2777vzvvjib8m4n8";
|
||||
rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
|
||||
sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ];
|
||||
|
|
|
@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
|
|||
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
|
||||
"-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
|
||||
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-ldl";
|
||||
|
|
|
@ -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 {
|
||||
version = "2.0.0";
|
||||
|
@ -12,7 +12,11 @@ stdenv.mkDerivation rec {
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cmakeFlags = [ "-DWITH_VTK=ON" "-DBUILD_ALL_MODULES=ON" ];
|
||||
cmakeFlags = [
|
||||
"-DWITH_VTK=ON"
|
||||
"-DBUILD_ALL_MODULES=ON"
|
||||
"-DWITH_TBB=ON"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
@ -30,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ cmake gtest ];
|
||||
buildInputs = [ boost eigen python vtk zlib ];
|
||||
buildInputs = [ boost eigen python vtk zlib tbb ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/BioMedIA/MIRTK";
|
||||
|
|
|
@ -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: {
|
||||
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.buildPackages.rsync ];
|
||||
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 {
|
||||
buildInputs = [ nodePackages.node-gyp-build ];
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"@angular/cli"
|
||||
, "@antora/cli"
|
||||
, "@antora/site-generator-default"
|
||||
, "@bitwarden/cli"
|
||||
, "@vue/cli"
|
||||
, "@webassemblyjs/cli"
|
||||
, "@webassemblyjs/repl"
|
||||
|
@ -125,7 +126,6 @@
|
|||
, "swagger"
|
||||
, {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"}
|
||||
, "tern"
|
||||
, { "texlab-citeproc-build-deps": "../tools/misc/texlab/citeproc" }
|
||||
, "textlint"
|
||||
, "textlint-plugin-latex"
|
||||
, "textlint-rule-abbr-within-parentheses"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -157,13 +157,13 @@ let
|
|||
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
||||
};
|
||||
};
|
||||
"aws4-1.8.0" = {
|
||||
"aws4-1.9.0" = {
|
||||
name = "aws4";
|
||||
packageName = "aws4";
|
||||
version = "1.8.0";
|
||||
version = "1.9.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz";
|
||||
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==";
|
||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
|
||||
sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
|
||||
};
|
||||
};
|
||||
"balanced-match-1.0.0" = {
|
||||
|
@ -526,13 +526,13 @@ let
|
|||
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
||||
};
|
||||
};
|
||||
"fast-json-stable-stringify-2.0.0" = {
|
||||
"fast-json-stable-stringify-2.1.0" = {
|
||||
name = "fast-json-stable-stringify";
|
||||
packageName = "fast-json-stable-stringify";
|
||||
version = "2.0.0";
|
||||
version = "2.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz";
|
||||
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2";
|
||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
|
||||
sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
|
||||
};
|
||||
};
|
||||
"fill-range-4.0.0" = {
|
||||
|
@ -1219,22 +1219,22 @@ let
|
|||
sha512 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==";
|
||||
};
|
||||
};
|
||||
"mime-db-1.40.0" = {
|
||||
"mime-db-1.42.0" = {
|
||||
name = "mime-db";
|
||||
packageName = "mime-db";
|
||||
version = "1.40.0";
|
||||
version = "1.42.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz";
|
||||
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==";
|
||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
|
||||
sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
|
||||
};
|
||||
};
|
||||
"mime-types-2.1.24" = {
|
||||
"mime-types-2.1.25" = {
|
||||
name = "mime-types";
|
||||
packageName = "mime-types";
|
||||
version = "2.1.24";
|
||||
version = "2.1.25";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz";
|
||||
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==";
|
||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
|
||||
sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
|
||||
};
|
||||
};
|
||||
"minimatch-3.0.4" = {
|
||||
|
@ -1624,13 +1624,13 @@ let
|
|||
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
||||
};
|
||||
};
|
||||
"psl-1.4.0" = {
|
||||
"psl-1.6.0" = {
|
||||
name = "psl";
|
||||
packageName = "psl";
|
||||
version = "1.4.0";
|
||||
version = "1.6.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz";
|
||||
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==";
|
||||
url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
|
||||
sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
|
||||
};
|
||||
};
|
||||
"punycode-1.4.1" = {
|
||||
|
@ -1714,13 +1714,13 @@ let
|
|||
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
||||
};
|
||||
};
|
||||
"resolve-1.12.0" = {
|
||||
"resolve-1.14.1" = {
|
||||
name = "resolve";
|
||||
packageName = "resolve";
|
||||
version = "1.12.0";
|
||||
version = "1.14.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz";
|
||||
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==";
|
||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
|
||||
sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
|
||||
};
|
||||
};
|
||||
"resolve-dir-1.0.1" = {
|
||||
|
@ -2497,7 +2497,7 @@ in
|
|||
sources."regex-not-1.0.2"
|
||||
sources."repeat-element-1.1.3"
|
||||
sources."repeat-string-1.6.1"
|
||||
sources."resolve-1.12.0"
|
||||
sources."resolve-1.14.1"
|
||||
sources."resolve-dir-1.0.1"
|
||||
sources."resolve-url-0.2.1"
|
||||
sources."ret-0.1.15"
|
||||
|
@ -2608,7 +2608,7 @@ in
|
|||
sources."assert-plus-1.0.0"
|
||||
sources."asynckit-0.4.0"
|
||||
sources."aws-sign2-0.7.0"
|
||||
sources."aws4-1.8.0"
|
||||
sources."aws4-1.9.0"
|
||||
sources."balanced-match-1.0.0"
|
||||
sources."base64-js-1.3.1"
|
||||
sources."bcrypt-pbkdf-1.0.2"
|
||||
|
@ -2631,7 +2631,7 @@ in
|
|||
sources."extend-3.0.2"
|
||||
sources."extsprintf-1.3.0"
|
||||
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."foreachasync-3.0.0"
|
||||
sources."forever-agent-0.6.1"
|
||||
|
@ -2671,8 +2671,8 @@ in
|
|||
sources."json-stringify-safe-5.0.1"
|
||||
sources."jsonfile-1.0.1"
|
||||
sources."jsprim-1.4.1"
|
||||
sources."mime-db-1.40.0"
|
||||
sources."mime-types-2.1.24"
|
||||
sources."mime-db-1.42.0"
|
||||
sources."mime-types-2.1.25"
|
||||
sources."minimatch-3.0.4"
|
||||
sources."minimist-0.0.8"
|
||||
sources."minipass-2.9.0"
|
||||
|
@ -2716,7 +2716,7 @@ in
|
|||
sources."performance-now-2.1.0"
|
||||
sources."process-nextick-args-2.0.1"
|
||||
sources."proto-list-1.2.4"
|
||||
sources."psl-1.4.0"
|
||||
sources."psl-1.6.0"
|
||||
sources."punycode-2.1.1"
|
||||
sources."qs-6.5.2"
|
||||
(sources."readable-stream-2.3.6" // {
|
||||
|
@ -2725,7 +2725,7 @@ in
|
|||
];
|
||||
})
|
||||
sources."request-2.88.0"
|
||||
sources."resolve-1.12.0"
|
||||
sources."resolve-1.14.1"
|
||||
sources."retry-0.10.1"
|
||||
sources."rimraf-2.6.3"
|
||||
sources."safe-buffer-5.2.0"
|
||||
|
|
|
@ -85,13 +85,13 @@ let
|
|||
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
||||
};
|
||||
};
|
||||
"aws4-1.8.0" = {
|
||||
"aws4-1.9.0" = {
|
||||
name = "aws4";
|
||||
packageName = "aws4";
|
||||
version = "1.8.0";
|
||||
version = "1.9.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz";
|
||||
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==";
|
||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
|
||||
sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
|
||||
};
|
||||
};
|
||||
"balanced-match-1.0.0" = {
|
||||
|
@ -292,13 +292,13 @@ let
|
|||
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
||||
};
|
||||
};
|
||||
"fast-json-stable-stringify-2.0.0" = {
|
||||
"fast-json-stable-stringify-2.1.0" = {
|
||||
name = "fast-json-stable-stringify";
|
||||
packageName = "fast-json-stable-stringify";
|
||||
version = "2.0.0";
|
||||
version = "2.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz";
|
||||
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2";
|
||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
|
||||
sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
|
||||
};
|
||||
};
|
||||
"findit-2.0.0" = {
|
||||
|
@ -571,22 +571,22 @@ let
|
|||
sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2";
|
||||
};
|
||||
};
|
||||
"mime-db-1.40.0" = {
|
||||
"mime-db-1.42.0" = {
|
||||
name = "mime-db";
|
||||
packageName = "mime-db";
|
||||
version = "1.40.0";
|
||||
version = "1.42.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz";
|
||||
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==";
|
||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
|
||||
sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
|
||||
};
|
||||
};
|
||||
"mime-types-2.1.24" = {
|
||||
"mime-types-2.1.25" = {
|
||||
name = "mime-types";
|
||||
packageName = "mime-types";
|
||||
version = "2.1.24";
|
||||
version = "2.1.25";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz";
|
||||
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==";
|
||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
|
||||
sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
|
||||
};
|
||||
};
|
||||
"minimatch-3.0.4" = {
|
||||
|
@ -841,13 +841,13 @@ let
|
|||
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
||||
};
|
||||
};
|
||||
"psl-1.4.0" = {
|
||||
"psl-1.6.0" = {
|
||||
name = "psl";
|
||||
packageName = "psl";
|
||||
version = "1.4.0";
|
||||
version = "1.6.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz";
|
||||
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==";
|
||||
url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
|
||||
sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
|
||||
};
|
||||
};
|
||||
"punycode-1.4.1" = {
|
||||
|
@ -895,13 +895,13 @@ let
|
|||
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
||||
};
|
||||
};
|
||||
"resolve-1.12.0" = {
|
||||
"resolve-1.14.1" = {
|
||||
name = "resolve";
|
||||
packageName = "resolve";
|
||||
version = "1.12.0";
|
||||
version = "1.14.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz";
|
||||
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==";
|
||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
|
||||
sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
|
||||
};
|
||||
};
|
||||
"retry-0.10.1" = {
|
||||
|
@ -1276,7 +1276,7 @@ in
|
|||
sources."assert-plus-1.0.0"
|
||||
sources."asynckit-0.4.0"
|
||||
sources."aws-sign2-0.7.0"
|
||||
sources."aws4-1.8.0"
|
||||
sources."aws4-1.9.0"
|
||||
sources."balanced-match-1.0.0"
|
||||
sources."base64-js-1.3.1"
|
||||
sources."bcrypt-pbkdf-1.0.2"
|
||||
|
@ -1299,7 +1299,7 @@ in
|
|||
sources."extend-3.0.2"
|
||||
sources."extsprintf-1.3.0"
|
||||
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."foreachasync-3.0.0"
|
||||
sources."forever-agent-0.6.1"
|
||||
|
@ -1339,8 +1339,8 @@ in
|
|||
sources."json-stringify-safe-5.0.1"
|
||||
sources."jsonfile-1.0.1"
|
||||
sources."jsprim-1.4.1"
|
||||
sources."mime-db-1.40.0"
|
||||
sources."mime-types-2.1.24"
|
||||
sources."mime-db-1.42.0"
|
||||
sources."mime-types-2.1.25"
|
||||
sources."minimatch-3.0.4"
|
||||
sources."minimist-0.0.8"
|
||||
sources."minipass-2.9.0"
|
||||
|
@ -1384,7 +1384,7 @@ in
|
|||
sources."performance-now-2.1.0"
|
||||
sources."process-nextick-args-2.0.1"
|
||||
sources."proto-list-1.2.4"
|
||||
sources."psl-1.4.0"
|
||||
sources."psl-1.6.0"
|
||||
sources."punycode-2.1.1"
|
||||
sources."qs-6.5.2"
|
||||
(sources."readable-stream-2.3.6" // {
|
||||
|
@ -1393,7 +1393,7 @@ in
|
|||
];
|
||||
})
|
||||
sources."request-2.88.0"
|
||||
sources."resolve-1.12.0"
|
||||
sources."resolve-1.14.1"
|
||||
sources."retry-0.10.1"
|
||||
sources."rimraf-2.6.3"
|
||||
sources."safe-buffer-5.2.0"
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -10,5 +10,6 @@ python_openzwave.overridePythonAttrs (oldAttrs: rec {
|
|||
sha256 = "2d500638270ee4f0e7e9e114d9b4402c94c232f314116cdcf88d7c1dc9a44427";
|
||||
};
|
||||
|
||||
patches = [];
|
||||
meta.homepage = https://github.com/home-assistant/python-openzwave;
|
||||
})
|
||||
|
|
31
pkgs/development/python-modules/junitparser/default.nix
Normal file
31
pkgs/development/python-modules/junitparser/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
50
pkgs/development/python-modules/prox-tv/default.nix
Normal file
50
pkgs/development/python-modules/prox-tv/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
11
pkgs/development/python-modules/prox-tv/use-openblas.patch
Normal file
11
pkgs/development/python-modules/prox-tv/use-openblas.patch
Normal 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']
|
||||
)
|
|
@ -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]):
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
|
||||
, pkgconfig
|
||||
, systemd, libyaml, openzwave, cython
|
||||
, systemd, libyaml, openzwave, cython, pyserial
|
||||
, six, pydispatcher, urwid }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
|||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
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
|
||||
# /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
|
||||
'';
|
||||
|
||||
patches = [ ./cython.patch ];
|
||||
|
||||
# no tests available
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "stm32loader";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1w6jg4dcyz6si6dcyx727sxi75wnl0j89xkiwqmsw286s1y8ijjw";
|
||||
sha256 = "0135qzxlrivvkq6wgkw7shfz94n755qs2c1754p1hc2jk0nqayrg";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ progress pyserial ];
|
||||
|
|
|
@ -9,6 +9,7 @@ let
|
|||
ruby_2_4
|
||||
ruby_2_5
|
||||
ruby_2_6
|
||||
ruby_2_7
|
||||
];
|
||||
|
||||
gemTests =
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{ buildGoPackage, fetchFromGitHub, lib }:
|
||||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "golangci-lint";
|
||||
version = "1.21.0";
|
||||
goPackagePath = "github.com/golangci/golangci-lint";
|
||||
|
||||
subPackages = [ "cmd/golangci-lint" ];
|
||||
version = "1.22.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golangci";
|
||||
repo = "golangci-lint";
|
||||
rev = "v${version}";
|
||||
sha256 = "0knvb59mg9jrzmfs5nzglz4nv047ayq1xz6dkis74wl1g9xi6yr5";
|
||||
sha256 = "1wwp6ppm5p2cf7jbcgmqm6alzaj34sa079d98afw21yr81qxvvid";
|
||||
};
|
||||
|
||||
modSha256 = "02j2cf5778ds0vwz0kkd9c1x5ap732vkq20bfg440spfajscvndm";
|
||||
subPackages = [ "cmd/golangci-lint" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linters Runner for Go. 5x faster than gometalinter. Nice colored output.";
|
||||
homepage = https://golangci.com/;
|
||||
|
|
24
pkgs/development/tools/kcli/default.nix
Normal file
24
pkgs/development/tools/kcli/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -3,32 +3,24 @@
|
|||
, fetchFromGitHub
|
||||
, nodejs
|
||||
, Security
|
||||
, texlab-citeproc-build-deps
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "texlab";
|
||||
version = "1.7.0";
|
||||
version = "1.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "latex-lsp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0b9lw6cmh7gyzj0pb3ghvqc3q7lzl12bfg9pjhl31lib3mmga8yb";
|
||||
# 1.9.0 + patches for building citeproc-db, see https://github.com/latex-lsp/texlab/pull/137
|
||||
rev = "e38fe4bedc9d8094649a9d2753ca9855e0c18882";
|
||||
sha256 = "0j87gmzyqrpgxrgalvlfqj5cj8j0h23hbbv8vdz2dhc847xhhfq1";
|
||||
};
|
||||
|
||||
cargoSha256 = "0qnysl0ayc242dgvanqgmx8v4a2cjg0f1lhbyw16qjv61qcsx8y5";
|
||||
|
||||
nativeBuildInputs = [ nodejs ];
|
||||
cargoSha256 = "09d9r7aal1q00idv08zdw7dygyasyp5l6jrh96cdclf63h1p4fk9";
|
||||
|
||||
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; {
|
||||
description = "An implementation of the Language Server Protocol for LaTeX";
|
||||
homepage = https://texlab.netlify.com/;
|
||||
|
|
49
pkgs/development/tools/rust/cargo-make/Cargo.lock
generated
49
pkgs/development/tools/rust/cargo-make/Cargo.lock
generated
|
@ -98,12 +98,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cargo-make"
|
||||
version = "0.24.2"
|
||||
version = "0.25.0"
|
||||
dependencies = [
|
||||
"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)",
|
||||
"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)",
|
||||
"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)",
|
||||
"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)",
|
||||
|
@ -112,11 +114,11 @@ dependencies = [
|
|||
"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)",
|
||||
"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)",
|
||||
"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_derive 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.104 (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)",
|
||||
]
|
||||
|
@ -173,7 +175,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "colored"
|
||||
version = "1.9.0"
|
||||
version = "1.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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)",
|
||||
]
|
||||
|
||||
[[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]]
|
||||
name = "envmnt"
|
||||
version = "0.7.4"
|
||||
|
@ -292,7 +309,7 @@ version = "1.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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]]
|
||||
|
@ -461,7 +478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "run_script"
|
||||
version = "0.3.2"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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]]
|
||||
name = "serde"
|
||||
version = "1.0.103"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.103"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -586,7 +603,7 @@ name = "toml"
|
|||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
|
@ -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 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 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 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-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 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"
|
||||
|
@ -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 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 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_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 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-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_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0"
|
||||
"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
|
||||
"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 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"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-make";
|
||||
version = "0.24.2";
|
||||
version = "0.25.0";
|
||||
|
||||
src =
|
||||
let
|
||||
|
@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
|
|||
owner = "sagiegurari";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "02fc3vf802dzqvyh61cmkjf3vqf5xsl8dhjggns7p5zr2aqh8pfi";
|
||||
sha256 = "1dvn3sjvvlllj99a94jl6yvdkv3a5qrrn3drdnx2s0v1w4djl5z4";
|
||||
};
|
||||
in
|
||||
runCommand "cargo-make-src" {} ''
|
||||
|
@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
cargoSha256 = "1x2pkis82hsikjqgma7f6wmkcmviiqwc7pvdpmww61iq2aqfg7ds";
|
||||
cargoSha256 = "07xjxc9vzysl8zh7699ardmr7sqc8jsq0nzfvjsx6x2mjllkp67n";
|
||||
|
||||
# Some tests fail because they need network access.
|
||||
# However, Travis ensures a proper build.
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
let
|
||||
|
||||
major = "2019";
|
||||
minor = "05";
|
||||
patch = "21";
|
||||
minor = "11";
|
||||
patch = "01";
|
||||
|
||||
version = "${major}.${minor}.${patch}";
|
||||
|
||||
|
@ -16,7 +16,7 @@ let
|
|||
owner = "daid";
|
||||
repo = "SeriousProton";
|
||||
rev = "EE-${version}";
|
||||
sha256 = "0q6in9rfs3b3qrfj2j6aj64z110k1yall4iqpp68rpp9r1dsh26p";
|
||||
sha256 = "1sc1z9n99jspa8jnk0pwdzynnadvcmb3pxl5cndw3z90xjwpzivw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
@ -42,7 +42,7 @@ stdenv.mkDerivation {
|
|||
owner = "daid";
|
||||
repo = "EmptyEpsilon";
|
||||
rev = "EE-${version}";
|
||||
sha256 = "0v2xz1wlji6m6311r3vpkdil3a7l1w5nsz5yqd1l8bimy11rdr55";
|
||||
sha256 = "09jizc6h7jbsp8bzv05pvb5z24zadjzjx1slj5317axsb170v81p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }:
|
||||
|
||||
let
|
||||
ver = "2019.5";
|
||||
in
|
||||
let cfg = import ./version.nix; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alfred-${ver}";
|
||||
pname = "alfred";
|
||||
inherit (cfg) version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz";
|
||||
sha256 = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa";
|
||||
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = cfg.sha256.${pname};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ stdenv, fetchurl, pkgconfig, libnl }:
|
||||
|
||||
let
|
||||
ver = "2019.3";
|
||||
in
|
||||
let cfg = import ./version.nix; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "batctl-${ver}";
|
||||
pname = "batctl";
|
||||
inherit (cfg) version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz";
|
||||
sha256 = "0307a01n72kg7vcm60mi8jna6bydiin2cr3ylrixra1596hkzn9b";
|
||||
url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = cfg.sha256.${pname};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ stdenv, fetchurl, kernel }:
|
||||
|
||||
let base = "batman-adv-2019.2"; in
|
||||
let cfg = import ./version.nix; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${base}-${kernel.version}";
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "batman-adv";
|
||||
version = "${cfg.version}-${kernel.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://downloads.open-mesh.org/batman/releases/${base}/${base}.tar.gz";
|
||||
sha256 = "1j5day3hia5nd21kb3msjblrybfr5sjnhrx7h5bb5ll8rykgdhvh";
|
||||
url = "http://downloads.open-mesh.org/batman/releases/${pname}-${cfg.version}/${pname}-${cfg.version}.tar.gz";
|
||||
sha256 = cfg.sha256.${pname};
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
|
9
pkgs/os-specific/linux/batman-adv/version.nix
Normal file
9
pkgs/os-specific/linux/batman-adv/version.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
version = "2019.5";
|
||||
|
||||
sha256 = {
|
||||
batman-adv = "1v18zvvg12jgywncbhxshgjc93r72ajpxgw22zp0zx22g2q13z99";
|
||||
alfred = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa";
|
||||
batctl = "1b9w4636dq8m38nzr8j0v0j3b0vdsw84c58c2isc33h66dx8brgz";
|
||||
};
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "0b59xyr8if0qcbnwqa88y275g9rzhjbbp8589i8xxpmws6x2c0y6";
|
||||
sha256 = "1jc1izlvgymp9x61r4yz2xhplwmp6x8laxqj9wy33iz6a2gn48wx";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "0irl5jlh5rrdfz5g28x4ifbillvspwd8fy4wi3qhmv9dw7gc60zl";
|
||||
sha256 = "18l3k0hgyanh6axgmmaaff139vpw6lf3fcf9iglpqwgspgw7rhr9";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "1j4916izy2nrzq7g6m5m365r60hhhx9rqcanjvaxv5x3vsy639gx";
|
||||
sha256 = "1jgwg5qb7lb30m5ywvpfagzrl6d0i524qpy3v99mina6j4fv5jdb";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv, lib, fetchsvn, linux
|
||||
, scripts ? fetchsvn {
|
||||
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/";
|
||||
rev = "17153";
|
||||
rev = "17161";
|
||||
sha256 = "0hyd7wp73w4555d42xcvk4x4nxrfckbzah2ckb4d2aqzxab87789";
|
||||
}
|
||||
, ...
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "power-calibrate";
|
||||
version = "0.01.28";
|
||||
version = "0.01.29";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1miyjs0vngzfdlsxhn5gndcalzkh28grg4m6faivvp1c6mjp794m";
|
||||
sha256 = "1v8wvhjqglkvk9cl2b48lkcwhbc6nsdi3hjd7sap4hyvd6703pgs";
|
||||
};
|
||||
|
||||
installFlags = [
|
||||
|
|
|
@ -12,13 +12,13 @@ buildGoModule rec {
|
|||
pname = "gotify-server";
|
||||
# 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.
|
||||
version = "2.0.12";
|
||||
version = "2.0.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gotify";
|
||||
repo = "server";
|
||||
rev = "v${version}";
|
||||
sha256 = "0pkws83ymmlxcdxadb1w6rmibw84vzhx9xrhxc6b1rjncb80l0kk";
|
||||
sha256 = "11ycs1ci1z8wm4fjgk4454kgszr4s8q9dc96pl77yvlngi4dk46d";
|
||||
};
|
||||
|
||||
modSha256 = "1awhbc8qs2bwv6y2vwd92r4ys0l1bzymrb36iamr040x961682wv";
|
||||
|
|
|
@ -8,13 +8,13 @@ yarn2nix-moretea.mkYarnPackage rec {
|
|||
packageJSON = ./package.json;
|
||||
yarnNix = ./yarndeps.nix;
|
||||
|
||||
version = "2.0.12";
|
||||
version = "2.0.13";
|
||||
|
||||
src_all = fetchFromGitHub {
|
||||
owner = "gotify";
|
||||
repo = "server";
|
||||
rev = "v${version}";
|
||||
sha256 = "0pkws83ymmlxcdxadb1w6rmibw84vzhx9xrhxc6b1rjncb80l0kk";
|
||||
sha256 = "11ycs1ci1z8wm4fjgk4454kgszr4s8q9dc96pl77yvlngi4dk46d";
|
||||
};
|
||||
src = "${src_all}/ui";
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
, withRuby_2_4 ? false, ruby_2_4
|
||||
, withRuby_2_5 ? false, ruby_2_5
|
||||
, withRuby_2_6 ? true, ruby_2_6
|
||||
, withRuby_2_7 ? true, ruby_2_7
|
||||
, withSSL ? true, openssl ? null
|
||||
, withIPv6 ? true
|
||||
, withDebug ? false
|
||||
|
@ -40,6 +41,7 @@ stdenv.mkDerivation rec {
|
|||
++ optional withRuby_2_4 ruby_2_4
|
||||
++ optional withRuby_2_5 ruby_2_5
|
||||
++ optional withRuby_2_6 ruby_2_6
|
||||
++ optional withRuby_2_7 ruby_2_7
|
||||
++ optional withSSL openssl;
|
||||
|
||||
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_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_7 "./configure ruby --module=ruby27 --ruby=${ruby_2_7}/bin/ruby"}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -23,11 +23,11 @@ let
|
|||
|
||||
in buildPythonApplication rec {
|
||||
pname = "matrix-synapse";
|
||||
version = "1.7.2";
|
||||
version = "1.7.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1nhzjmxzv5bvihl58cdpjw3hdghbh2pz7sg437k841mjn1qqq5lx";
|
||||
sha256 = "1vpwf6jqwb66mq31lk5f0wzfsqa2l65rd7b1zqjbhvmz0js8kz5f";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
defaultModules = mods: with mods; [
|
||||
applications.commands
|
||||
|
@ -27,6 +43,9 @@ defaultModules = mods: with mods; [
|
|||
codecs.h26x
|
||||
codecs.opus
|
||||
|
||||
databases.mariadb
|
||||
databases.pgsql
|
||||
|
||||
dialplans.asterisk
|
||||
dialplans.xml
|
||||
|
||||
|
@ -57,26 +76,9 @@ defaultModules = mods: with mods; [
|
|||
xml_int.cdr
|
||||
xml_int.rpc
|
||||
xml_int.scgi
|
||||
];
|
||||
] ++ lib.optionals stdenv.isLinux [ endpoints.gsmopen ];
|
||||
|
||||
in
|
||||
|
||||
{ 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;
|
||||
enabledModules = (if modules != null then modules else defaultModules) availableModules;
|
||||
|
||||
modulesConf = let
|
||||
lst = builtins.map (mod: mod.path) enabledModules;
|
||||
|
@ -86,11 +88,13 @@ modulesConf = let
|
|||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "freeswitch-1.8.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://files.freeswitch.org/freeswitch-releases/${name}.tar.bz2";
|
||||
sha256 = "0k52mxdfc5w9fdnz8kvfjiwnnjjhnpkirnyrfkhq7bad84m731z4";
|
||||
pname = "freeswitch";
|
||||
version = "1.10.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "signalwire";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1fmrm51zgrasjbmhs0pzb1lyca3ddx0wd35shvxnkjnifi8qd1h7";
|
||||
};
|
||||
postPatch = ''
|
||||
patchShebangs libs/libvpx/build/make/rtcd.pl
|
||||
|
@ -98,23 +102,21 @@ stdenv.mkDerivation rec {
|
|||
--replace AS=\''${AS} AS=yasm
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [
|
||||
openssl ncurses gnutls readline perl libjpeg
|
||||
sqlite pcre speex ldns libedit yasm which
|
||||
libsndfile libtiff
|
||||
]
|
||||
++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules)
|
||||
++ lib.optionals enablePostgres [ postgresql ]
|
||||
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = lib.optionals enablePostgres [ "--enable-core-pgsql-support" ];
|
||||
|
||||
preConfigure = ''
|
||||
./bootstrap.sh
|
||||
cp "${modulesConf}" modules.conf
|
||||
'';
|
||||
|
||||
|
@ -127,7 +129,7 @@ stdenv.mkDerivation rec {
|
|||
description = "Cross-Platform Scalable FREE Multi-Protocol Soft Switch";
|
||||
homepage = https://freeswitch.org/;
|
||||
license = stdenv.lib.licenses.mpl11;
|
||||
maintainers = with stdenv.lib.maintainers; [ ];
|
||||
maintainers = with stdenv.lib.maintainers; [ misuzu ];
|
||||
platforms = with stdenv.lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ libopus
|
||||
, libctb
|
||||
, gsmlib
|
||||
, lua
|
||||
, curl
|
||||
, libmysqlclient
|
||||
, postgresql
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -101,6 +105,11 @@ in
|
|||
theora = mk "codecs/mod_theora" [];
|
||||
};
|
||||
|
||||
databases = {
|
||||
mariadb = mk "databases/mod_mariadb" [ libmysqlclient ];
|
||||
pgsql = mk "databases/mod_pgsql" [ postgresql ];
|
||||
};
|
||||
|
||||
dialplans = {
|
||||
asterisk = mk "dialplans/mod_dialplan_asterisk" [];
|
||||
directory = mk "dialplans/mod_dialplan_directory" [];
|
||||
|
@ -114,7 +123,7 @@ in
|
|||
endpoints = {
|
||||
alsa = mk "endpoints/mod_alsa" [];
|
||||
dingaling = mk "endpoints/mod_dingaling" [];
|
||||
gsmopen = mk "endpoints/mod_gsmopen" [];
|
||||
gsmopen = mk "endpoints/mod_gsmopen" [ gsmlib libctb ];
|
||||
h323 = mk "endpoints/mod_h323" [];
|
||||
khomp = mk "endpoints/mod_khomp" [];
|
||||
loopback = mk "endpoints/mod_loopback" [];
|
||||
|
|
|
@ -23,4 +23,8 @@ buildRustPackage rec {
|
|||
platforms = platforms.all;
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/ion";
|
||||
};
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue