Merge staging-next into staging
This commit is contained in:
commit
62bfa88763
10
.github/CODEOWNERS
vendored
10
.github/CODEOWNERS
vendored
|
@ -11,7 +11,7 @@
|
||||||
/.github/CODEOWNERS @edolstra
|
/.github/CODEOWNERS @edolstra
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
/lib @edolstra @nbp
|
/lib @edolstra @nbp @infinisil
|
||||||
/lib/systems @nbp @ericson2314 @matthewbauer
|
/lib/systems @nbp @ericson2314 @matthewbauer
|
||||||
/lib/generators.nix @edolstra @nbp @Profpatsch
|
/lib/generators.nix @edolstra @nbp @Profpatsch
|
||||||
/lib/debug.nix @edolstra @nbp @Profpatsch
|
/lib/debug.nix @edolstra @nbp @Profpatsch
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
/pkgs/build-support/setup-hooks @Ericson2314
|
/pkgs/build-support/setup-hooks @Ericson2314
|
||||||
|
|
||||||
# NixOS Internals
|
# NixOS Internals
|
||||||
/nixos/default.nix @nbp
|
/nixos/default.nix @nbp @infinisil
|
||||||
/nixos/lib/from-env.nix @nbp
|
/nixos/lib/from-env.nix @nbp @infinisil
|
||||||
/nixos/lib/eval-config.nix @nbp
|
/nixos/lib/eval-config.nix @nbp @infinisil
|
||||||
/nixos/doc/manual/configuration/abstractions.xml @nbp
|
/nixos/doc/manual/configuration/abstractions.xml @nbp
|
||||||
/nixos/doc/manual/configuration/config-file.xml @nbp
|
/nixos/doc/manual/configuration/config-file.xml @nbp
|
||||||
/nixos/doc/manual/configuration/config-syntax.xml @nbp
|
/nixos/doc/manual/configuration/config-syntax.xml @nbp
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
# Haskell
|
# Haskell
|
||||||
/pkgs/development/compilers/ghc @basvandijk @cdepillabout
|
/pkgs/development/compilers/ghc @basvandijk @cdepillabout
|
||||||
/pkgs/development/haskell-modules @basvandijk @cdepillabout
|
/pkgs/development/haskell-modules @basvandijk @cdepillabout @infinisil
|
||||||
/pkgs/development/haskell-modules/default.nix @basvandijk @cdepillabout
|
/pkgs/development/haskell-modules/default.nix @basvandijk @cdepillabout
|
||||||
/pkgs/development/haskell-modules/generic-builder.nix @basvandijk @cdepillabout
|
/pkgs/development/haskell-modules/generic-builder.nix @basvandijk @cdepillabout
|
||||||
/pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout
|
/pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
|
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
|
||||||
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
|
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
|
||||||
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expresssions (programs), and how to use Nix command line tools
|
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
|
||||||
|
|
||||||
# Community
|
# Community
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
# Other Project Repositories
|
# Other Project Repositories
|
||||||
|
|
||||||
The sources of all offical Nix-related projects are in the [NixOS
|
The sources of all official Nix-related projects are in the [NixOS
|
||||||
organization on GitHub](https://github.com/NixOS/). Here are some of
|
organization on GitHub](https://github.com/NixOS/). Here are some of
|
||||||
the main ones:
|
the main ones:
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ let
|
||||||
commitIdFromGitRepo cleanSourceWith pathHasContext
|
commitIdFromGitRepo cleanSourceWith pathHasContext
|
||||||
canCleanSource;
|
canCleanSource;
|
||||||
inherit (modules) evalModules closeModules unifyModuleSyntax
|
inherit (modules) evalModules closeModules unifyModuleSyntax
|
||||||
applyIfFunction unpackSubmodule packSubmodule mergeModules
|
applyIfFunction mergeModules
|
||||||
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
|
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
|
||||||
pushDownProperties dischargeProperties filterOverrides
|
pushDownProperties dischargeProperties filterOverrides
|
||||||
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride
|
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride
|
||||||
|
|
|
@ -103,42 +103,42 @@ rec {
|
||||||
toClosureList = file: parentKey: imap1 (n: x:
|
toClosureList = file: parentKey: imap1 (n: x:
|
||||||
if isAttrs x || isFunction x then
|
if isAttrs x || isFunction x then
|
||||||
let key = "${parentKey}:anon-${toString n}"; in
|
let key = "${parentKey}:anon-${toString n}"; in
|
||||||
unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
|
unifyModuleSyntax file key (applyIfFunction key x args)
|
||||||
else
|
else
|
||||||
let file = toString x; key = toString x; in
|
let file = toString x; key = toString x; in
|
||||||
unifyModuleSyntax file key (applyIfFunction key (import x) args));
|
unifyModuleSyntax file key (applyIfFunction key (import x) args));
|
||||||
in
|
in
|
||||||
builtins.genericClosure {
|
builtins.genericClosure {
|
||||||
startSet = toClosureList unknownModule "" modules;
|
startSet = toClosureList unknownModule "" modules;
|
||||||
operator = m: toClosureList m.file m.key m.imports;
|
operator = m: toClosureList m._file m.key m.imports;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Massage a module into canonical form, that is, a set consisting
|
/* Massage a module into canonical form, that is, a set consisting
|
||||||
of ‘options’, ‘config’ and ‘imports’ attributes. */
|
of ‘options’, ‘config’ and ‘imports’ attributes. */
|
||||||
unifyModuleSyntax = file: key: m:
|
unifyModuleSyntax = file: key: m:
|
||||||
let metaSet = if m ? meta
|
let addMeta = config: if m ? meta
|
||||||
then { meta = m.meta; }
|
then mkMerge [ config { meta = m.meta; } ]
|
||||||
else {};
|
else config;
|
||||||
in
|
in
|
||||||
if m ? config || m ? options then
|
if m ? config || m ? options then
|
||||||
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
|
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
|
||||||
if badAttrs != {} then
|
if badAttrs != {} then
|
||||||
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
|
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
|
||||||
else
|
else
|
||||||
{ file = m._file or file;
|
{ _file = m._file or file;
|
||||||
key = toString m.key or key;
|
key = toString m.key or key;
|
||||||
disabledModules = m.disabledModules or [];
|
disabledModules = m.disabledModules or [];
|
||||||
imports = m.imports or [];
|
imports = m.imports or [];
|
||||||
options = m.options or {};
|
options = m.options or {};
|
||||||
config = mkMerge [ (m.config or {}) metaSet ];
|
config = addMeta (m.config or {});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ file = m._file or file;
|
{ _file = m._file or file;
|
||||||
key = toString m.key or key;
|
key = toString m.key or key;
|
||||||
disabledModules = m.disabledModules or [];
|
disabledModules = m.disabledModules or [];
|
||||||
imports = m.require or [] ++ m.imports or [];
|
imports = m.require or [] ++ m.imports or [];
|
||||||
options = {};
|
options = {};
|
||||||
config = mkMerge [ (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]) metaSet ];
|
config = addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]);
|
||||||
};
|
};
|
||||||
|
|
||||||
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
|
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
|
||||||
|
@ -171,17 +171,6 @@ rec {
|
||||||
else
|
else
|
||||||
f;
|
f;
|
||||||
|
|
||||||
/* We have to pack and unpack submodules. We cannot wrap the expected
|
|
||||||
result of the function as we would no longer be able to list the arguments
|
|
||||||
of the submodule. (see applyIfFunction) */
|
|
||||||
unpackSubmodule = unpack: m: args:
|
|
||||||
if isType "submodule" m then
|
|
||||||
{ _file = m.file; } // (unpack m.submodule args)
|
|
||||||
else unpack m args;
|
|
||||||
|
|
||||||
packSubmodule = file: m:
|
|
||||||
{ _type = "submodule"; file = file; submodule = m; };
|
|
||||||
|
|
||||||
/* Merge a list of modules. This will recurse over the option
|
/* Merge a list of modules. This will recurse over the option
|
||||||
declarations in all modules, combining them into a single set.
|
declarations in all modules, combining them into a single set.
|
||||||
At the same time, for each option declaration, it will merge the
|
At the same time, for each option declaration, it will merge the
|
||||||
|
@ -189,7 +178,7 @@ rec {
|
||||||
in the ‘value’ attribute of each option. */
|
in the ‘value’ attribute of each option. */
|
||||||
mergeModules = prefix: modules:
|
mergeModules = prefix: modules:
|
||||||
mergeModules' prefix modules
|
mergeModules' prefix modules
|
||||||
(concatMap (m: map (config: { inherit (m) file; inherit config; }) (pushDownProperties m.config)) modules);
|
(concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
|
||||||
|
|
||||||
mergeModules' = prefix: options: configs:
|
mergeModules' = prefix: options: configs:
|
||||||
let
|
let
|
||||||
|
@ -223,7 +212,7 @@ rec {
|
||||||
) {} modules;
|
) {} modules;
|
||||||
# an attrset 'name' => list of submodules that declare ‘name’.
|
# an attrset 'name' => list of submodules that declare ‘name’.
|
||||||
declsByName = byName "options" (module: option:
|
declsByName = byName "options" (module: option:
|
||||||
[{ inherit (module) file; options = option; }]
|
[{ inherit (module) _file; options = option; }]
|
||||||
) options;
|
) options;
|
||||||
# an attrset 'name' => list of submodules that define ‘name’.
|
# an attrset 'name' => list of submodules that define ‘name’.
|
||||||
defnsByName = byName "config" (module: value:
|
defnsByName = byName "config" (module: value:
|
||||||
|
@ -250,7 +239,7 @@ rec {
|
||||||
firstOption = findFirst (m: isOption m.options) "" decls;
|
firstOption = findFirst (m: isOption m.options) "" decls;
|
||||||
firstNonOption = findFirst (m: !isOption m.options) "" decls;
|
firstNonOption = findFirst (m: !isOption m.options) "" decls;
|
||||||
in
|
in
|
||||||
throw "The option `${showOption loc}' in `${firstOption.file}' is a prefix of options in `${firstNonOption.file}'."
|
throw "The option `${showOption loc}' in `${firstOption._file}' is a prefix of options in `${firstNonOption._file}'."
|
||||||
else
|
else
|
||||||
mergeModules' loc decls defns
|
mergeModules' loc decls defns
|
||||||
))
|
))
|
||||||
|
@ -267,7 +256,14 @@ rec {
|
||||||
|
|
||||||
'opts' is a list of modules. Each module has an options attribute which
|
'opts' is a list of modules. Each module has an options attribute which
|
||||||
correspond to the definition of 'loc' in 'opt.file'. */
|
correspond to the definition of 'loc' in 'opt.file'. */
|
||||||
mergeOptionDecls = loc: opts:
|
mergeOptionDecls =
|
||||||
|
let
|
||||||
|
packSubmodule = file: m:
|
||||||
|
{ _file = file; imports = [ m ]; };
|
||||||
|
coerceOption = file: opt:
|
||||||
|
if isFunction opt then packSubmodule file opt
|
||||||
|
else packSubmodule file { options = opt; };
|
||||||
|
in loc: opts:
|
||||||
foldl' (res: opt:
|
foldl' (res: opt:
|
||||||
let t = res.type;
|
let t = res.type;
|
||||||
t' = opt.options.type;
|
t' = opt.options.type;
|
||||||
|
@ -284,7 +280,7 @@ rec {
|
||||||
bothHave "apply" ||
|
bothHave "apply" ||
|
||||||
(bothHave "type" && (! typesMergeable))
|
(bothHave "type" && (! typesMergeable))
|
||||||
then
|
then
|
||||||
throw "The option `${showOption loc}' in `${opt.file}' is already declared in ${showFiles res.declarations}."
|
throw "The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}."
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
/* Add the modules of the current option to the list of modules
|
/* Add the modules of the current option to the list of modules
|
||||||
|
@ -293,16 +289,14 @@ rec {
|
||||||
current option declaration as the file use for the submodule. If the
|
current option declaration as the file use for the submodule. If the
|
||||||
submodule defines any filename, then we ignore the enclosing option file. */
|
submodule defines any filename, then we ignore the enclosing option file. */
|
||||||
options' = toList opt.options.options;
|
options' = toList opt.options.options;
|
||||||
coerceOption = file: opt:
|
|
||||||
if isFunction opt then packSubmodule file opt
|
|
||||||
else packSubmodule file { options = opt; };
|
|
||||||
getSubModules = opt.options.type.getSubModules or null;
|
getSubModules = opt.options.type.getSubModules or null;
|
||||||
submodules =
|
submodules =
|
||||||
if getSubModules != null then map (packSubmodule opt.file) getSubModules ++ res.options
|
if getSubModules != null then map (packSubmodule opt._file) getSubModules ++ res.options
|
||||||
else if opt.options ? options then map (coerceOption opt.file) options' ++ res.options
|
else if opt.options ? options then map (coerceOption opt._file) options' ++ res.options
|
||||||
else res.options;
|
else res.options;
|
||||||
in opt.options // res //
|
in opt.options // res //
|
||||||
{ declarations = res.declarations ++ [opt.file];
|
{ declarations = res.declarations ++ [opt._file];
|
||||||
options = submodules;
|
options = submodules;
|
||||||
} // typeSet
|
} // typeSet
|
||||||
) { inherit loc; declarations = []; options = []; } opts;
|
) { inherit loc; declarations = []; options = []; } opts;
|
||||||
|
|
|
@ -27,6 +27,8 @@ let
|
||||||
"riscv32-linux" "riscv64-linux"
|
"riscv32-linux" "riscv64-linux"
|
||||||
|
|
||||||
"aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none" "vc4-none"
|
"aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none" "vc4-none"
|
||||||
|
|
||||||
|
"js-ghcjs"
|
||||||
];
|
];
|
||||||
|
|
||||||
allParsed = map parse.mkSystemFromString all;
|
allParsed = map parse.mkSystemFromString all;
|
||||||
|
@ -46,6 +48,7 @@ in {
|
||||||
mips = filterDoubles predicates.isMips;
|
mips = filterDoubles predicates.isMips;
|
||||||
riscv = filterDoubles predicates.isRiscV;
|
riscv = filterDoubles predicates.isRiscV;
|
||||||
vc4 = filterDoubles predicates.isVc4;
|
vc4 = filterDoubles predicates.isVc4;
|
||||||
|
js = filterDoubles predicates.isJavaScript;
|
||||||
|
|
||||||
cygwin = filterDoubles predicates.isCygwin;
|
cygwin = filterDoubles predicates.isCygwin;
|
||||||
darwin = filterDoubles predicates.isDarwin;
|
darwin = filterDoubles predicates.isDarwin;
|
||||||
|
|
|
@ -164,6 +164,24 @@ checkConfigOutput "true" config.enableAlias ./alias-with-priority.nix
|
||||||
checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix
|
checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix
|
||||||
checkConfigOutput "false" config.enableAlias ./alias-with-priority-can-override.nix
|
checkConfigOutput "false" config.enableAlias ./alias-with-priority-can-override.nix
|
||||||
|
|
||||||
|
# submoduleWith
|
||||||
|
|
||||||
|
## specialArgs should work
|
||||||
|
checkConfigOutput "foo" config.submodule.foo ./declare-submoduleWith-special.nix
|
||||||
|
|
||||||
|
## shorthandOnlyDefines config behaves as expected
|
||||||
|
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix
|
||||||
|
checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix
|
||||||
|
checkConfigError 'value is a boolean while a set was expected' config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
|
||||||
|
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix
|
||||||
|
|
||||||
|
## submoduleWith should merge all modules in one swoop
|
||||||
|
checkConfigOutput "true" config.submodule.inner ./declare-submoduleWith-modules.nix
|
||||||
|
checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.nix
|
||||||
|
|
||||||
|
## Paths should be allowed as values and work as expected
|
||||||
|
checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
====== module tests ======
|
====== module tests ======
|
||||||
$pass Pass
|
$pass Pass
|
||||||
|
|
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;
|
||||||
|
}
|
|
@ -12,7 +12,7 @@ let
|
||||||
expected = lib.sort lib.lessThan y;
|
expected = lib.sort lib.lessThan y;
|
||||||
};
|
};
|
||||||
in with lib.systems.doubles; lib.runTests {
|
in with lib.systems.doubles; lib.runTests {
|
||||||
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded);
|
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js);
|
||||||
|
|
||||||
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
|
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
|
||||||
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
|
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
|
||||||
|
|
|
@ -358,25 +358,43 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
# A submodule (like typed attribute set). See NixOS manual.
|
# A submodule (like typed attribute set). See NixOS manual.
|
||||||
submodule = opts:
|
submodule = modules: submoduleWith {
|
||||||
|
shorthandOnlyDefinesConfig = true;
|
||||||
|
modules = toList modules;
|
||||||
|
};
|
||||||
|
|
||||||
|
submoduleWith =
|
||||||
|
{ modules
|
||||||
|
, specialArgs ? {}
|
||||||
|
, shorthandOnlyDefinesConfig ? false
|
||||||
|
}@attrs:
|
||||||
let
|
let
|
||||||
opts' = toList opts;
|
|
||||||
inherit (lib.modules) evalModules;
|
inherit (lib.modules) evalModules;
|
||||||
|
|
||||||
|
coerce = unify: value: if isFunction value
|
||||||
|
then setFunctionArgs (args: unify (value args)) (functionArgs value)
|
||||||
|
else unify (if shorthandOnlyDefinesConfig then { config = value; } else value);
|
||||||
|
|
||||||
|
allModules = defs: modules ++ imap1 (n: { value, file }:
|
||||||
|
if isAttrs value || isFunction value then
|
||||||
|
# Annotate the value with the location of its definition for better error messages
|
||||||
|
coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value
|
||||||
|
else value
|
||||||
|
) defs;
|
||||||
|
|
||||||
in
|
in
|
||||||
mkOptionType rec {
|
mkOptionType rec {
|
||||||
name = "submodule";
|
name = "submodule";
|
||||||
check = x: isAttrs x || isFunction x;
|
check = x: isAttrs x || isFunction x || path.check x;
|
||||||
merge = loc: defs:
|
merge = loc: defs:
|
||||||
let
|
(evalModules {
|
||||||
coerce = def: if isFunction def then def else { config = def; };
|
modules = allModules defs;
|
||||||
modules = opts' ++ map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs;
|
inherit specialArgs;
|
||||||
in (evalModules {
|
|
||||||
inherit modules;
|
|
||||||
args.name = last loc;
|
args.name = last loc;
|
||||||
prefix = loc;
|
prefix = loc;
|
||||||
}).config;
|
}).config;
|
||||||
getSubOptions = prefix: (evalModules
|
getSubOptions = prefix: (evalModules
|
||||||
{ modules = opts'; inherit prefix;
|
{ inherit modules prefix specialArgs;
|
||||||
# This is a work-around due to the fact that some sub-modules,
|
# This is a work-around due to the fact that some sub-modules,
|
||||||
# such as the one included in an attribute set, expects a "args"
|
# such as the one included in an attribute set, expects a "args"
|
||||||
# attribute to be given to the sub-module. As the option
|
# attribute to be given to the sub-module. As the option
|
||||||
|
@ -394,13 +412,29 @@ rec {
|
||||||
# It shouldn't cause an issue since this is cosmetic for the manual.
|
# It shouldn't cause an issue since this is cosmetic for the manual.
|
||||||
args.name = "‹name›";
|
args.name = "‹name›";
|
||||||
}).options;
|
}).options;
|
||||||
getSubModules = opts';
|
getSubModules = modules;
|
||||||
substSubModules = m: submodule m;
|
substSubModules = m: submoduleWith (attrs // {
|
||||||
functor = (defaultFunctor name) // {
|
modules = m;
|
||||||
# Merging of submodules is done as part of mergeOptionDecls, as we have to annotate
|
});
|
||||||
# each submodule with its location.
|
functor = defaultFunctor name // {
|
||||||
payload = [];
|
type = types.submoduleWith;
|
||||||
binOp = lhs: rhs: [];
|
payload = {
|
||||||
|
modules = modules;
|
||||||
|
specialArgs = specialArgs;
|
||||||
|
shorthandOnlyDefinesConfig = shorthandOnlyDefinesConfig;
|
||||||
|
};
|
||||||
|
binOp = lhs: rhs: {
|
||||||
|
modules = lhs.modules ++ rhs.modules;
|
||||||
|
specialArgs =
|
||||||
|
let intersecting = builtins.intersectAttrs lhs.specialArgs rhs.specialArgs;
|
||||||
|
in if intersecting == {}
|
||||||
|
then lhs.specialArgs // rhs.specialArgs
|
||||||
|
else throw "A submoduleWith option is declared multiple times with the same specialArgs \"${toString (attrNames intersecting)}\"";
|
||||||
|
shorthandOnlyDefinesConfig =
|
||||||
|
if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig
|
||||||
|
then lhs.shorthandOnlyDefinesConfig
|
||||||
|
else throw "A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1471,6 +1471,12 @@
|
||||||
githubId = 143982;
|
githubId = 143982;
|
||||||
name = "Charles Strahan";
|
name = "Charles Strahan";
|
||||||
};
|
};
|
||||||
|
cswank = {
|
||||||
|
email = "craigswank@gmail.com";
|
||||||
|
github = "cswank";
|
||||||
|
githubId = 490965;
|
||||||
|
name = "Craig Swank";
|
||||||
|
};
|
||||||
cwoac = {
|
cwoac = {
|
||||||
email = "oliver@codersoffortune.net";
|
email = "oliver@codersoffortune.net";
|
||||||
github = "cwoac";
|
github = "cwoac";
|
||||||
|
@ -4846,6 +4852,12 @@
|
||||||
githubId = 69918;
|
githubId = 69918;
|
||||||
name = "Stefan Dorn";
|
name = "Stefan Dorn";
|
||||||
};
|
};
|
||||||
|
multun = {
|
||||||
|
email = "victor.collod@epita.fr";
|
||||||
|
github = "multun";
|
||||||
|
githubId = 5047140;
|
||||||
|
name = "Victor Collod";
|
||||||
|
};
|
||||||
mvnetbiz = {
|
mvnetbiz = {
|
||||||
email = "mvnetbiz@gmail.com";
|
email = "mvnetbiz@gmail.com";
|
||||||
github = "mvnetbiz";
|
github = "mvnetbiz";
|
||||||
|
@ -5822,6 +5834,12 @@
|
||||||
github = "rickynils";
|
github = "rickynils";
|
||||||
name = "Rickard Nilsson";
|
name = "Rickard Nilsson";
|
||||||
};
|
};
|
||||||
|
rika = {
|
||||||
|
email = "rika@paymentswit.ch";
|
||||||
|
github = "NekomimiScience";
|
||||||
|
githubId = 1810487;
|
||||||
|
name = "Rika";
|
||||||
|
};
|
||||||
rileyinman = {
|
rileyinman = {
|
||||||
email = "rileyminman@gmail.com";
|
email = "rileyminman@gmail.com";
|
||||||
github = "rileyinman";
|
github = "rileyinman";
|
||||||
|
|
|
@ -257,14 +257,68 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A set of sub options <replaceable>o</replaceable>.
|
A set of sub options <replaceable>o</replaceable>.
|
||||||
<replaceable>o</replaceable> can be an attribute set or a function
|
<replaceable>o</replaceable> can be an attribute set, a function
|
||||||
returning an attribute set. Submodules are used in composed types to
|
returning an attribute set, or a path to a file containing such a value. Submodules are used in
|
||||||
create modular options. Submodule are detailed in
|
composed types to create modular options. This is equivalent to
|
||||||
|
<literal>types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }</literal>.
|
||||||
|
Submodules are detailed in
|
||||||
<xref
|
<xref
|
||||||
linkend='section-option-types-submodule' />.
|
linkend='section-option-types-submodule' />.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.submoduleWith</varname> {
|
||||||
|
<replaceable>modules</replaceable>,
|
||||||
|
<replaceable>specialArgs</replaceable> ? {},
|
||||||
|
<replaceable>shorthandOnlyDefinesConfig</replaceable> ? false }
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Like <varname>types.submodule</varname>, but more flexible and with better defaults.
|
||||||
|
It has parameters
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
|
<replaceable>modules</replaceable>
|
||||||
|
A list of modules to use by default for this submodule type. This gets combined
|
||||||
|
with all option definitions to build the final list of modules that will be included.
|
||||||
|
<note><para>
|
||||||
|
Only options defined with this argument are included in rendered documentation.
|
||||||
|
</para></note>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<replaceable>specialArgs</replaceable>
|
||||||
|
An attribute set of extra arguments to be passed to the module functions.
|
||||||
|
The option <literal>_module.args</literal> should be used instead
|
||||||
|
for most arguments since it allows overriding. <replaceable>specialArgs</replaceable> should only be
|
||||||
|
used for arguments that can'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>
|
</variablelist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -198,10 +198,11 @@ in
|
||||||
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
|
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
|
||||||
services.udev.extraRules =
|
services.udev.extraRules =
|
||||||
''
|
''
|
||||||
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
|
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
|
||||||
KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
|
KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
|
||||||
KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'"
|
KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'"
|
||||||
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
|
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
|
||||||
|
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];
|
boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
./programs/adb.nix
|
./programs/adb.nix
|
||||||
./programs/atop.nix
|
./programs/atop.nix
|
||||||
./programs/autojump.nix
|
./programs/autojump.nix
|
||||||
|
./programs/bandwhich.nix
|
||||||
./programs/bash/bash.nix
|
./programs/bash/bash.nix
|
||||||
./programs/bcc.nix
|
./programs/bcc.nix
|
||||||
./programs/browserpass.nix
|
./programs/browserpass.nix
|
||||||
|
@ -691,6 +692,8 @@
|
||||||
./services/networking/skydns.nix
|
./services/networking/skydns.nix
|
||||||
./services/networking/shadowsocks.nix
|
./services/networking/shadowsocks.nix
|
||||||
./services/networking/shairport-sync.nix
|
./services/networking/shairport-sync.nix
|
||||||
|
./services/networking/shorewall.nix
|
||||||
|
./services/networking/shorewall6.nix
|
||||||
./services/networking/shout.nix
|
./services/networking/shout.nix
|
||||||
./services/networking/sniproxy.nix
|
./services/networking/sniproxy.nix
|
||||||
./services/networking/smokeping.nix
|
./services/networking/smokeping.nix
|
||||||
|
|
29
nixos/modules/programs/bandwhich.nix
Normal file
29
nixos/modules/programs/bandwhich.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.programs.bandwhich;
|
||||||
|
in {
|
||||||
|
meta.maintainers = with maintainers; [ filalex77 ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
programs.bandwhich = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to add bandwhich to the global environment and configure a
|
||||||
|
setcap wrapper for it.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ bandwhich ];
|
||||||
|
security.wrappers.bandwhich = {
|
||||||
|
source = "${pkgs.bandwhich}/bin/bandwhich";
|
||||||
|
capabilities = "cap_net_raw,cap_net_admin+ep";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -66,7 +66,7 @@ in
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.redmine;
|
default = pkgs.redmine;
|
||||||
description = "Which Redmine package to use.";
|
description = "Which Redmine package to use.";
|
||||||
example = "pkgs.redmine.override { ruby = pkgs.ruby_2_4; }";
|
example = "pkgs.redmine.override { ruby = pkgs.ruby_2_7; }";
|
||||||
};
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
|
|
|
@ -17,32 +17,39 @@ let
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
} "mkdir -p $out; ln -s $nagiosObjectDefs $out/";
|
} "mkdir -p $out; ln -s $nagiosObjectDefs $out/";
|
||||||
|
|
||||||
nagiosCfgFile = pkgs.writeText "nagios.cfg"
|
nagiosCfgFile = let
|
||||||
''
|
default = {
|
||||||
# Paths for state and logs.
|
log_file="${nagiosLogDir}/current";
|
||||||
log_file=${nagiosLogDir}/current
|
log_archive_path="${nagiosLogDir}/archive";
|
||||||
log_archive_path=${nagiosLogDir}/archive
|
status_file="${nagiosState}/status.dat";
|
||||||
status_file=${nagiosState}/status.dat
|
object_cache_file="${nagiosState}/objects.cache";
|
||||||
object_cache_file=${nagiosState}/objects.cache
|
temp_file="${nagiosState}/nagios.tmp";
|
||||||
temp_file=${nagiosState}/nagios.tmp
|
lock_file="/run/nagios.lock";
|
||||||
lock_file=/run/nagios.lock # Not used I think.
|
state_retention_file="${nagiosState}/retention.dat";
|
||||||
state_retention_file=${nagiosState}/retention.dat
|
query_socket="${nagiosState}/nagios.qh";
|
||||||
query_socket=${nagiosState}/nagios.qh
|
check_result_path="${nagiosState}";
|
||||||
check_result_path=${nagiosState}
|
command_file="${nagiosState}/nagios.cmd";
|
||||||
command_file=${nagiosState}/nagios.cmd
|
cfg_dir="${nagiosObjectDefsDir}";
|
||||||
|
nagios_user="nagios";
|
||||||
# Configuration files.
|
nagios_group="nagios";
|
||||||
#resource_file=resource.cfg
|
illegal_macro_output_chars="`~$&|'\"<>";
|
||||||
cfg_dir=${nagiosObjectDefsDir}
|
retain_state_information="1";
|
||||||
|
};
|
||||||
# Uid/gid that the daemon runs under.
|
lines = mapAttrsToList (key: value: "${key}=${value}") (default // cfg.extraConfig);
|
||||||
nagios_user=nagios
|
content = concatStringsSep "\n" lines;
|
||||||
nagios_group=nagios
|
file = pkgs.writeText "nagios.cfg" content;
|
||||||
|
validated = pkgs.runCommand "nagios-checked.cfg" {preferLocalBuild=true;} ''
|
||||||
# Misc. options.
|
cp ${file} nagios.cfg
|
||||||
illegal_macro_output_chars=`~$&|'"<>
|
# nagios checks the existence of /var/lib/nagios, but
|
||||||
retain_state_information=1
|
# it does not exists in the build sandbox, so we fake it
|
||||||
''; # "
|
mkdir lib
|
||||||
|
lib=$(readlink -f lib)
|
||||||
|
sed -i s@=${nagiosState}@=$lib@ nagios.cfg
|
||||||
|
${pkgs.nagios}/bin/nagios -v nagios.cfg && cp ${file} $out
|
||||||
|
'';
|
||||||
|
defaultCfgFile = if cfg.validateConfig then validated else file;
|
||||||
|
in
|
||||||
|
if cfg.mainConfigFile == null then defaultCfgFile else cfg.mainConfigFile;
|
||||||
|
|
||||||
# Plain configuration for the Nagios web-interface with no
|
# Plain configuration for the Nagios web-interface with no
|
||||||
# authentication.
|
# authentication.
|
||||||
|
@ -77,16 +84,11 @@ in
|
||||||
(mkRemovedOptionModule [ "services" "nagios" "urlPath" ] "The urlPath option has been removed as it is hard coded to /nagios in the nagios package.")
|
(mkRemovedOptionModule [ "services" "nagios" "urlPath" ] "The urlPath option has been removed as it is hard coded to /nagios in the nagios package.")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ symphorien ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.nagios = {
|
services.nagios = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "<link xlink:href='http://www.nagios.org/'>Nagios</link> to monitor your system or network.";
|
||||||
default = false;
|
|
||||||
description = "
|
|
||||||
Whether to use <link
|
|
||||||
xlink:href='http://www.nagios.org/'>Nagios</link> to monitor
|
|
||||||
your system or network.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
objectDefs = mkOption {
|
objectDefs = mkOption {
|
||||||
description = "
|
description = "
|
||||||
|
@ -94,12 +96,14 @@ in
|
||||||
the hosts, host groups, services and contacts for the
|
the hosts, host groups, services and contacts for the
|
||||||
network that you want Nagios to monitor.
|
network that you want Nagios to monitor.
|
||||||
";
|
";
|
||||||
|
type = types.listOf types.path;
|
||||||
|
example = literalExample "[ ./objects.cfg ]";
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = mkOption {
|
plugins = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = [pkgs.nagiosPluginsOfficial pkgs.ssmtp];
|
default = with pkgs; [ nagiosPluginsOfficial ssmtp mailutils ];
|
||||||
defaultText = "[pkgs.nagiosPluginsOfficial pkgs.ssmtp]";
|
defaultText = "[pkgs.nagiosPluginsOfficial pkgs.ssmtp pkgs.mailutils]";
|
||||||
description = "
|
description = "
|
||||||
Packages to be added to the Nagios <envar>PATH</envar>.
|
Packages to be added to the Nagios <envar>PATH</envar>.
|
||||||
Typically used to add plugins, but can be anything.
|
Typically used to add plugins, but can be anything.
|
||||||
|
@ -107,14 +111,29 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
mainConfigFile = mkOption {
|
mainConfigFile = mkOption {
|
||||||
type = types.package;
|
type = types.nullOr types.package;
|
||||||
default = nagiosCfgFile;
|
default = null;
|
||||||
defaultText = "nagiosCfgFile";
|
|
||||||
description = "
|
description = "
|
||||||
Derivation for the main configuration file of Nagios.
|
If non-null, overrides the main configuration file of Nagios.
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
example = {
|
||||||
|
debug_level = "-1";
|
||||||
|
debug_file = "/var/log/nagios/debug.log";
|
||||||
|
};
|
||||||
|
default = {};
|
||||||
|
description = "Configuration to add to /etc/nagios.cfg";
|
||||||
|
};
|
||||||
|
|
||||||
|
validateConfig = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform;
|
||||||
|
description = "if true, the syntax of the nagios configuration file is checked at build time";
|
||||||
|
};
|
||||||
|
|
||||||
cgiConfigFile = mkOption {
|
cgiConfigFile = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = nagiosCGICfgFile;
|
default = nagiosCGICfgFile;
|
||||||
|
@ -126,6 +145,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
enableWebInterface = mkOption {
|
enableWebInterface = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "
|
description = "
|
||||||
Whether to enable the Nagios web interface. You should also
|
Whether to enable the Nagios web interface. You should also
|
||||||
|
@ -165,7 +185,7 @@ in
|
||||||
# This isn't needed, it's just so that the user can type "nagiostats
|
# This isn't needed, it's just so that the user can type "nagiostats
|
||||||
# -c /etc/nagios.cfg".
|
# -c /etc/nagios.cfg".
|
||||||
environment.etc = [
|
environment.etc = [
|
||||||
{ source = cfg.mainConfigFile;
|
{ source = nagiosCfgFile;
|
||||||
target = "nagios.cfg";
|
target = "nagios.cfg";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -173,7 +193,7 @@ in
|
||||||
environment.systemPackages = [ pkgs.nagios ];
|
environment.systemPackages = [ pkgs.nagios ];
|
||||||
systemd.services.nagios = {
|
systemd.services.nagios = {
|
||||||
description = "Nagios monitoring daemon";
|
description = "Nagios monitoring daemon";
|
||||||
path = [ pkgs.nagios ];
|
path = [ pkgs.nagios ] ++ cfg.plugins;
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
|
@ -184,14 +204,9 @@ in
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
LogsDirectory = "nagios";
|
LogsDirectory = "nagios";
|
||||||
StateDirectory = "nagios";
|
StateDirectory = "nagios";
|
||||||
|
ExecStart = "${pkgs.nagios}/bin/nagios /etc/nagios.cfg";
|
||||||
|
X-ReloadIfChanged = nagiosCfgFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = ''
|
|
||||||
for i in ${toString cfg.plugins}; do
|
|
||||||
export PATH=$i/bin:$i/sbin:$i/libexec:$PATH
|
|
||||||
done
|
|
||||||
exec ${pkgs.nagios}/bin/nagios ${cfg.mainConfigFile}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.httpd.virtualHosts = optionalAttrs cfg.enableWebInterface {
|
services.httpd.virtualHosts = optionalAttrs cfg.enableWebInterface {
|
||||||
|
|
|
@ -5,15 +5,10 @@ let
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
services.sysstat = {
|
services.sysstat = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "sar system activity collection";
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to enable sar system activity collection.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
collect-frequency = mkOption {
|
collect-frequency = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "*:00/10";
|
default = "*:00/10";
|
||||||
description = ''
|
description = ''
|
||||||
OnCalendar specification for sysstat-collect
|
OnCalendar specification for sysstat-collect
|
||||||
|
@ -21,6 +16,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
collect-args = mkOption {
|
collect-args = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "1 1";
|
default = "1 1";
|
||||||
description = ''
|
description = ''
|
||||||
Arguments to pass sa1 when collecting statistics
|
Arguments to pass sa1 when collecting statistics
|
||||||
|
@ -33,13 +29,13 @@ in {
|
||||||
systemd.services.sysstat = {
|
systemd.services.sysstat = {
|
||||||
description = "Resets System Activity Logs";
|
description = "Resets System Activity Logs";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
preStart = "test -d /var/log/sa || mkdir -p /var/log/sa";
|
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.sysstat}/lib/sa/sa1 --boot";
|
ExecStart = "${pkgs.sysstat}/lib/sa/sa1 --boot";
|
||||||
|
LogsDirectory = "sa";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ let
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
enableIwd = cfg.wifi.backend == "iwd";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -56,6 +57,17 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wifi = {
|
||||||
|
backend = mkOption {
|
||||||
|
type = types.enum [ "wpa_supplicant" "iwd" ];
|
||||||
|
default = "wpa_supplicant";
|
||||||
|
description = ''
|
||||||
|
Specify the Wi-Fi backend used.
|
||||||
|
Currently supported are <option>wpa_supplicant</option> or <option>iwd</option>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
@ -76,9 +88,6 @@ in {
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = !config.networking.useDHCP;
|
assertion = !config.networking.useDHCP;
|
||||||
message = "You can not use services.connman with networking.useDHCP";
|
message = "You can not use services.connman with networking.useDHCP";
|
||||||
}{
|
|
||||||
assertion = config.networking.wireless.enable;
|
|
||||||
message = "You must use services.connman with networking.wireless";
|
|
||||||
}{
|
}{
|
||||||
assertion = !config.networking.networkmanager.enable;
|
assertion = !config.networking.networkmanager.enable;
|
||||||
message = "You can not use services.connman with networking.networkmanager";
|
message = "You can not use services.connman with networking.networkmanager";
|
||||||
|
@ -89,12 +98,18 @@ in {
|
||||||
systemd.services.connman = {
|
systemd.services.connman = {
|
||||||
description = "Connection service";
|
description = "Connection service";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "syslog.target" ];
|
after = [ "syslog.target" ] ++ optional enableIwd "iwd.service";
|
||||||
|
requires = optional enableIwd "iwd.service";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "net.connman";
|
BusName = "net.connman";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon ${toString cfg.extraFlags}";
|
ExecStart = toString ([
|
||||||
|
"${pkgs.connman}/sbin/connmand"
|
||||||
|
"--config=${configFile}"
|
||||||
|
"--nodaemon"
|
||||||
|
] ++ optional enableIwd "--wifi=iwd_agent"
|
||||||
|
++ cfg.extraFlags);
|
||||||
StandardOutput = "null";
|
StandardOutput = "null";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -125,7 +140,12 @@ in {
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
wireless.enable = true;
|
wireless = {
|
||||||
|
enable = mkIf (!enableIwd) true;
|
||||||
|
iwd = mkIf enableIwd {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
networkmanager.enable = false;
|
networkmanager.enable = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -308,6 +308,7 @@ in {
|
||||||
|
|
||||||
if [ "$2" != "up" ]; then
|
if [ "$2" != "up" ]; then
|
||||||
logger "exit: event $2 != up"
|
logger "exit: event $2 != up"
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# coreutils and iproute are in PATH too
|
# coreutils and iproute are in PATH too
|
||||||
|
|
75
nixos/modules/services/networking/shorewall.nix
Normal file
75
nixos/modules/services/networking/shorewall.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
types = lib.types;
|
||||||
|
cfg = config.services.shorewall;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.shorewall = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to enable Shorewall IPv4 Firewall.
|
||||||
|
<warning>
|
||||||
|
<para>
|
||||||
|
Enabling this service WILL disable the existing NixOS
|
||||||
|
firewall! Default firewall rules provided by packages are not
|
||||||
|
considered at the moment.
|
||||||
|
</para>
|
||||||
|
</warning>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.shorewall;
|
||||||
|
defaultText = "pkgs.shorewall";
|
||||||
|
description = "The shorewall package to use.";
|
||||||
|
};
|
||||||
|
configs = lib.mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
description = ''
|
||||||
|
This option defines the Shorewall configs.
|
||||||
|
The attribute name defines the name of the config,
|
||||||
|
and the attribute value defines the content of the config.
|
||||||
|
'';
|
||||||
|
apply = lib.mapAttrs (name: text: pkgs.writeText "${name}" text);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.services.firewall.enable = false;
|
||||||
|
systemd.services.shorewall = {
|
||||||
|
description = "Shorewall IPv4 Firewall";
|
||||||
|
after = [ "ipset.target" ];
|
||||||
|
before = [ "network-pre.target" ];
|
||||||
|
wants = [ "network-pre.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
reloadIfChanged = true;
|
||||||
|
restartTriggers = lib.attrValues cfg.configs;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
ExecStart = "${cfg.package}/bin/shorewall start";
|
||||||
|
ExecReload = "${cfg.package}/bin/shorewall reload";
|
||||||
|
ExecStop = "${cfg.package}/bin/shorewall stop";
|
||||||
|
};
|
||||||
|
preStart = ''
|
||||||
|
install -D -d -m 750 /var/lib/shorewall
|
||||||
|
install -D -d -m 755 /var/lock/subsys
|
||||||
|
touch /var/log/shorewall.log
|
||||||
|
chown 750 /var/log/shorewall.log
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
etc = lib.mapAttrsToList
|
||||||
|
(name: file:
|
||||||
|
{ source = file;
|
||||||
|
target = "shorewall/${name}";
|
||||||
|
})
|
||||||
|
cfg.configs;
|
||||||
|
systemPackages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
75
nixos/modules/services/networking/shorewall6.nix
Normal file
75
nixos/modules/services/networking/shorewall6.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
types = lib.types;
|
||||||
|
cfg = config.services.shorewall6;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.shorewall6 = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to enable Shorewall IPv6 Firewall.
|
||||||
|
<warning>
|
||||||
|
<para>
|
||||||
|
Enabling this service WILL disable the existing NixOS
|
||||||
|
firewall! Default firewall rules provided by packages are not
|
||||||
|
considered at the moment.
|
||||||
|
</para>
|
||||||
|
</warning>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.shorewall;
|
||||||
|
defaultText = "pkgs.shorewall";
|
||||||
|
description = "The shorewall package to use.";
|
||||||
|
};
|
||||||
|
configs = lib.mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
description = ''
|
||||||
|
This option defines the Shorewall configs.
|
||||||
|
The attribute name defines the name of the config,
|
||||||
|
and the attribute value defines the content of the config.
|
||||||
|
'';
|
||||||
|
apply = lib.mapAttrs (name: text: pkgs.writeText "${name}" text);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.services.firewall.enable = false;
|
||||||
|
systemd.services.shorewall6 = {
|
||||||
|
description = "Shorewall IPv6 Firewall";
|
||||||
|
after = [ "ipset.target" ];
|
||||||
|
before = [ "network-pre.target" ];
|
||||||
|
wants = [ "network-pre.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
reloadIfChanged = true;
|
||||||
|
restartTriggers = lib.attrValues cfg.configs;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
ExecStart = "${cfg.package}/bin/shorewall6 start";
|
||||||
|
ExecReload = "${cfg.package}/bin/shorewall6 reload";
|
||||||
|
ExecStop = "${cfg.package}/bin/shorewall6 stop";
|
||||||
|
};
|
||||||
|
preStart = ''
|
||||||
|
install -D -d -m 750 /var/lib/shorewall6
|
||||||
|
install -D -d -m 755 /var/lock/subsys
|
||||||
|
touch /var/log/shorewall6.log
|
||||||
|
chown 750 /var/log/shorewall6.log
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
etc = lib.mapAttrsToList
|
||||||
|
(name: file:
|
||||||
|
{ source = file;
|
||||||
|
target = "shorewall6/${name}";
|
||||||
|
})
|
||||||
|
cfg.configs;
|
||||||
|
systemPackages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -112,12 +112,12 @@ in {
|
||||||
addresses = [ "tcp://192.168.0.10:51820" ];
|
addresses = [ "tcp://192.168.0.10:51820" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config._module.args.name;
|
default = name;
|
||||||
description = ''
|
description = ''
|
||||||
Name of the device
|
Name of the device
|
||||||
'';
|
'';
|
||||||
|
@ -175,7 +175,7 @@ in {
|
||||||
devices = [ "bigbox" ];
|
devices = [ "bigbox" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -190,7 +190,7 @@ in {
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config._module.args.name;
|
default = name;
|
||||||
description = ''
|
description = ''
|
||||||
The path to the folder which should be shared.
|
The path to the folder which should be shared.
|
||||||
'';
|
'';
|
||||||
|
@ -198,7 +198,7 @@ in {
|
||||||
|
|
||||||
id = mkOption {
|
id = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config._module.args.name;
|
default = name;
|
||||||
description = ''
|
description = ''
|
||||||
The id of the folder. Must be the same on all devices.
|
The id of the folder. Must be the same on all devices.
|
||||||
'';
|
'';
|
||||||
|
@ -206,7 +206,7 @@ in {
|
||||||
|
|
||||||
label = mkOption {
|
label = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config._module.args.name;
|
default = name;
|
||||||
description = ''
|
description = ''
|
||||||
The label of the folder.
|
The label of the folder.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -118,7 +118,7 @@ in
|
||||||
# 1) Only the "transmission" user and group have access to torrents.
|
# 1) Only the "transmission" user and group have access to torrents.
|
||||||
# 2) Optionally update/force specific fields into the configuration file.
|
# 2) Optionally update/force specific fields into the configuration file.
|
||||||
serviceConfig.ExecStartPre = preStart;
|
serviceConfig.ExecStartPre = preStart;
|
||||||
serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port}";
|
serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port} --config-dir ${settingsDir}";
|
||||||
serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
serviceConfig.User = cfg.user;
|
serviceConfig.User = cfg.user;
|
||||||
serviceConfig.Group = cfg.group;
|
serviceConfig.Group = cfg.group;
|
||||||
|
|
|
@ -62,7 +62,7 @@ in {
|
||||||
https = mkOption {
|
https = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable if there is a TLS terminating proxy in front of nextcloud.";
|
description = "Use https for generated links.";
|
||||||
};
|
};
|
||||||
|
|
||||||
maxUploadSize = mkOption {
|
maxUploadSize = mkOption {
|
||||||
|
|
|
@ -567,7 +567,7 @@ in
|
||||||
|
|
||||||
sslProtocols = mkOption {
|
sslProtocols = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "All -SSLv2 -SSLv3 -TLSv1";
|
default = "All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1";
|
||||||
example = "All -SSLv2 -SSLv3";
|
example = "All -SSLv2 -SSLv3";
|
||||||
description = "Allowed SSL/TLS protocol versions.";
|
description = "Allowed SSL/TLS protocol versions.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -225,12 +225,6 @@ let
|
||||||
fi
|
fi
|
||||||
${concatStringsSep "\n" (mapAttrsToList renderExtraVeth cfg.extraVeths)}
|
${concatStringsSep "\n" (mapAttrsToList renderExtraVeth cfg.extraVeths)}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the leader PID so that we can signal it in
|
|
||||||
# preStop. We can't use machinectl there because D-Bus
|
|
||||||
# might be shutting down. FIXME: in systemd 219 we can
|
|
||||||
# just signal systemd-nspawn to do a clean shutdown.
|
|
||||||
machinectl show "$INSTANCE" | sed 's/Leader=\(.*\)/\1/;t;d' > "/run/containers/$INSTANCE.pid"
|
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -715,14 +709,7 @@ in
|
||||||
|
|
||||||
postStart = postStartScript dummyConfig;
|
postStart = postStartScript dummyConfig;
|
||||||
|
|
||||||
preStop =
|
preStop = "machinectl poweroff $INSTANCE";
|
||||||
''
|
|
||||||
pid="$(cat /run/containers/$INSTANCE.pid)"
|
|
||||||
if [ -n "$pid" ]; then
|
|
||||||
kill -RTMIN+4 "$pid"
|
|
||||||
fi
|
|
||||||
rm -f "/run/containers/$INSTANCE.pid"
|
|
||||||
'';
|
|
||||||
|
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ let
|
||||||
++ map escapeShellArg container.cmd
|
++ map escapeShellArg container.cmd
|
||||||
);
|
);
|
||||||
ExecStartPre = "-${pkgs.docker}/bin/docker rm -f %n";
|
ExecStartPre = "-${pkgs.docker}/bin/docker rm -f %n";
|
||||||
ExecStop = "${pkgs.docker}/bin/docker stop %n";
|
ExecStop = ''${pkgs.bash}/bin/sh -c "[ $SERVICE_RESULT = success ] || ${pkgs.docker}/bin/docker stop %n"'';
|
||||||
ExecStopPost = "-${pkgs.docker}/bin/docker rm -f %n";
|
ExecStopPost = "-${pkgs.docker}/bin/docker rm -f %n";
|
||||||
|
|
||||||
### There is no generalized way of supporting `reload` for docker
|
### There is no generalized way of supporting `reload` for docker
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "3proxy";
|
name = "3proxy";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ misuzu ];
|
maintainers = [ misuzu ];
|
||||||
|
@ -134,29 +134,52 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
peer1.wait_for_unit("3proxy.service")
|
||||||
|
peer1.wait_for_open_port("9999")
|
||||||
$peer1->waitForUnit("3proxy.service");
|
|
||||||
|
|
||||||
# test none auth
|
# test none auth
|
||||||
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://216.58.211.112:9999");
|
peer0.succeed(
|
||||||
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://192.168.0.2:9999");
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://216.58.211.112:9999"
|
||||||
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://127.0.0.1:9999");
|
)
|
||||||
|
peer0.succeed(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://192.168.0.2:9999"
|
||||||
|
)
|
||||||
|
peer0.succeed(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.2:3128 -S -O /dev/null http://127.0.0.1:9999"
|
||||||
|
)
|
||||||
|
|
||||||
$peer2->waitForUnit("3proxy.service");
|
peer2.wait_for_unit("3proxy.service")
|
||||||
|
peer2.wait_for_open_port("9999")
|
||||||
|
|
||||||
# test iponly auth
|
# test iponly auth
|
||||||
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://216.58.211.113:9999");
|
peer0.succeed(
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://192.168.0.3:9999");
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://216.58.211.113:9999"
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://127.0.0.1:9999");
|
)
|
||||||
|
peer0.fail(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://192.168.0.3:9999"
|
||||||
|
)
|
||||||
|
peer0.fail(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.3:3128 -S -O /dev/null http://127.0.0.1:9999"
|
||||||
|
)
|
||||||
|
|
||||||
$peer3->waitForUnit("3proxy.service");
|
peer3.wait_for_unit("3proxy.service")
|
||||||
|
peer3.wait_for_open_port("9999")
|
||||||
|
|
||||||
# test strong auth
|
# test strong auth
|
||||||
$peer0->succeed("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999");
|
peer0.succeed(
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999");
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999");
|
)
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999");
|
peer0.fail(
|
||||||
$peer0->fail("${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://127.0.0.1:9999");
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://admin:bigsecret\@192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"
|
||||||
|
)
|
||||||
|
peer0.fail(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://216.58.211.114:9999"
|
||||||
|
)
|
||||||
|
peer0.fail(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://192.168.0.4:9999"
|
||||||
|
)
|
||||||
|
peer0.fail(
|
||||||
|
"${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://127.0.0.1:9999"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -179,6 +179,7 @@ in
|
||||||
mysql = handleTest ./mysql.nix {};
|
mysql = handleTest ./mysql.nix {};
|
||||||
mysqlBackup = handleTest ./mysql-backup.nix {};
|
mysqlBackup = handleTest ./mysql-backup.nix {};
|
||||||
mysqlReplication = handleTest ./mysql-replication.nix {};
|
mysqlReplication = handleTest ./mysql-replication.nix {};
|
||||||
|
nagios = handleTest ./nagios.nix {};
|
||||||
nat.firewall = handleTest ./nat.nix { withFirewall = true; };
|
nat.firewall = handleTest ./nat.nix { withFirewall = true; };
|
||||||
nat.firewall-conntrack = handleTest ./nat.nix { withFirewall = true; withConntrackHelpers = true; };
|
nat.firewall-conntrack = handleTest ./nat.nix { withFirewall = true; withConntrackHelpers = true; };
|
||||||
nat.standalone = handleTest ./nat.nix { withFirewall = false; };
|
nat.standalone = handleTest ./nat.nix { withFirewall = false; };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This test runs haka and probes it with hakactl
|
# This test runs haka and probes it with hakactl
|
||||||
|
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "haka";
|
name = "haka";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ tvestelind ];
|
maintainers = [ tvestelind ];
|
||||||
|
@ -15,10 +15,10 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
|
|
||||||
$haka->waitForUnit("haka.service");
|
haka.wait_for_unit("haka.service")
|
||||||
$haka->succeed("hakactl status");
|
haka.succeed("hakactl status")
|
||||||
$haka->succeed("hakactl stop");
|
haka.succeed("hakactl stop")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
# Test whether fast reboots via kexec work.
|
# Test whether fast reboots via kexec work.
|
||||||
|
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||||
name = "kexec";
|
name = "kexec";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [ eelco ];
|
maintainers = [ eelco ];
|
||||||
|
# Currently hangs forever; last output is:
|
||||||
|
# machine # [ 10.239914] dhcpcd[707]: eth0: adding default route via fe80::2
|
||||||
|
# machine: waiting for the VM to finish booting
|
||||||
|
# machine # Cannot find the ESP partition mount point.
|
||||||
|
# machine # [ 28.681197] nscd[692]: 692 checking for monitored file `/etc/netgroup': No such file or directory
|
||||||
|
broken = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
machine = { ... }:
|
machine = { ... }:
|
||||||
|
@ -11,9 +17,9 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
$machine->waitForUnit("multi-user.target");
|
machine.wait_for_unit("multi-user.target")
|
||||||
$machine->execute("systemctl kexec &");
|
machine.execute("systemctl kexec &")
|
||||||
$machine->{connected} = 0;
|
machine.connected = False
|
||||||
$machine->waitForUnit("multi-user.target");
|
machine.wait_for_unit("multi-user.target")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -27,6 +27,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.testuser = { };
|
users.users.testuser = { };
|
||||||
|
users.users.testuser2 = { };
|
||||||
services.mysql.enable = true;
|
services.mysql.enable = true;
|
||||||
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
|
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
|
||||||
ALTER USER root@localhost IDENTIFIED WITH unix_socket;
|
ALTER USER root@localhost IDENTIFIED WITH unix_socket;
|
||||||
|
@ -34,12 +35,17 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
DELETE FROM mysql.user WHERE user = ''';
|
DELETE FROM mysql.user WHERE user = ''';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
'';
|
'';
|
||||||
services.mysql.ensureDatabases = [ "testdb" ];
|
services.mysql.ensureDatabases = [ "testdb" "testdb2" ];
|
||||||
services.mysql.ensureUsers = [{
|
services.mysql.ensureUsers = [{
|
||||||
name = "testuser";
|
name = "testuser";
|
||||||
ensurePermissions = {
|
ensurePermissions = {
|
||||||
"testdb.*" = "ALL PRIVILEGES";
|
"testdb.*" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
|
} {
|
||||||
|
name = "testuser2";
|
||||||
|
ensurePermissions = {
|
||||||
|
"testdb2.*" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
}];
|
}];
|
||||||
services.mysql.package = pkgs.mariadb;
|
services.mysql.package = pkgs.mariadb;
|
||||||
};
|
};
|
||||||
|
@ -47,7 +53,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
start_all
|
start_all()
|
||||||
|
|
||||||
mysql.wait_for_unit("mysql")
|
mysql.wait_for_unit("mysql")
|
||||||
mysql.succeed("echo 'use empty_testdb;' | mysql -u root")
|
mysql.succeed("echo 'use empty_testdb;' | mysql -u root")
|
||||||
|
@ -62,6 +68,14 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
mariadb.succeed(
|
mariadb.succeed(
|
||||||
"echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser"
|
"echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser"
|
||||||
)
|
)
|
||||||
|
# Ensure testuser2 is not able to insert into testdb as mysql testuser2
|
||||||
|
mariadb.fail(
|
||||||
|
"echo 'use testdb; insert into tests values (23);' | sudo -u testuser2 mysql -u testuser2"
|
||||||
|
)
|
||||||
|
# Ensure testuser2 is not able to authenticate as mysql testuser
|
||||||
|
mariadb.fail(
|
||||||
|
"echo 'use testdb; insert into tests values (23);' | sudo -u testuser2 mysql -u testuser"
|
||||||
|
)
|
||||||
mariadb.succeed(
|
mariadb.succeed(
|
||||||
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
|
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
|
||||||
)
|
)
|
||||||
|
|
116
nixos/tests/nagios.nix
Normal file
116
nixos/tests/nagios.nix
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
import ./make-test-python.nix (
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
name = "nagios";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ symphorien ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { lib, ... }: let
|
||||||
|
writer = pkgs.writeShellScript "write" ''
|
||||||
|
set -x
|
||||||
|
echo "$@" >> /tmp/notifications
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# tested service
|
||||||
|
services.sshd.enable = true;
|
||||||
|
# nagios
|
||||||
|
services.nagios = {
|
||||||
|
enable = true;
|
||||||
|
# make state transitions faster
|
||||||
|
extraConfig.interval_length = "5";
|
||||||
|
objectDefs =
|
||||||
|
(map (x: "${pkgs.nagios}/etc/objects/${x}.cfg") [ "templates" "timeperiods" "commands" ]) ++ [
|
||||||
|
(
|
||||||
|
pkgs.writeText "objects.cfg" ''
|
||||||
|
# notifications are written to /tmp/notifications
|
||||||
|
define command {
|
||||||
|
command_name notify-host-by-file
|
||||||
|
command_line ${writer} "$HOSTNAME is $HOSTSTATE$"
|
||||||
|
}
|
||||||
|
define command {
|
||||||
|
command_name notify-service-by-file
|
||||||
|
command_line ${writer} "$SERVICEDESC$ is $SERVICESTATE$"
|
||||||
|
}
|
||||||
|
|
||||||
|
# nagios boilerplate
|
||||||
|
define contact {
|
||||||
|
contact_name alice
|
||||||
|
alias alice
|
||||||
|
host_notifications_enabled 1
|
||||||
|
service_notifications_enabled 1
|
||||||
|
service_notification_period 24x7
|
||||||
|
host_notification_period 24x7
|
||||||
|
service_notification_options w,u,c,r,f,s
|
||||||
|
host_notification_options d,u,r,f,s
|
||||||
|
service_notification_commands notify-service-by-file
|
||||||
|
host_notification_commands notify-host-by-file
|
||||||
|
email foo@example.com
|
||||||
|
}
|
||||||
|
define contactgroup {
|
||||||
|
contactgroup_name admins
|
||||||
|
alias Admins
|
||||||
|
members alice
|
||||||
|
}
|
||||||
|
define hostgroup{
|
||||||
|
hostgroup_name allhosts
|
||||||
|
alias All hosts
|
||||||
|
}
|
||||||
|
|
||||||
|
# monitored objects
|
||||||
|
define host {
|
||||||
|
use generic-host
|
||||||
|
host_name localhost
|
||||||
|
alias localhost
|
||||||
|
address localhost
|
||||||
|
hostgroups allhosts
|
||||||
|
contact_groups admins
|
||||||
|
# make state transitions faster.
|
||||||
|
max_check_attempts 2
|
||||||
|
check_interval 1
|
||||||
|
retry_interval 1
|
||||||
|
}
|
||||||
|
define service {
|
||||||
|
use generic-service
|
||||||
|
host_name localhost
|
||||||
|
service_description ssh
|
||||||
|
check_command check_ssh
|
||||||
|
# make state transitions faster.
|
||||||
|
max_check_attempts 2
|
||||||
|
check_interval 1
|
||||||
|
retry_interval 1
|
||||||
|
}
|
||||||
|
''
|
||||||
|
)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = { ... }: ''
|
||||||
|
with subtest("ensure sshd starts"):
|
||||||
|
machine.wait_for_unit("sshd.service")
|
||||||
|
|
||||||
|
|
||||||
|
with subtest("ensure nagios starts"):
|
||||||
|
machine.wait_for_file("/var/log/nagios/current")
|
||||||
|
|
||||||
|
|
||||||
|
def assert_notify(text):
|
||||||
|
machine.wait_for_file("/tmp/notifications")
|
||||||
|
real = machine.succeed("cat /tmp/notifications").strip()
|
||||||
|
print(f"got {real!r}, expected {text!r}")
|
||||||
|
assert text == real
|
||||||
|
|
||||||
|
|
||||||
|
with subtest("ensure we get a notification when sshd is down"):
|
||||||
|
machine.succeed("systemctl stop sshd")
|
||||||
|
assert_notify("ssh is CRITICAL")
|
||||||
|
|
||||||
|
|
||||||
|
with subtest("ensure tests can succeed"):
|
||||||
|
machine.succeed("systemctl start sshd")
|
||||||
|
machine.succeed("rm /tmp/notifications")
|
||||||
|
assert_notify("ssh is OK")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
|
@ -25,6 +25,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
# check if the netdata main page loads.
|
# check if the netdata main page loads.
|
||||||
netdata.succeed("curl --fail http://localhost:19999/")
|
netdata.succeed("curl --fail http://localhost:19999/")
|
||||||
|
netdata.succeed("sleep 4")
|
||||||
|
|
||||||
# check if netdata can read disk ops for root owned processes.
|
# check if netdata can read disk ops for root owned processes.
|
||||||
# if > 0, successful. verifies both netdata working and
|
# if > 0, successful. verifies both netdata working and
|
||||||
|
|
|
@ -1,16 +1,25 @@
|
||||||
{ fetchurl, bitwig-studio1,
|
{ fetchurl, bitwig-studio1, pulseaudio, xorg }:
|
||||||
pulseaudio }:
|
|
||||||
|
|
||||||
bitwig-studio1.overrideAttrs (oldAttrs: rec {
|
bitwig-studio1.overrideAttrs (oldAttrs: rec {
|
||||||
name = "bitwig-studio-${version}";
|
name = "bitwig-studio-${version}";
|
||||||
version = "3.0.3";
|
version = "3.1.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
|
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
|
||||||
sha256 = "162l95imq2fb4blfkianlkymm690by9ri73xf9zigknqf0gacgsa";
|
sha256 = "1mgyyl1mr8hmzn3qdmg77km6sk58hyd0gsqr9jksh0a8p6hj24pk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = oldAttrs.buildInputs ++ [ xorg.libXtst ];
|
||||||
|
|
||||||
runtimeDependencies = [
|
runtimeDependencies = [
|
||||||
pulseaudio
|
pulseaudio
|
||||||
];
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
${oldAttrs.installPhase}
|
||||||
|
|
||||||
|
# recover commercial jre
|
||||||
|
rm -f $out/libexec/lib/jre
|
||||||
|
cp -r opt/bitwig-studio/lib/jre $out/libexec/lib
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "qsampler";
|
pname = "qsampler";
|
||||||
version = "0.6.0";
|
version = "0.6.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
|
url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
|
||||||
sha256 = "1krhjyd67hvnv6sgndwq81lfvnb4qkhc7da1119fn2lzl7hx9wh3";
|
sha256 = "1wr7k739zx2nz00b810f60g9k3y92w05nfci987hw7y2sks9rd8j";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools
|
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools, wrapQtAppsHook
|
||||||
, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
|
, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
|
||||||
, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
|
, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ stdenv.mkDerivation (rec {
|
||||||
substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
|
substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake makedepend perl pkgconfig qttools ];
|
nativeBuildInputs =
|
||||||
|
[ cmake makedepend perl pkgconfig qttools wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dssi
|
dssi
|
||||||
|
|
|
@ -18,9 +18,9 @@ let
|
||||||
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
|
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
|
||||||
};
|
};
|
||||||
latestVersion = { # canary & dev
|
latestVersion = { # canary & dev
|
||||||
version = "4.0.0.6"; # "Android Studio 4.0 Canary 6"
|
version = "4.0.0.7"; # "Android Studio 4.0 Canary 7"
|
||||||
build = "193.6052267";
|
build = "193.6085562";
|
||||||
sha256Hash = "1naxyfnrj7milqha7xbwbcvyi81a7fqb7jsm03hhq5xs2sw55m1c";
|
sha256Hash = "0vk1vwh2yhsmadkb3v3m042ckzizc41ckqvj3jax8p86gl0b4whj";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
# Attributes are named by their corresponding release channels
|
# Attributes are named by their corresponding release channels
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
let
|
let
|
||||||
versions = {
|
versions = {
|
||||||
atom = {
|
atom = {
|
||||||
version = "1.36.1";
|
version = "1.42.0";
|
||||||
sha256 = "1m7q2r3zx463k7kpqb364piqrr69wrhs033ibzxdx9y7r4204qp4";
|
sha256 = "1ira528nwxi30jfwyivlac3wkkqb9d2z4jhxwq5m7mnpm5yli6jy";
|
||||||
};
|
};
|
||||||
|
|
||||||
atom-beta = {
|
atom-beta = {
|
||||||
version = "1.37.0";
|
version = "1.43.0";
|
||||||
beta = 0;
|
beta = 0;
|
||||||
sha256 = "0aq8r5vfgq7r31qajjgcg4n5a57a2m8fvq6fzy9vq5gawkvmaxxx";
|
sha256 = "06if3w5hx7njmyal0012zawn8f5af1z4bjcbzj2c0gd15nlsgm95";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig
|
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk3, atk, pango, freetype, fontconfig
|
||||||
, libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr
|
, libgnome-keyring3, gdk-pixbuf, cairo, cups, expat, libgpgerror, nspr
|
||||||
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret
|
, gconf, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||||
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
|
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
|
||||||
xorg.libxcb libsecret
|
xorg.libxcb libsecret libuuid at-spi2-atk
|
||||||
];
|
];
|
||||||
|
|
||||||
libPathNative = lib.makeLibraryPath packages;
|
libPathNative = lib.makeLibraryPath packages;
|
||||||
|
|
|
@ -250,12 +250,12 @@ in
|
||||||
|
|
||||||
clion = buildClion rec {
|
clion = buildClion rec {
|
||||||
name = "clion-${version}";
|
name = "clion-${version}";
|
||||||
version = "2019.2.5"; /* updated by script */
|
version = "2019.3.2"; /* updated by script */
|
||||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||||
sha256 = "0p0shikhf73ayflv5bm212kz06hiy3brww9h9ijjp6lcadxc9pmf"; /* updated by script */
|
sha256 = "0aksix22cbbxny68650qxjbbm1fmgbsnp97qix5kl5nx4y4yvlii"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-clion";
|
wmClass = "jetbrains-clion";
|
||||||
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
||||||
|
@ -263,12 +263,12 @@ in
|
||||||
|
|
||||||
datagrip = buildDataGrip rec {
|
datagrip = buildDataGrip rec {
|
||||||
name = "datagrip-${version}";
|
name = "datagrip-${version}";
|
||||||
version = "2019.2.6"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Your Swiss Army Knife for Databases and SQL";
|
description = "Your Swiss Army Knife for Databases and SQL";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
|
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
|
||||||
sha256 = "0g57njcklyskadxmvwb0r0z3ckq9qmcwh8qd80w396gj8fgbg50g"; /* updated by script */
|
sha256 = "1h7va6x625kxc2i22mnya64b1kb4vl5xgjxrv3lqwz725q5hkrxa"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-datagrip";
|
wmClass = "jetbrains-datagrip";
|
||||||
update-channel = "DataGrip RELEASE";
|
update-channel = "DataGrip RELEASE";
|
||||||
|
@ -276,12 +276,12 @@ in
|
||||||
|
|
||||||
goland = buildGoland rec {
|
goland = buildGoland rec {
|
||||||
name = "goland-${version}";
|
name = "goland-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Up and Coming Go IDE";
|
description = "Up and Coming Go IDE";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
||||||
sha256 = "0rkyw3532qvr6jhr09m3h0ssdy5ilfgfvqqliyf0cacwzw9lfv0p"; /* updated by script */
|
sha256 = "1lj5i71nw2m9xwv6q48b86kipiwj927bxiwxppb4isqax2w6250d"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-goland";
|
wmClass = "jetbrains-goland";
|
||||||
update-channel = "GoLand RELEASE";
|
update-channel = "GoLand RELEASE";
|
||||||
|
@ -289,12 +289,12 @@ in
|
||||||
|
|
||||||
idea-community = buildIdea rec {
|
idea-community = buildIdea rec {
|
||||||
name = "idea-community-${version}";
|
name = "idea-community-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = stdenv.lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||||
sha256 = "012vmclx6kg85gffgc9mr3fp1ffgx20dz7xvafk7c1iynawx8wgq"; /* updated by script */
|
sha256 = "0285jdh350dalvk76ajy57mi1yg1g905cnfhcjlb465bsxaw0z5n"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-idea-ce";
|
wmClass = "jetbrains-idea-ce";
|
||||||
update-channel = "IntelliJ IDEA RELEASE";
|
update-channel = "IntelliJ IDEA RELEASE";
|
||||||
|
@ -302,12 +302,12 @@ in
|
||||||
|
|
||||||
idea-ultimate = buildIdea rec {
|
idea-ultimate = buildIdea rec {
|
||||||
name = "idea-ultimate-${version}";
|
name = "idea-ultimate-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
||||||
sha256 = "09mz4dx3zbnqw0vh4iqr8sn2s8mvgr7zvn4k7kqivsiv8f79g90a"; /* updated by script */
|
sha256 = "0rb726nh2c7zxnpjcf6fyrpl29y9wgr6qhpb6hjxia2gzxab9jz0"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-idea";
|
wmClass = "jetbrains-idea";
|
||||||
update-channel = "IntelliJ IDEA RELEASE";
|
update-channel = "IntelliJ IDEA RELEASE";
|
||||||
|
@ -315,12 +315,12 @@ in
|
||||||
|
|
||||||
phpstorm = buildPhpStorm rec {
|
phpstorm = buildPhpStorm rec {
|
||||||
name = "phpstorm-${version}";
|
name = "phpstorm-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Professional IDE for Web and PHP developers";
|
description = "Professional IDE for Web and PHP developers";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||||
sha256 = "1bx8s4hh96pjfyccldwfarwv5fky6kg2kyc0h2arhfzwq1pbaisl"; /* updated by script */
|
sha256 = "170ppd0inn3s1yxd5ybspzgx2il78838z900fpg2pznq2hi0rn2h"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-phpstorm";
|
wmClass = "jetbrains-phpstorm";
|
||||||
update-channel = "PhpStorm RELEASE";
|
update-channel = "PhpStorm RELEASE";
|
||||||
|
@ -328,12 +328,12 @@ in
|
||||||
|
|
||||||
pycharm-community = buildPycharm rec {
|
pycharm-community = buildPycharm rec {
|
||||||
name = "pycharm-community-${version}";
|
name = "pycharm-community-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "PyCharm Community Edition";
|
description = "PyCharm Community Edition";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = stdenv.lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||||
sha256 = "00dl3yx13lw8qyc23dirw96vm2d8c6zsx73ds1ha8zycfh6hkxf8"; /* updated by script */
|
sha256 = "1cph2v7gaxikrvvdaz7ihk17qgdzrn86jamik9fijb8sjli3695v"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-pycharm-ce";
|
wmClass = "jetbrains-pycharm-ce";
|
||||||
update-channel = "PyCharm RELEASE";
|
update-channel = "PyCharm RELEASE";
|
||||||
|
@ -341,12 +341,12 @@ in
|
||||||
|
|
||||||
pycharm-professional = buildPycharm rec {
|
pycharm-professional = buildPycharm rec {
|
||||||
name = "pycharm-professional-${version}";
|
name = "pycharm-professional-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "PyCharm Professional Edition";
|
description = "PyCharm Professional Edition";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||||
sha256 = "14ab1cvypanwwn0k1hrx3rl964av6pvridgc19z49idw5wpgxgw7"; /* updated by script */
|
sha256 = "1bjijwc5f1is2920b497d395ckswhpxilmxaljb6pjwq4a2k8yzx"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-pycharm";
|
wmClass = "jetbrains-pycharm";
|
||||||
update-channel = "PyCharm RELEASE";
|
update-channel = "PyCharm RELEASE";
|
||||||
|
@ -354,12 +354,12 @@ in
|
||||||
|
|
||||||
rider = buildRider rec {
|
rider = buildRider rec {
|
||||||
name = "rider-${version}";
|
name = "rider-${version}";
|
||||||
version = "2019.2.3"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
|
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
|
||||||
sha256 = "13br6zmqpvi9hcd6wdnalkhj50gzr7cwrdh4v2bpda77iby2pz93"; /* updated by script */
|
sha256 = "0cs8fc3h6d2m84ppiqjy0f3xklpc5gf0i6c4bzv04y8ngh0cwgl2"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-rider";
|
wmClass = "jetbrains-rider";
|
||||||
update-channel = "Rider RELEASE";
|
update-channel = "Rider RELEASE";
|
||||||
|
@ -367,12 +367,12 @@ in
|
||||||
|
|
||||||
ruby-mine = buildRubyMine rec {
|
ruby-mine = buildRubyMine rec {
|
||||||
name = "ruby-mine-${version}";
|
name = "ruby-mine-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "The Most Intelligent Ruby and Rails IDE";
|
description = "The Most Intelligent Ruby and Rails IDE";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||||
sha256 = "1dqp222zvi8ikqdkprmqihyjxiq90vd0a0zl5935xjg1mzf8ald9"; /* updated by script */
|
sha256 = "0xadjx4szd9rk3bl3fqzhnfq744gmkbz9li80j5rqm27qhf4axfx"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-rubymine";
|
wmClass = "jetbrains-rubymine";
|
||||||
update-channel = "RubyMine RELEASE";
|
update-channel = "RubyMine RELEASE";
|
||||||
|
@ -380,12 +380,12 @@ in
|
||||||
|
|
||||||
webstorm = buildWebStorm rec {
|
webstorm = buildWebStorm rec {
|
||||||
name = "webstorm-${version}";
|
name = "webstorm-${version}";
|
||||||
version = "2019.2.4"; /* updated by script */
|
version = "2019.3.1"; /* updated by script */
|
||||||
description = "Professional IDE for Web and JavaScript development";
|
description = "Professional IDE for Web and JavaScript development";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
||||||
sha256 = "0iz9qgrbhn1rxr8n5q1y7klfs27j1f55pw8hqbl2ln4df94zqi5j"; /* updated by script */
|
sha256 = "0qjqd1a44mdlpvv3l4sx2n5clirwxialzh6s2dlb0dibx8zvnckp"; /* updated by script */
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-webstorm";
|
wmClass = "jetbrains-webstorm";
|
||||||
update-channel = "WebStorm RELEASE";
|
update-channel = "WebStorm RELEASE";
|
||||||
|
|
|
@ -3,25 +3,20 @@
|
||||||
, xorg ? null
|
, xorg ? null
|
||||||
, vulkan-loader ? null }:
|
, vulkan-loader ? null }:
|
||||||
|
|
||||||
assert stdenv.isLinux -> xorg != null;
|
with stdenv.lib;
|
||||||
assert stdenv.isLinux -> vulkan-loader != null;
|
|
||||||
|
|
||||||
let
|
rustPlatform.buildRustPackage rec {
|
||||||
graphicsBackend = if stdenv.isDarwin then "metal" else "vulkan";
|
|
||||||
in
|
|
||||||
with stdenv.lib;
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
pname = "rx";
|
pname = "rx";
|
||||||
version = "0.2.0";
|
version = "0.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cloudhead";
|
owner = "cloudhead";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0f6cw8zqr45bprj8ibhp89bb2a077g4zinfrdn943csdmh47qzcl";
|
sha256 = "0mhpq9x54d884ydmfv1358sgc4jc7bghfx2y0k7p879hyyxr52v1";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "05bqsw0nw24xysq86qa3hx9b5ncf50wfxsgpy388yrs2dfnphwlx";
|
cargoSha256 = "0fnrgijfkvapj1yyy9grnqh2vkciisf029af0gfwyzsxzdi62gg5";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||||
|
|
||||||
|
@ -31,15 +26,8 @@ in
|
||||||
libX11 libXrandr libXinerama libXcursor libXi libXext
|
libX11 libXrandr libXinerama libXcursor libXi libXext
|
||||||
]);
|
]);
|
||||||
|
|
||||||
cargoBuildFlags = [ "--features=${graphicsBackend}" ];
|
# FIXME: GLFW (X11) requires DISPLAY env variable for all tests
|
||||||
|
doCheck = false;
|
||||||
# TODO: better to factor that into the rust platform
|
|
||||||
checkPhase = ''
|
|
||||||
runHook preCheck
|
|
||||||
echo "Running cargo test"
|
|
||||||
cargo test --features=${graphicsBackend}
|
|
||||||
runHook postCheck
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = optional stdenv.isLinux ''
|
postInstall = optional stdenv.isLinux ''
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
|
@ -51,8 +39,7 @@ in
|
||||||
description = "Modern and extensible pixel editor implemented in Rust";
|
description = "Modern and extensible pixel editor implemented in Rust";
|
||||||
homepage = "https://cloudhead.io/rx/";
|
homepage = "https://cloudhead.io/rx/";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ minijackson ];
|
maintainers = with maintainers; [ minijackson filalex77 ];
|
||||||
platforms = with platforms; (linux ++ darwin ++ windows);
|
platforms = [ "x86_64-linux" ];
|
||||||
inherit version;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,19 +9,25 @@ assert ncursesSupport -> ncurses != null;
|
||||||
assert waylandSupport -> wayland != null;
|
assert waylandSupport -> wayland != null;
|
||||||
assert x11Support -> xlibs != null && xorg != null;
|
assert x11Support -> xlibs != null && xorg != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "bemenu";
|
pname = "bemenu";
|
||||||
version = "0.1.0";
|
version = "0.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Cloudef";
|
owner = "Cloudef";
|
||||||
repo = "bemenu";
|
repo = pname;
|
||||||
rev = "33e540a2b04ce78f5c7ab4a60b899c67f586cc32";
|
rev = version;
|
||||||
sha256 = "11h55m9dx6ai12pqij52ydjm36dvrcc856pa834njihrp626pl4w";
|
sha256 = "03k8wijdgj5nwmvgjhsrlh918n719789fhs4dqm23pd00rapxipk";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig pcre ];
|
nativeBuildInputs = [ cmake pkgconfig pcre ];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DBEMENU_CURSES_RENDERER=${if ncursesSupport then "ON" else "OFF"}"
|
||||||
|
"-DBEMENU_WAYLAND_RENDERER=${if waylandSupport then "ON" else "OFF"}"
|
||||||
|
"-DBEMENU_X11_RENDERER=${if x11Support then "ON" else "OFF"}"
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = with stdenv.lib; [
|
buildInputs = with stdenv.lib; [
|
||||||
cairo
|
cairo
|
||||||
fribidi
|
fribidi
|
||||||
|
|
|
@ -4,18 +4,20 @@ with stdenv.lib;
|
||||||
|
|
||||||
perlPackages.buildPerlPackage rec {
|
perlPackages.buildPerlPackage rec {
|
||||||
pname = "get_iplayer";
|
pname = "get_iplayer";
|
||||||
version = "2.99";
|
version = "3.24";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "get-iplayer";
|
owner = "get-iplayer";
|
||||||
repo = "get_iplayer";
|
repo = "get_iplayer";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "085bgwkjnaqp96gvd2s8qmkw69rz91si1sgzqdqbplkzj9bk2qii";
|
sha256 = "0yd84ncb6cjrk4v4kz3zrddkl7iwkm3zlfbjyswd9hanp8fvd4q3";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [ perl ];
|
buildInputs = [ perl ];
|
||||||
propagatedBuildInputs = with perlPackages; [HTMLParser HTTPCookies LWP XMLLibXML XMLSimple];
|
propagatedBuildInputs = with perlPackages; [
|
||||||
|
HTMLParser HTTPCookies LWP LWPProtocolHttps XMLLibXML XMLSimple
|
||||||
|
];
|
||||||
|
|
||||||
preConfigure = "touch Makefile.PL";
|
preConfigure = "touch Makefile.PL";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -33,6 +35,7 @@ perlPackages.buildPerlPackage rec {
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
homepage = https://squarepenguin.co.uk/;
|
homepage = https://squarepenguin.co.uk/;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
maintainers = with maintainers; [ rika ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
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
|
let
|
||||||
pname = "joplin-desktop";
|
pname = "joplin-desktop";
|
||||||
version = "1.0.167";
|
version = "1.0.177";
|
||||||
in appimageTools.wrapType2 rec {
|
in appimageTools.wrapType2 rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage";
|
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.AppImage";
|
||||||
sha256 = "062f2av60490ffrml0q8zv68yir6zaqif0g3d32c985gcvmgn9lw";
|
sha256 = "023q3yxqsv0vd76bvfhyhh0pnfia01rflfpyv0i6w6xnb5hm2jp7";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,22 +2,23 @@
|
||||||
, pkgconfig, meson, ninja, python3
|
, pkgconfig, meson, ninja, python3
|
||||||
, wrapGAppsHook, vala, shared-mime-info
|
, wrapGAppsHook, vala, shared-mime-info
|
||||||
, cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive
|
, cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive
|
||||||
|
, discount, gtksourceview3
|
||||||
, hicolor-icon-theme # for setup-hook
|
, hicolor-icon-theme # for setup-hook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "minder";
|
pname = "minder";
|
||||||
version = "1.5.1";
|
version = "1.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "phase1geo";
|
owner = "phase1geo";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1z3if8bbiigb3m5py641y0j8d9z0s6kbb325waxbqs240pcxipml";
|
sha256 = "0zma6hjx0068ih7fagb1gg5cgci0ccc764sd8qw6iglg61aihpx7";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig meson ninja python3 wrapGAppsHook vala shared-mime-info ];
|
nativeBuildInputs = [ pkgconfig meson ninja python3 wrapGAppsHook vala shared-mime-info ];
|
||||||
buildInputs = [ cairo pantheon.granite glib gtk3 libxml2 libgee libarchive hicolor-icon-theme ];
|
buildInputs = [ cairo pantheon.granite glib gtk3 libxml2 libgee libarchive hicolor-icon-theme discount gtksourceview3 ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
chmod +x meson/post_install.py
|
chmod +x meson/post_install.py
|
||||||
|
|
|
@ -26,13 +26,13 @@ assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "polybar";
|
pname = "polybar";
|
||||||
version = "3.4.1";
|
version = "3.4.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1z1m6dxh2i5vsnkzaccb9j02ab05wgmcgig5d0l9w856g5jp3zmy";
|
sha256 = "1ss4wzy68dpqr5a4m090nn36v8wsp4a7pj6whcxxdrrimgww5r88";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,13 @@ assert imagePreviewSupport -> w3m != null;
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
name = "ranger-${version}";
|
name = "ranger-${version}";
|
||||||
version = "1.9.2";
|
version = "1.9.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ranger";
|
owner = "ranger";
|
||||||
repo = "ranger";
|
repo = "ranger";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256= "1ws6g8z1m1hfp8bv4msvbaa9f7948p687jmc8h69yib4jkv3qyax";
|
sha256= "1rygfryczanvqxn43lmlkgs04sbqznbvbb9hlbm3h5qgdcl0xlw8";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
|
|
|
@ -55,6 +55,7 @@ in stdenv.mkDerivation rec {
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
|
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
|
||||||
export MOZCONFIG=$(pwd)/mozconfig
|
export MOZCONFIG=$(pwd)/mozconfig
|
||||||
|
export MOZ_NOSPAM=1
|
||||||
export builddir=$(pwd)/pmbuild
|
export builddir=$(pwd)/pmbuild
|
||||||
|
|
||||||
echo > $MOZCONFIG "
|
echo > $MOZCONFIG "
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
nodejs = nodejs-10_x;
|
nodejs = nodejs-10_x;
|
||||||
sha256 = "0slzw4791nl7v6sca9xlhzx16p91m92ln2agbkbdx4zpgasg4gnq";
|
sha256 = "1zw3pjj3z29n9s08xyid41yq765d4c16lgml79m24zw36qaji6h1";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./isDev.patch ];
|
patches = [ ./isDev.patch ];
|
||||||
|
|
|
@ -10,13 +10,13 @@ with lib;
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "qbittorrent";
|
pname = "qbittorrent";
|
||||||
version = "4.2.0";
|
version = "4.2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "qbittorrent";
|
owner = "qbittorrent";
|
||||||
repo = "qbittorrent";
|
repo = "qbittorrent";
|
||||||
rev = "release-${version}";
|
rev = "release-${version}";
|
||||||
sha256 = "17vm6aa2k8k1q14z9r2r06c794bcr4m0l0fdsn08wid6mj1zjsbx";
|
sha256 = "0bz4l7awkx4qf3gh9c8gj8fab989439zj8qy4x9r36wxdjg5cxil";
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: 2018-05-31: CMake is working but it is not officially supported
|
# NOTE: 2018-05-31: CMake is working but it is not officially supported
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "ssb-patchwork";
|
pname = "ssb-patchwork";
|
||||||
version = "3.17.1";
|
version = "3.17.2";
|
||||||
name = "Patchwork-${version}";
|
name = "Patchwork-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
|
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
|
||||||
sha256 = "06wcgdcagmh80nr8nyrnz83wgq7j8r96hn3ccka7nmn02pdgvp3k";
|
sha256 = "1pmy01jwdr461vsl4fsxi3jaqnjx9yl5dw4987y5g73qx21qc5d5";
|
||||||
};
|
};
|
||||||
|
|
||||||
binary = appimageTools.wrapType2 {
|
binary = appimageTools.wrapType2 {
|
||||||
|
|
|
@ -10,8 +10,8 @@ stdenv.mkDerivation rec{
|
||||||
version = "11.1.0.8865";
|
version = "11.1.0.8865";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb";
|
url = "http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/8865/wps-office_11.1.0.8865_amd64.deb";
|
||||||
sha256 = "0pxx3j02cm8d08iakg30azjvl3a50y4avyrf08ddgaavqnvkypfj";
|
sha256 = "1hfpj1ayhzlrnnp72yjzrpd60xsbj9y46m345lqysiaj1hnwdbd8";
|
||||||
};
|
};
|
||||||
unpackCmd = "dpkg -x $src .";
|
unpackCmd = "dpkg -x $src .";
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i "s|local daemon.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh
|
sed -i "s|local daemon=.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm755 gitstatusd $out/bin/gitstatusd
|
install -Dm755 gitstatusd $out/bin/gitstatusd
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "mpv-mpris-${version}.so";
|
name = "mpv-mpris-${version}.so";
|
||||||
version = "0.2";
|
version = "0.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hoyon";
|
owner = "hoyon";
|
||||||
repo = "mpv-mpris";
|
repo = "mpv-mpris";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx";
|
sha256 = "02lqsgp296s8wr0yh6wm8h7nhn53rj254zahpzbwdv15apgy0z17";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [ ./bochs-2.6.10-glibc-2.26.patch ];
|
patches = [ ./bochs-2.6.10-glibc-2.26.patch ];
|
||||||
|
|
||||||
buildInputs = with stdenv.lib;
|
buildInputs =
|
||||||
[ pkgconfig libtool gtk2 libGLU libGL readline libX11 libXpm docbook_xml_dtd_45 docbook_xsl ]
|
[ pkgconfig libtool gtk2 libGLU libGL readline libX11 libXpm docbook_xml_dtd_45 docbook_xsl ]
|
||||||
++ optionals termSupport [ ncurses ]
|
++ optionals termSupport [ ncurses ]
|
||||||
++ optionals sdlSupport [ SDL2 ]
|
++ optionals sdlSupport [ SDL2 ]
|
||||||
|
@ -118,7 +118,7 @@ stdenv.mkDerivation rec {
|
||||||
in C++, that runs on most popular platforms. It includes emulation of the
|
in C++, that runs on most popular platforms. It includes emulation of the
|
||||||
Intel x86 CPU, common I/O devices, and a custom BIOS.
|
Intel x86 CPU, common I/O devices, and a custom BIOS.
|
||||||
'';
|
'';
|
||||||
homepage = http://bochs.sourceforge.net/;
|
homepage = "http://bochs.sourceforge.net/";
|
||||||
license = licenses.lgpl2Plus;
|
license = licenses.lgpl2Plus;
|
||||||
maintainers = with maintainers; [ AndersonTorres ];
|
maintainers = with maintainers; [ AndersonTorres ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
|
@ -35,7 +35,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "4.1.0";
|
version = "4.2.0";
|
||||||
pname = "qemu"
|
pname = "qemu"
|
||||||
+ stdenv.lib.optionalString xenSupport "-xen"
|
+ stdenv.lib.optionalString xenSupport "-xen"
|
||||||
+ stdenv.lib.optionalString hostCpuOnly "-host-cpu-only"
|
+ stdenv.lib.optionalString hostCpuOnly "-host-cpu-only"
|
||||||
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2";
|
url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2";
|
||||||
sha256 = "1bpl6hwiw1jdxk4xmqp10qgki0dji0l2rzr10dyhyk8d85vxxw29";
|
sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
|
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
|
||||||
|
@ -77,6 +77,13 @@ stdenv.mkDerivation rec {
|
||||||
./no-etc-install.patch
|
./no-etc-install.patch
|
||||||
./fix-qemu-ga.patch
|
./fix-qemu-ga.patch
|
||||||
./9p-ignore-noatime.patch
|
./9p-ignore-noatime.patch
|
||||||
|
(fetchpatch {
|
||||||
|
name = "CVE-2019-15890.patch";
|
||||||
|
url = "https://git.qemu.org/?p=libslirp.git;a=patch;h=c59279437eda91841b9d26079c70b8a540d41204";
|
||||||
|
sha256 = "1q2rc67mfdz034mk81z9bw105x9zad7n954sy3kq068b1svrf7iy";
|
||||||
|
stripLen = 1;
|
||||||
|
extraPrefix = "slirp/";
|
||||||
|
})
|
||||||
] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
|
] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
|
||||||
++ optionals stdenv.hostPlatform.isMusl [
|
++ optionals stdenv.hostPlatform.isMusl [
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 85862fb8..ed52c5ec 100644
|
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -841,7 +841,7 @@ endif
|
@@ -867,7 +867,7 @@ install-includedir:
|
||||||
|
$(INSTALL_DIR) "$(DESTDIR)$(includedir)"
|
||||||
|
|
||||||
ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
|
install: all $(if $(BUILD_DOCS),install-doc) \
|
||||||
|
- install-datadir install-localstatedir install-includedir \
|
||||||
-install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir \
|
+ install-datadir install-includedir \
|
||||||
+install: all $(if $(BUILD_DOCS),install-doc) install-datadir \
|
|
||||||
$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
|
$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
|
||||||
recurse-install
|
recurse-install
|
||||||
ifneq ($(TOOLS),)
|
ifneq ($(TOOLS),)
|
||||||
|
|
|
@ -66,7 +66,7 @@ let
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
expand-response-params =
|
expand-response-params =
|
||||||
if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null"
|
if buildPackages ? stdenv && buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null"
|
||||||
then import ../expand-response-params { inherit (buildPackages) stdenv; }
|
then import ../expand-response-params { inherit (buildPackages) stdenv; }
|
||||||
else "";
|
else "";
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ let
|
||||||
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||||
|
|
||||||
expand-response-params =
|
expand-response-params =
|
||||||
if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null"
|
if buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null"
|
||||||
then import ../expand-response-params { inherit (buildPackages) stdenv; }
|
then import ../expand-response-params { inherit (buildPackages) stdenv; }
|
||||||
else "";
|
else "";
|
||||||
|
|
||||||
|
|
|
@ -1,151 +1,76 @@
|
||||||
{ lib, stdenv, echo_build_heading, noisily, makeDeps, rust }:
|
{ lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs, rust }:
|
||||||
{ crateName,
|
{ crateName,
|
||||||
dependencies,
|
dependencies,
|
||||||
crateFeatures, crateRenames, libName, release, libPath,
|
crateFeatures, crateRenames, libName, release, libPath,
|
||||||
crateType, metadata, crateBin, hasCrateBin,
|
crateType, metadata, crateBin, hasCrateBin,
|
||||||
extraRustcOpts, verbose, colors }:
|
extraRustcOpts, verbose, colors,
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
baseRustcOpts =
|
||||||
deps = makeDeps dependencies crateRenames;
|
[(if release then "-C opt-level=3" else "-C debuginfo=2")]
|
||||||
rustcOpts =
|
++ ["-C codegen-units=$NIX_BUILD_CORES"]
|
||||||
lib.lists.foldl' (opts: opt: opts + " " + opt)
|
++ [(mkRustcDepArgs dependencies crateRenames)]
|
||||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
++ [crateFeatures]
|
||||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
++ extraRustcOpts
|
||||||
|
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTarget stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
|
||||||
|
;
|
||||||
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
|
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
|
||||||
|
|
||||||
|
|
||||||
|
# build the final rustc arguments that can be different between different
|
||||||
|
# crates
|
||||||
|
libRustcOpts = lib.concatStringsSep " " (
|
||||||
|
baseRustcOpts
|
||||||
|
++ [rustcMeta]
|
||||||
|
++ (map (x: "--crate-type ${x}") crateType)
|
||||||
|
);
|
||||||
|
|
||||||
|
binRustcOpts = lib.concatStringsSep " " (
|
||||||
|
baseRustcOpts
|
||||||
|
);
|
||||||
|
|
||||||
in ''
|
in ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
norm=""
|
|
||||||
bold=""
|
|
||||||
green=""
|
|
||||||
boldgreen=""
|
|
||||||
if [[ "${colors}" == "always" ]]; then
|
|
||||||
norm="$(printf '\033[0m')" #returns to "normal"
|
|
||||||
bold="$(printf '\033[0;1m')" #set bold
|
|
||||||
green="$(printf '\033[0;32m')" #set green
|
|
||||||
boldgreen="$(printf '\033[0;1;32m')" #set bold, and set green.
|
|
||||||
fi
|
|
||||||
${echo_build_heading colors}
|
${echo_build_heading colors}
|
||||||
${noisily colors verbose}
|
${noisily colors verbose}
|
||||||
|
|
||||||
build_lib() {
|
# configure & source common build functions
|
||||||
lib_src=$1
|
LIB_RUSTC_OPTS="${libRustcOpts}"
|
||||||
echo_build_heading $lib_src ${libName}
|
BIN_RUSTC_OPTS="${binRustcOpts}"
|
||||||
|
LIB_EXT="${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||||
|
LIB_PATH="${libPath}"
|
||||||
|
LIB_NAME="${libName}"
|
||||||
|
source ${./lib.sh}
|
||||||
|
|
||||||
noisily rustc --crate-name $CRATE_NAME $lib_src \
|
CRATE_NAME='${lib.replaceStrings ["-"] ["_"] libName}'
|
||||||
${lib.strings.concatStrings (map (x: " --crate-type ${x}") crateType)} \
|
|
||||||
${rustcOpts} ${rustcMeta} ${crateFeatures} --out-dir target/lib \
|
|
||||||
--emit=dep-info,link -L dependency=target/deps ${deps} --cap-lints allow \
|
|
||||||
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors}
|
|
||||||
|
|
||||||
EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib"
|
setup_link_paths
|
||||||
if [ -e target/deps/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary} ]; then
|
|
||||||
EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
build_bin() {
|
if [[ -e "$LIB_PATH" ]]; then
|
||||||
crate_name=$1
|
build_lib $LIB_PATH
|
||||||
crate_name_=$(echo $crate_name | sed -e "s/-/_/g")
|
|
||||||
main_file=""
|
|
||||||
if [[ ! -z $2 ]]; then
|
|
||||||
main_file=$2
|
|
||||||
fi
|
|
||||||
echo_build_heading $@
|
|
||||||
noisily rustc --crate-name $crate_name_ $main_file --crate-type bin ${rustcOpts}\
|
|
||||||
${crateFeatures} --out-dir target/bin --emit=dep-info,link -L dependency=target/deps \
|
|
||||||
$LINK ${deps}$EXTRA_LIB --cap-lints allow \
|
|
||||||
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors} \
|
|
||||||
${if stdenv.hostPlatform != stdenv.buildPlatform then "--target ${rust.toRustTarget stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc" else ""}
|
|
||||||
if [ "$crate_name_" != "$crate_name" ]; then
|
|
||||||
mv target/bin/$crate_name_ target/bin/$crate_name
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EXTRA_LIB=""
|
|
||||||
CRATE_NAME=$(echo ${libName} | sed -e "s/-/_/g")
|
|
||||||
|
|
||||||
if [[ -e target/link_ ]]; then
|
|
||||||
EXTRA_BUILD="$(cat target/link_) $EXTRA_BUILD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -e "${libPath}" ]]; then
|
|
||||||
build_lib ${libPath}
|
|
||||||
elif [[ -e src/lib.rs ]]; then
|
elif [[ -e src/lib.rs ]]; then
|
||||||
build_lib src/lib.rs
|
build_lib src/lib.rs
|
||||||
elif [[ -e src/${libName}.rs ]]; then
|
elif [[ -e "src/$LIB_NAME.rs" ]]; then
|
||||||
build_lib src/${libName}.rs
|
build_lib src/$LIB_NAME.rs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$EXTRA_LINK_SEARCH" | while read i; do
|
|
||||||
if [[ ! -z "$i" ]]; then
|
|
||||||
for library in $i; do
|
|
||||||
echo "-L $library" >> target/link
|
|
||||||
L=$(echo $library | sed -e "s#$(pwd)/target/build#$lib/lib#")
|
|
||||||
echo "-L $L" >> target/link.final
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "$EXTRA_LINK" | while read i; do
|
|
||||||
if [[ ! -z "$i" ]]; then
|
|
||||||
for library in $i; do
|
|
||||||
echo "-l $library" >> target/link
|
|
||||||
echo "-l $library" >> target/link.final
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -e target/link ]]; then
|
${lib.optionalString (lib.length crateBin > 0) (lib.concatMapStringsSep "\n" (bin: ''
|
||||||
sort -u target/link.final > target/link.final.sorted
|
|
||||||
mv target/link.final.sorted target/link.final
|
|
||||||
sort -u target/link > target/link.sorted
|
|
||||||
mv target/link.sorted target/link
|
|
||||||
|
|
||||||
tr '\n' ' ' < target/link > target/link_
|
|
||||||
LINK=$(cat target/link_)
|
|
||||||
fi
|
|
||||||
${lib.optionalString (crateBin != "") ''
|
|
||||||
printf "%s\n" "${crateBin}" | head -n1 | tr -s ',' '\n' | while read -r BIN_NAME BIN_PATH; do
|
|
||||||
mkdir -p target/bin
|
mkdir -p target/bin
|
||||||
# filter empty entries / empty "lines"
|
BIN_NAME='${bin.name or crateName}'
|
||||||
if [[ -z "$BIN_NAME" ]]; then
|
${if !bin ? path then ''
|
||||||
continue
|
BIN_PATH=""
|
||||||
fi
|
search_for_bin_path "$BIN_NAME"
|
||||||
|
'' else ''
|
||||||
if [[ -z "$BIN_PATH" ]]; then
|
BIN_PATH='${bin.path}'
|
||||||
# heuristic to "guess" the correct source file as found in cargo:
|
|
||||||
# https://github.com/rust-lang/cargo/blob/90fc9f620190d5fa3c80b0c8c65a1e1361e6b8ae/src/cargo/util/toml/targets.rs#L308-L325
|
|
||||||
|
|
||||||
# the first two cases are the "new" default IIRC
|
|
||||||
BIN_NAME_=$(echo $BIN_NAME | sed -e 's/-/_/g')
|
|
||||||
FILES=( "src/bin/$BIN_NAME.rs" "src/bin/$BIN_NAME/main.rs" "src/bin/$BIN_NAME_.rs" "src/bin/$BIN_NAME_/main.rs" "src/bin/main.rs" "src/main.rs" )
|
|
||||||
|
|
||||||
if ! [ -e "${libPath}" -o -e src/lib.rs -o -e "src/${libName}.rs" ]; then
|
|
||||||
# if this is not a library the following path is also valid
|
|
||||||
FILES=( "src/$BIN_NAME.rs" "src/$BIN_NAME_.rs" "''${FILES[@]}" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in "''${FILES[@]}";
|
|
||||||
do
|
|
||||||
echo "checking file $file"
|
|
||||||
# first file that exists wins
|
|
||||||
if [[ -e "$file" ]]; then
|
|
||||||
BIN_PATH="$file"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z "$BIN_PATH" ]]; then
|
|
||||||
echo "failed to find file for binary target: $BIN_NAME" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
build_bin "$BIN_NAME" "$BIN_PATH"
|
|
||||||
done
|
|
||||||
''}
|
''}
|
||||||
|
build_bin "$BIN_NAME" "$BIN_PATH"
|
||||||
|
'') crateBin)}
|
||||||
|
|
||||||
${lib.optionalString (crateBin == "" && !hasCrateBin) ''
|
# If crateBin is empty and hasCrateBin is not set then we must try to
|
||||||
|
# detect some kind of bin target based on some files that might exist.
|
||||||
|
${lib.optionalString (lib.length crateBin == 0 && !hasCrateBin) ''
|
||||||
if [[ -e src/main.rs ]]; then
|
if [[ -e src/main.rs ]]; then
|
||||||
mkdir -p target/bin
|
mkdir -p target/bin
|
||||||
build_bin ${crateName} src/main.rs
|
build_bin ${crateName} src/main.rs
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, echo_build_heading, noisily, makeDeps }:
|
{ lib, stdenv, echo_build_heading, noisily, mkRustcDepArgs }:
|
||||||
{ build
|
{ build
|
||||||
, buildDependencies
|
, buildDependencies
|
||||||
, colors
|
, colors
|
||||||
|
@ -20,12 +20,12 @@
|
||||||
, verbose
|
, verbose
|
||||||
, workspace_member }:
|
, workspace_member }:
|
||||||
let version_ = lib.splitString "-" crateVersion;
|
let version_ = lib.splitString "-" crateVersion;
|
||||||
versionPre = if lib.tail version_ == [] then "" else builtins.elemAt version_ 1;
|
versionPre = if lib.tail version_ == [] then "" else lib.elemAt version_ 1;
|
||||||
version = lib.splitVersion (lib.head version_);
|
version = lib.splitVersion (lib.head version_);
|
||||||
rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
|
rustcOpts = lib.foldl' (opts: opt: opts + " " + opt)
|
||||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||||
buildDeps = makeDeps buildDependencies crateRenames;
|
buildDeps = mkRustcDepArgs buildDependencies crateRenames;
|
||||||
authors = lib.concatStringsSep ":" crateAuthors;
|
authors = lib.concatStringsSep ":" crateAuthors;
|
||||||
optLevel = if release then 3 else 0;
|
optLevel = if release then 3 else 0;
|
||||||
completeDepsDir = lib.concatStringsSep " " completeDeps;
|
completeDepsDir = lib.concatStringsSep " " completeDeps;
|
||||||
|
@ -90,9 +90,9 @@ in ''
|
||||||
export HOST="${stdenv.hostPlatform.config}"
|
export HOST="${stdenv.hostPlatform.config}"
|
||||||
export PROFILE=${if release then "release" else "debug"}
|
export PROFILE=${if release then "release" else "debug"}
|
||||||
export OUT_DIR=$(pwd)/target/build/${crateName}.out
|
export OUT_DIR=$(pwd)/target/build/${crateName}.out
|
||||||
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
|
export CARGO_PKG_VERSION_MAJOR=${lib.elemAt version 0}
|
||||||
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
|
export CARGO_PKG_VERSION_MINOR=${lib.elemAt version 1}
|
||||||
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
|
export CARGO_PKG_VERSION_PATCH=${lib.elemAt version 2}
|
||||||
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
||||||
export CARGO_PKG_HOMEPAGE="${crateHomepage}"
|
export CARGO_PKG_HOMEPAGE="${crateHomepage}"
|
||||||
export NUM_JOBS=1
|
export NUM_JOBS=1
|
||||||
|
|
|
@ -13,56 +13,34 @@ let
|
||||||
then "macos"
|
then "macos"
|
||||||
else stdenv.hostPlatform.parsed.kernel.name;
|
else stdenv.hostPlatform.parsed.kernel.name;
|
||||||
|
|
||||||
makeDeps = dependencies: crateRenames:
|
# Create rustc arguments to link against the given list of dependencies and
|
||||||
(lib.concatMapStringsSep " " (dep:
|
# renames
|
||||||
|
mkRustcDepArgs = dependencies: crateRenames:
|
||||||
|
lib.concatMapStringsSep " " (dep:
|
||||||
let
|
let
|
||||||
extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName;
|
extern = lib.replaceStrings ["-"] ["_"] dep.libName;
|
||||||
name = if builtins.hasAttr dep.crateName crateRenames then
|
name = if lib.hasAttr dep.crateName crateRenames then
|
||||||
lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName}
|
lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName}
|
||||||
else
|
else
|
||||||
extern;
|
extern;
|
||||||
in (if lib.lists.any (x: x == "lib") dep.crateType then
|
in (if lib.any (x: x == "lib") dep.crateType then
|
||||||
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}.rlib"
|
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}.rlib"
|
||||||
else
|
else
|
||||||
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
|
" --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
|
||||||
) dependencies);
|
) dependencies;
|
||||||
|
|
||||||
echo_build_heading = colors: ''
|
inherit (import ./log.nix { inherit lib; }) noisily echo_build_heading;
|
||||||
echo_build_heading() {
|
|
||||||
start=""
|
configureCrate = import ./configure-crate.nix {
|
||||||
end=""
|
inherit lib stdenv echo_build_heading noisily mkRustcDepArgs;
|
||||||
if [[ "${colors}" == "always" ]]; then
|
};
|
||||||
start="$(printf '\033[0;1;32m')" #set bold, and set green.
|
|
||||||
end="$(printf '\033[0m')" #returns to "normal"
|
buildCrate = import ./build-crate.nix {
|
||||||
fi
|
inherit lib stdenv echo_build_heading noisily mkRustcDepArgs rust;
|
||||||
if (( $# == 1 )); then
|
};
|
||||||
echo "$start""Building $1""$end"
|
|
||||||
else
|
|
||||||
echo "$start""Building $1 ($2)""$end"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
noisily = colors: verbose: ''
|
|
||||||
noisily() {
|
|
||||||
start=""
|
|
||||||
end=""
|
|
||||||
if [[ "${colors}" == "always" ]]; then
|
|
||||||
start="$(printf '\033[0;1;32m')" #set bold, and set green.
|
|
||||||
end="$(printf '\033[0m')" #returns to "normal"
|
|
||||||
fi
|
|
||||||
${lib.optionalString verbose ''
|
|
||||||
echo -n "$start"Running "$end"
|
|
||||||
echo $@
|
|
||||||
''}
|
|
||||||
$@
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
configureCrate = import ./configure-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps; };
|
|
||||||
buildCrate = import ./build-crate.nix { inherit lib stdenv echo_build_heading noisily makeDeps rust; };
|
|
||||||
installCrate = import ./install-crate.nix;
|
installCrate = import ./install-crate.nix;
|
||||||
|
in
|
||||||
in
|
|
||||||
|
|
||||||
crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides,
|
crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides,
|
||||||
dependencies, buildDependencies, crateRenames,
|
dependencies, buildDependencies, crateRenames,
|
||||||
|
@ -81,6 +59,15 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr
|
||||||
extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate;
|
extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate;
|
||||||
buildInputs_ = buildInputs;
|
buildInputs_ = buildInputs;
|
||||||
extraRustcOpts_ = extraRustcOpts;
|
extraRustcOpts_ = extraRustcOpts;
|
||||||
|
|
||||||
|
# take a list of crates that we depend on and override them to fit our overrides, rustc, release, …
|
||||||
|
makeDependencies = map (dep: lib.getLib (dep.override { inherit release verbose crateOverrides; }));
|
||||||
|
|
||||||
|
# crate2nix has a hack for the old bash based build script that did split
|
||||||
|
# entries at `,`. No we have to work around that hack.
|
||||||
|
# https://github.com/kolloch/crate2nix/blame/5b19c1b14e1b0e5522c3e44e300d0b332dc939e7/crate2nix/templates/build.nix.tera#L89
|
||||||
|
crateBin = lib.filter (bin: !(bin ? name && bin.name == ",")) (crate.crateBin or []);
|
||||||
|
hasCrateBin = crate ? crateBin;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
|
@ -94,42 +81,28 @@ stdenv.mkDerivation (rec {
|
||||||
name = "rust_${crate.crateName}-${crate.version}";
|
name = "rust_${crate.crateName}-${crate.version}";
|
||||||
depsBuildBuild = [ rust stdenv.cc ];
|
depsBuildBuild = [ rust stdenv.cc ];
|
||||||
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
||||||
dependencies =
|
dependencies = makeDependencies dependencies_;
|
||||||
builtins.map
|
buildDependencies = makeDependencies buildDependencies_;
|
||||||
(dep: lib.getLib (dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; }))
|
|
||||||
dependencies_;
|
|
||||||
|
|
||||||
buildDependencies =
|
completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);
|
||||||
builtins.map
|
completeBuildDeps = lib.unique (
|
||||||
(dep: lib.getLib (dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; }))
|
|
||||||
buildDependencies_;
|
|
||||||
|
|
||||||
completeDeps = lib.lists.unique (dependencies ++ lib.lists.concatMap (dep: dep.completeDeps) dependencies);
|
|
||||||
completeBuildDeps = lib.lists.unique (
|
|
||||||
buildDependencies
|
buildDependencies
|
||||||
++ lib.lists.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies
|
++ lib.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies
|
||||||
);
|
);
|
||||||
|
|
||||||
crateFeatures = if crate ? features then
|
crateFeatures = lib.optionalString (crate ? features)
|
||||||
lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features) #"
|
(lib.concatMapStringsSep " " (f: "--cfg feature=\\\"${f}\\\"") (crate.features ++ features));
|
||||||
else "";
|
|
||||||
|
|
||||||
libName = if crate ? libName then crate.libName else crate.crateName;
|
libName = if crate ? libName then crate.libName else crate.crateName;
|
||||||
libPath = if crate ? libPath then crate.libPath else "";
|
libPath = if crate ? libPath then crate.libPath else "";
|
||||||
|
|
||||||
depsMetadata = builtins.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies);
|
# Seed the symbol hashes with something unique every time.
|
||||||
metadata = builtins.substring 0 10 (builtins.hashString "sha256" (crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata ));
|
# https://doc.rust-lang.org/1.0.0/rustc/metadata/loader/index.html#frobbing-symbols
|
||||||
|
metadata = let
|
||||||
crateBin = if crate ? crateBin then
|
depsMetadata = lib.foldl' (str: dep: str + dep.metadata) "" (dependencies ++ buildDependencies);
|
||||||
builtins.foldl' (bins: bin: let
|
hashedMetadata = builtins.hashString "sha256"
|
||||||
name = (if bin ? name then bin.name else crateName);
|
(crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata);
|
||||||
path = if bin ? path then bin.path else "";
|
in lib.substring 0 10 hashedMetadata;
|
||||||
in
|
|
||||||
bins + (if bin == "" then "" else ",") + "${name} ${path}"
|
|
||||||
|
|
||||||
) "" crate.crateBin
|
|
||||||
else "";
|
|
||||||
hasCrateBin = crate ? crateBin;
|
|
||||||
|
|
||||||
build = crate.build or "";
|
build = crate.build or "";
|
||||||
workspace_member = crate.workspace_member or ".";
|
workspace_member = crate.workspace_member or ".";
|
||||||
|
@ -142,9 +115,12 @@ stdenv.mkDerivation (rec {
|
||||||
if lib.attrByPath ["plugin"] false crate then ["dylib"] else
|
if lib.attrByPath ["plugin"] false crate then ["dylib"] else
|
||||||
(crate.type or ["lib"]);
|
(crate.type or ["lib"]);
|
||||||
colors = lib.attrByPath [ "colors" ] "always" crate;
|
colors = lib.attrByPath [ "colors" ] "always" crate;
|
||||||
extraLinkFlags = builtins.concatStringsSep " " (crate.extraLinkFlags or []);
|
extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or []);
|
||||||
edition = crate.edition or null;
|
edition = crate.edition or null;
|
||||||
extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}");
|
extraRustcOpts =
|
||||||
|
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
|
||||||
|
++ extraRustcOpts_
|
||||||
|
++ (lib.optional (edition != null) "--edition ${edition}");
|
||||||
|
|
||||||
configurePhase = configureCrate {
|
configurePhase = configureCrate {
|
||||||
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
|
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
|
||||||
|
@ -155,7 +131,7 @@ stdenv.mkDerivation (rec {
|
||||||
buildPhase = buildCrate {
|
buildPhase = buildCrate {
|
||||||
inherit crateName dependencies
|
inherit crateName dependencies
|
||||||
crateFeatures crateRenames libName release libPath crateType
|
crateFeatures crateRenames libName release libPath crateType
|
||||||
metadata crateBin hasCrateBin verbose colors
|
metadata hasCrateBin crateBin verbose colors
|
||||||
extraRustcOpts;
|
extraRustcOpts;
|
||||||
};
|
};
|
||||||
installPhase = installCrate crateName metadata;
|
installPhase = installCrate crateName metadata;
|
||||||
|
|
|
@ -3,23 +3,23 @@
|
||||||
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
||||||
abi = stdenv.hostPlatform.parsed.abi.name;
|
abi = stdenv.hostPlatform.parsed.abi.name;
|
||||||
cpu = stdenv.hostPlatform.parsed.cpu.name;
|
cpu = stdenv.hostPlatform.parsed.cpu.name;
|
||||||
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
|
updateFeatures = f: up: functions: lib.deepSeq f (lib.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
|
||||||
mapFeatures = features: map (fun: fun { features = features; });
|
mapFeatures = features: map (fun: fun { features = features; });
|
||||||
mkFeatures = feat: lib.lists.foldl (features: featureName:
|
mkFeatures = feat: lib.foldl (features: featureName:
|
||||||
if feat.${featureName} or false then
|
if feat.${featureName} or false then
|
||||||
[ featureName ] ++ features
|
[ featureName ] ++ features
|
||||||
else
|
else
|
||||||
features
|
features
|
||||||
) [] (builtins.attrNames feat);
|
) [] (lib.attrNames feat);
|
||||||
include = includedFiles: src: builtins.filterSource (path: type:
|
include = includedFiles: src: lib.filterSource (path: type:
|
||||||
lib.lists.any (f:
|
lib.any (f:
|
||||||
let p = toString (src + ("/" + f));
|
let p = toString (src + ("/" + f));
|
||||||
in
|
in
|
||||||
p == path || (lib.strings.hasPrefix (p + "/") path)
|
p == path || (lib.strings.hasPrefix (p + "/") path)
|
||||||
) includedFiles
|
) includedFiles
|
||||||
) src;
|
) src;
|
||||||
exclude = excludedFiles: src: builtins.filterSource (path: type:
|
exclude = excludedFiles: src: lib.filterSource (path: type:
|
||||||
lib.lists.all (f:
|
lib.all (f:
|
||||||
!lib.strings.hasPrefix (toString (src + ("/" + f))) path
|
!lib.strings.hasPrefix (toString (src + ("/" + f))) path
|
||||||
) excludedFiles
|
) excludedFiles
|
||||||
) src;
|
) src;
|
||||||
|
|
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 }:
|
{ lib, fetchFromGitHub }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "3.3.92";
|
version = "4.7.95";
|
||||||
in fetchFromGitHub {
|
in fetchFromGitHub {
|
||||||
name = "material-design-icons-${version}";
|
name = "material-design-icons-${version}";
|
||||||
owner = "Templarian";
|
owner = "Templarian";
|
||||||
|
@ -10,14 +10,13 @@ in fetchFromGitHub {
|
||||||
|
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
tar xf $downloadedFile --strip=1
|
tar xf $downloadedFile --strip=1
|
||||||
mkdir -p $out/share/fonts/{eot,svg,truetype,woff,woff2}
|
mkdir -p $out/share/fonts/{eot,truetype,woff,woff2}
|
||||||
cp fonts/*.eot $out/share/fonts/eot/
|
cp fonts/*.eot $out/share/fonts/eot/
|
||||||
cp fonts/*.svg $out/share/fonts/svg/
|
|
||||||
cp fonts/*.ttf $out/share/fonts/truetype/
|
cp fonts/*.ttf $out/share/fonts/truetype/
|
||||||
cp fonts/*.woff $out/share/fonts/woff/
|
cp fonts/*.woff $out/share/fonts/woff/
|
||||||
cp fonts/*.woff2 $out/share/fonts/woff2/
|
cp fonts/*.woff2 $out/share/fonts/woff2/
|
||||||
'';
|
'';
|
||||||
sha256 = "0dbm4qfd0b91yrw3cv4i377pnm98fgj936nk1m5wlx8mx8jahz48";
|
sha256 = "0da92kz8ryy60kb5xm52md13w28ih4sfap8g3v9b4ziyww66zjhz";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "3200+ Material Design Icons from the Community";
|
description = "3200+ Material Design Icons from the Community";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "victor-mono";
|
pname = "victor-mono";
|
||||||
version = "1.2.7";
|
version = "1.3.0";
|
||||||
in fetchFromGitHub rec {
|
in fetchFromGitHub rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ in fetchFromGitHub rec {
|
||||||
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
|
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sha256 = "0x4ydp11ry94wkkspnmy1xpzqq3m45xg60z1hq4ll9gmlccaknj0";
|
sha256 = "1lv2x7kfspabnhvm8z79n165fw3awvzj1r8f0g5zn26wgdalgw69";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Free programming font with cursive italics and ligatures";
|
description = "Free programming font with cursive italics and ligatures";
|
||||||
|
|
|
@ -1,22 +1,26 @@
|
||||||
{ stdenv, fetchurl, ncurses5, python27 }:
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, ncurses5
|
||||||
|
, python27
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gcc-arm-embedded";
|
pname = "gcc-arm-embedded";
|
||||||
version = "6-2017-q2-update";
|
version = "6-2017-q2-update";
|
||||||
subdir = "6-2017q2";
|
subdir = "6-2017q2";
|
||||||
|
|
||||||
src =
|
suffix = {
|
||||||
if stdenv.isLinux then
|
x86_64-darwin = "mac";
|
||||||
fetchurl {
|
x86_64-linux = "linux";
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
sha256="1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
|
|
||||||
}
|
src = fetchurl {
|
||||||
else if stdenv.isDarwin then
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||||
fetchurl {
|
sha256 = {
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
x86_64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
|
||||||
sha256="0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
|
x86_64-linux = "1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
|
||||||
}
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
else throw "unsupported platform";
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
@ -37,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||||
license = with stdenv.lib.licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||||
maintainers = with stdenv.lib.maintainers; [ vinymeuh ];
|
maintainers = with maintainers; [ prusnak ];
|
||||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
{ stdenv, lib, fetchurl, ncurses5, python27 }:
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
with lib;
|
, ncurses5
|
||||||
|
, python27
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gcc-arm-embedded";
|
pname = "gcc-arm-embedded";
|
||||||
version = "7-2018-q2-update";
|
version = "7-2018-q2-update";
|
||||||
subdir = "7-2018q2";
|
subdir = "7-2018q2";
|
||||||
|
|
||||||
src =
|
suffix = {
|
||||||
if stdenv.isLinux then
|
x86_64-darwin = "mac";
|
||||||
fetchurl {
|
x86_64-linux = "linux";
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
sha256="0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
|
|
||||||
}
|
src = fetchurl {
|
||||||
else if stdenv.isDarwin then
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||||
fetchurl {
|
sha256 = {
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
x86_64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
|
||||||
sha256="0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
|
x86_64-linux = "0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
|
||||||
}
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
else throw "unsupported platform";
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
@ -39,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||||
maintainers = with maintainers; [ prusnak ];
|
maintainers = with maintainers; [ prusnak ];
|
||||||
platforms = platforms.linux;
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
{ stdenv, lib, fetchurl, ncurses5, python27 }:
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
with lib;
|
, ncurses5
|
||||||
|
, python27
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gcc-arm-embedded";
|
pname = "gcc-arm-embedded";
|
||||||
version = "8-2019-q3-update";
|
version = "8-2019-q3-update";
|
||||||
subdir = "8-2019q3/RC1.1";
|
subdir = "8-2019q3/RC1.1";
|
||||||
|
|
||||||
src =
|
suffix = {
|
||||||
if stdenv.isLinux then
|
x86_64-darwin = "mac";
|
||||||
fetchurl {
|
x86_64-linux = "linux";
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
sha256="b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
|
|
||||||
}
|
src = fetchurl {
|
||||||
else if stdenv.isDarwin then
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||||
fetchurl {
|
sha256 = {
|
||||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
x86_64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
|
||||||
sha256="fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
|
x86_64-linux = "b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
|
||||||
}
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
else throw "unsupported platform";
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
@ -39,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||||
maintainers = with maintainers; [ prusnak ];
|
maintainers = with maintainers; [ prusnak ];
|
||||||
platforms = platforms.linux;
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
53
pkgs/development/compilers/gcc-arm-embedded/9/default.nix
Normal file
53
pkgs/development/compilers/gcc-arm-embedded/9/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, ncurses5
|
||||||
|
, python27
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gcc-arm-embedded";
|
||||||
|
version = "9-2019-q4-major";
|
||||||
|
subdir = "9-2019q4/RC2.1";
|
||||||
|
|
||||||
|
suffix = {
|
||||||
|
aarch64-linux = "aarch64-linux";
|
||||||
|
x86_64-darwin = "mac";
|
||||||
|
x86_64-linux = "x86_64-linux";
|
||||||
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||||
|
sha256 = {
|
||||||
|
aarch64-linux = "1f5b9309006737950b2218250e6bb392e2d68d4f1a764fe66be96e2a78888d83";
|
||||||
|
x86_64-darwin = "1249f860d4155d9c3ba8f30c19e7a88c5047923cea17e0d08e633f12408f01f0";
|
||||||
|
x86_64-linux = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a";
|
||||||
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r * $out
|
||||||
|
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontPatchELF = true;
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
find $out -type f | while read f; do
|
||||||
|
patchelf $f > /dev/null 2>&1 || continue
|
||||||
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||||
|
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||||
|
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||||
|
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||||
|
maintainers = with maintainers; [ prusnak ];
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,52 +0,0 @@
|
||||||
{ stdenv, bzip2, patchelf, glibc, gcc, fetchurl, version, releaseType, sha256, ncurses
|
|
||||||
, dirName ? null, subdirName ? null }:
|
|
||||||
with stdenv.lib;
|
|
||||||
let
|
|
||||||
versionParts = splitString "-" version; # 4.7 2013q3 20130916
|
|
||||||
majorVersion = elemAt versionParts 0; # 4.7
|
|
||||||
yearQuarter = elemAt versionParts 1; # 2013q3
|
|
||||||
underscoreVersion = replaceChars ["."] ["_"] version; # 4_7-2013q3-20130916
|
|
||||||
yearQuarterParts = splitString "q" yearQuarter; # 2013 3
|
|
||||||
year = elemAt yearQuarterParts 0; # 2013
|
|
||||||
quarter = elemAt yearQuarterParts 1; # 3
|
|
||||||
dirName_ = if dirName != null then dirName else majorVersion;
|
|
||||||
subdirName_ = if subdirName != null then subdirName
|
|
||||||
else "${majorVersion}-${year}-q${quarter}-${releaseType}"; # 4.7-2013-q3-update
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "gcc-arm-embedded";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://launchpad.net/gcc-arm-embedded/${dirName_}/${subdirName_}/+download/gcc-arm-none-eabi-${underscoreVersion}-linux.tar.bz2";
|
|
||||||
sha256 = sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ bzip2 patchelf ];
|
|
||||||
|
|
||||||
dontPatchELF = true;
|
|
||||||
|
|
||||||
phases = "unpackPhase patchPhase installPhase";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -pv $out
|
|
||||||
cp -r ./* $out
|
|
||||||
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
|
|
||||||
|
|
||||||
for f in $(find $out); do
|
|
||||||
if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
|
|
||||||
patchelf --set-interpreter ${getLib glibc}/lib/ld-linux.so.2 \
|
|
||||||
--set-rpath ${stdenv.lib.makeLibraryPath [ "$out" gcc ncurses ]} \
|
|
||||||
"$f" || true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4, Cortex-R4/R5/R7)";
|
|
||||||
homepage = https://launchpad.net/gcc-arm-embedded;
|
|
||||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
|
||||||
maintainers = [ maintainers.rasendubi ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
|
, pkgsHostHost
|
||||||
, callPackage
|
, callPackage
|
||||||
, fetchgit
|
, fetchgit
|
||||||
, ghcjsSrcJson ? null
|
, ghcjsSrcJson ? null
|
||||||
|
@ -14,7 +15,6 @@
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, gcc
|
, gcc
|
||||||
, lib
|
, lib
|
||||||
, nodePackages
|
|
||||||
, ghcjsDepOverrides ? (_:_:{})
|
, ghcjsDepOverrides ? (_:_:{})
|
||||||
, haskell
|
, haskell
|
||||||
}:
|
}:
|
||||||
|
@ -46,7 +46,7 @@ let
|
||||||
|
|
||||||
enableShared = true;
|
enableShared = true;
|
||||||
|
|
||||||
socket-io = nodePackages."socket.io";
|
socket-io = pkgsHostHost.nodePackages."socket.io";
|
||||||
|
|
||||||
# Relics of the old GHCJS build system
|
# Relics of the old GHCJS build system
|
||||||
stage1Packages = [];
|
stage1Packages = [];
|
||||||
|
|
|
@ -40,7 +40,7 @@ in
|
||||||
# They must be propagated to the environment of any executable linking with the library
|
# They must be propagated to the environment of any executable linking with the library
|
||||||
, libraryFrameworkDepends ? [], executableFrameworkDepends ? []
|
, libraryFrameworkDepends ? [], executableFrameworkDepends ? []
|
||||||
, homepage ? "https://hackage.haskell.org/package/${pname}"
|
, homepage ? "https://hackage.haskell.org/package/${pname}"
|
||||||
, platforms ? with stdenv.lib.platforms; unix ++ windows # GHC can cross-compile
|
, platforms ? with stdenv.lib.platforms; all # GHC can cross-compile
|
||||||
, hydraPlatforms ? null
|
, hydraPlatforms ? null
|
||||||
, hyperlinkSource ? true
|
, hyperlinkSource ? true
|
||||||
, isExecutable ? false, isLibrary ? !isExecutable
|
, isExecutable ? false, isLibrary ? !isExecutable
|
||||||
|
@ -131,9 +131,13 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossCabalFlags = [
|
crossCabalFlags = [
|
||||||
"--with-ghc=${ghc.targetPrefix}ghc"
|
"--with-ghc=${ghcCommand}"
|
||||||
"--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
|
"--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
|
||||||
"--with-gcc=${stdenv.cc.targetPrefix}cc"
|
# Pass the "wrong" C compiler rather than none at all so packages that just
|
||||||
|
# use the C preproccessor still work, see
|
||||||
|
# https://github.com/haskell/cabal/issues/6466 for details.
|
||||||
|
"--with-gcc=${(if stdenv.hasCC then stdenv else buildPackages.stdenv).cc.targetPrefix}cc"
|
||||||
|
] ++ optionals stdenv.hasCC [
|
||||||
"--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
|
"--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
|
||||||
"--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
|
"--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
|
||||||
# use the one that comes with the cross compiler.
|
# use the one that comes with the cross compiler.
|
||||||
|
@ -156,7 +160,9 @@ let
|
||||||
"--libsubdir=\\$abi/\\$libname"
|
"--libsubdir=\\$abi/\\$libname"
|
||||||
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
|
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
|
||||||
(optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}")
|
(optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}")
|
||||||
|
] ++ optionals stdenv.hasCC [
|
||||||
"--with-gcc=$CC" # Clang won't work without that extra information.
|
"--with-gcc=$CC" # Clang won't work without that extra information.
|
||||||
|
] ++ [
|
||||||
"--package-db=$packageConfDir"
|
"--package-db=$packageConfDir"
|
||||||
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}")
|
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}")
|
||||||
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
|
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
# This will build mmorph and monadControl, and have the hoogle installation
|
# This will build mmorph and monadControl, and have the hoogle installation
|
||||||
# refer to their documentation via symlink so they are not garbage collected.
|
# refer to their documentation via symlink so they are not garbage collected.
|
||||||
|
|
||||||
{ lib, stdenv, hoogle, writeText, ghc
|
{ lib, stdenv, buildPackages
|
||||||
|
, hoogle, writeText, ghc
|
||||||
, packages
|
, packages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ let
|
||||||
(map (lib.getOutput "doc") packages);
|
(map (lib.getOutput "doc") packages);
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
buildPackages.stdenv.mkDerivation {
|
||||||
name = "hoogle-local-0.1";
|
name = "hoogle-local-0.1";
|
||||||
buildInputs = [ghc hoogle];
|
buildInputs = [ghc hoogle];
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "evcxr";
|
pname = "evcxr";
|
||||||
version = "0.4.5";
|
version = "0.4.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "google";
|
owner = "google";
|
||||||
repo = "evcxr";
|
repo = "evcxr";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "13fs9fgvdf8bh6vc8xs8qhil0a1qhm4gvv0ici37xh8a94ngsn7h";
|
sha256 = "1yzvqf93zz3ncck4dyq2kayp408lm3h6fx0fb212j7h70mlzx984";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "0g17g12isah4nkqp9i299qr1sz19k4czcc43rm1wbs0y9szaqvwc";
|
cargoSha256 = "0g17g12isah4nkqp9i299qr1sz19k4czcc43rm1wbs0y9szaqvwc";
|
||||||
|
|
|
@ -146,7 +146,7 @@ let
|
||||||
substituteInPlace "$out"/lib/perl5/*/*/Config_heavy.pl \
|
substituteInPlace "$out"/lib/perl5/*/*/Config_heavy.pl \
|
||||||
--replace "${libcInc}" /no-such-path \
|
--replace "${libcInc}" /no-such-path \
|
||||||
--replace "${
|
--replace "${
|
||||||
if stdenv.cc.cc or null != null then stdenv.cc.cc else "/no-such-path"
|
if stdenv.hasCC then stdenv.cc.cc else "/no-such-path"
|
||||||
}" /no-such-path \
|
}" /no-such-path \
|
||||||
--replace "${stdenv.cc}" /no-such-path \
|
--replace "${stdenv.cc}" /no-such-path \
|
||||||
--replace "$man" /no-such-path
|
--replace "$man" /no-such-path
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "quickjs";
|
pname = "quickjs";
|
||||||
version = "2019-10-27";
|
version = "2019-12-21";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz";
|
url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0xm16ja3c0k80jy0xkx0f40r44v2lgx2si4dnaw2w7c5nx7cmkai";
|
sha256 = "13hlx6qwrrxmlvvqcr3irxba6zmf05cf54l32vj50wc66s1qd41p";
|
||||||
};
|
};
|
||||||
|
|
||||||
makeFlags = [ "prefix=${placeholder ''out''}" ];
|
makeFlags = [ "prefix=${placeholder ''out''}" ];
|
||||||
|
|
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; \
|
|
@ -39,6 +39,7 @@ in stdenv.mkDerivation (rec {
|
||||||
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
|
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
|
||||||
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
|
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||||
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
|
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
|
||||||
|
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabi.h
|
||||||
'' + lib.optionalString (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isMusl) ''
|
'' + lib.optionalString (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isMusl) ''
|
||||||
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
|
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
|
||||||
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isMusl) ''
|
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isMusl) ''
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, systemd }:
|
, systemd }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "2018-11-13";
|
version = "2019-12-08";
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "openzwave";
|
pname = "openzwave";
|
||||||
|
@ -14,8 +14,8 @@ in stdenv.mkDerivation {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "home-assistant";
|
owner = "home-assistant";
|
||||||
repo = "open-zwave";
|
repo = "open-zwave";
|
||||||
rev = "0679daef6aa5a39e2441a68f7b45cfe022c4d961";
|
rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
|
||||||
sha256 = "1d13maj93i6h792cbvqpx43ffss44dxmvbwj2777vzvvjib8m4n8";
|
sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ];
|
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ];
|
||||||
|
|
|
@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
|
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
|
||||||
"-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
|
"-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
|
||||||
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
|
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
|
||||||
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_LDFLAGS = "-ldl";
|
NIX_LDFLAGS = "-ldl";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib }:
|
{ stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib, tbb }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
|
@ -12,7 +12,11 @@ stdenv.mkDerivation rec {
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
cmakeFlags = [ "-DWITH_VTK=ON" "-DBUILD_ALL_MODULES=ON" ];
|
cmakeFlags = [
|
||||||
|
"-DWITH_VTK=ON"
|
||||||
|
"-DBUILD_ALL_MODULES=ON"
|
||||||
|
"-DWITH_TBB=ON"
|
||||||
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
@ -30,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake gtest ];
|
nativeBuildInputs = [ cmake gtest ];
|
||||||
buildInputs = [ boost eigen python vtk zlib ];
|
buildInputs = [ boost eigen python vtk zlib tbb ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/BioMedIA/MIRTK";
|
homepage = "https://github.com/BioMedIA/MIRTK";
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
{ stdenv, fetchFromGitHub, python, cunit, dpdk, libaio, libuuid, numactl, openssl }:
|
{ stdenv, fetchFromGitHub, python, cunit, dpdk, libaio, libbsd, libuuid, numactl, openssl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "spdk";
|
pname = "spdk";
|
||||||
version = "19.04";
|
version = "19.10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "spdk";
|
owner = "spdk";
|
||||||
repo = "spdk";
|
repo = "spdk";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "10mzal1hspnh26ws5d7sc54gyjfzkf6amr0gkd7b368ng2a9z8s6";
|
sha256 = "16v2vswn3rnnj7ak5w5rsak6r8f9b85gyhyll4ac1k4xpyj488hj";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./spdk-dpdk-meson.patch ];
|
||||||
|
|
||||||
nativeBuildInputs = [ python ];
|
nativeBuildInputs = [ python ];
|
||||||
|
|
||||||
buildInputs = [ cunit dpdk libaio libuuid numactl openssl ];
|
buildInputs = [ cunit dpdk libaio libbsd libuuid numactl openssl ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
|
17
pkgs/development/libraries/spdk/spdk-dpdk-meson.patch
Normal file
17
pkgs/development/libraries/spdk/spdk-dpdk-meson.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
1. dpdk built with meson generates rte_build_config.h rather than rte_config.h.
|
||||||
|
2. dpdk configured with libbsd requires that dependents link with libbsd.
|
||||||
|
|
||||||
|
--- a/lib/env_dpdk/env.mk
|
||||||
|
+++ b/lib/env_dpdk/env.mk
|
||||||
|
@@ -140,6 +140,9 @@ endif
|
||||||
|
|
||||||
|
-ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h))
|
||||||
|
-ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_config.h))
|
||||||
|
+ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_build_config.h))
|
||||||
|
+ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_build_config.h))
|
||||||
|
ENV_LINKER_ARGS += -lnuma
|
||||||
|
endif
|
||||||
|
+ifneq (,$(shell grep -e "define RTE_USE_LIBBSD 1" $(DPDK_INC_DIR)/rte_build_config.h))
|
||||||
|
+ENV_LINKER_ARGS += -lbsd
|
||||||
|
+endif
|
||||||
|
endif
|
|
@ -31,6 +31,10 @@ nodePackages // {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bitwarden-cli = pkgs.lib.overrideDerivation nodePackages."@bitwarden/cli" (drv: {
|
||||||
|
name = "bitwarden-cli-${drv.version}";
|
||||||
|
});
|
||||||
|
|
||||||
ios-deploy = nodePackages.ios-deploy.override (drv: {
|
ios-deploy = nodePackages.ios-deploy.override (drv: {
|
||||||
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.buildPackages.rsync ];
|
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.buildPackages.rsync ];
|
||||||
preRebuild = ''
|
preRebuild = ''
|
||||||
|
@ -95,10 +99,6 @@ nodePackages // {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
texlab-citeproc-build-deps = nodePackages."texlab-citeproc-build-deps-../tools/misc/texlab/citeproc".override {
|
|
||||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.CoreServices ];
|
|
||||||
};
|
|
||||||
|
|
||||||
webtorrent-cli = nodePackages.webtorrent-cli.override {
|
webtorrent-cli = nodePackages.webtorrent-cli.override {
|
||||||
buildInputs = [ nodePackages.node-gyp-build ];
|
buildInputs = [ nodePackages.node-gyp-build ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"@angular/cli"
|
"@angular/cli"
|
||||||
, "@antora/cli"
|
, "@antora/cli"
|
||||||
, "@antora/site-generator-default"
|
, "@antora/site-generator-default"
|
||||||
|
, "@bitwarden/cli"
|
||||||
, "@vue/cli"
|
, "@vue/cli"
|
||||||
, "@webassemblyjs/cli"
|
, "@webassemblyjs/cli"
|
||||||
, "@webassemblyjs/repl"
|
, "@webassemblyjs/repl"
|
||||||
|
@ -125,7 +126,6 @@
|
||||||
, "swagger"
|
, "swagger"
|
||||||
, {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"}
|
, {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"}
|
||||||
, "tern"
|
, "tern"
|
||||||
, { "texlab-citeproc-build-deps": "../tools/misc/texlab/citeproc" }
|
|
||||||
, "textlint"
|
, "textlint"
|
||||||
, "textlint-plugin-latex"
|
, "textlint-plugin-latex"
|
||||||
, "textlint-rule-abbr-within-parentheses"
|
, "textlint-rule-abbr-within-parentheses"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -157,13 +157,13 @@ let
|
||||||
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"aws4-1.8.0" = {
|
"aws4-1.9.0" = {
|
||||||
name = "aws4";
|
name = "aws4";
|
||||||
packageName = "aws4";
|
packageName = "aws4";
|
||||||
version = "1.8.0";
|
version = "1.9.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz";
|
url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
|
||||||
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==";
|
sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"balanced-match-1.0.0" = {
|
"balanced-match-1.0.0" = {
|
||||||
|
@ -526,13 +526,13 @@ let
|
||||||
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"fast-json-stable-stringify-2.0.0" = {
|
"fast-json-stable-stringify-2.1.0" = {
|
||||||
name = "fast-json-stable-stringify";
|
name = "fast-json-stable-stringify";
|
||||||
packageName = "fast-json-stable-stringify";
|
packageName = "fast-json-stable-stringify";
|
||||||
version = "2.0.0";
|
version = "2.1.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz";
|
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
|
||||||
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2";
|
sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"fill-range-4.0.0" = {
|
"fill-range-4.0.0" = {
|
||||||
|
@ -1219,22 +1219,22 @@ let
|
||||||
sha512 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==";
|
sha512 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"mime-db-1.40.0" = {
|
"mime-db-1.42.0" = {
|
||||||
name = "mime-db";
|
name = "mime-db";
|
||||||
packageName = "mime-db";
|
packageName = "mime-db";
|
||||||
version = "1.40.0";
|
version = "1.42.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz";
|
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
|
||||||
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==";
|
sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"mime-types-2.1.24" = {
|
"mime-types-2.1.25" = {
|
||||||
name = "mime-types";
|
name = "mime-types";
|
||||||
packageName = "mime-types";
|
packageName = "mime-types";
|
||||||
version = "2.1.24";
|
version = "2.1.25";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz";
|
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
|
||||||
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==";
|
sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"minimatch-3.0.4" = {
|
"minimatch-3.0.4" = {
|
||||||
|
@ -1624,13 +1624,13 @@ let
|
||||||
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"psl-1.4.0" = {
|
"psl-1.6.0" = {
|
||||||
name = "psl";
|
name = "psl";
|
||||||
packageName = "psl";
|
packageName = "psl";
|
||||||
version = "1.4.0";
|
version = "1.6.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz";
|
url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
|
||||||
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==";
|
sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"punycode-1.4.1" = {
|
"punycode-1.4.1" = {
|
||||||
|
@ -1714,13 +1714,13 @@ let
|
||||||
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"resolve-1.12.0" = {
|
"resolve-1.14.1" = {
|
||||||
name = "resolve";
|
name = "resolve";
|
||||||
packageName = "resolve";
|
packageName = "resolve";
|
||||||
version = "1.12.0";
|
version = "1.14.1";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz";
|
url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
|
||||||
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==";
|
sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"resolve-dir-1.0.1" = {
|
"resolve-dir-1.0.1" = {
|
||||||
|
@ -2497,7 +2497,7 @@ in
|
||||||
sources."regex-not-1.0.2"
|
sources."regex-not-1.0.2"
|
||||||
sources."repeat-element-1.1.3"
|
sources."repeat-element-1.1.3"
|
||||||
sources."repeat-string-1.6.1"
|
sources."repeat-string-1.6.1"
|
||||||
sources."resolve-1.12.0"
|
sources."resolve-1.14.1"
|
||||||
sources."resolve-dir-1.0.1"
|
sources."resolve-dir-1.0.1"
|
||||||
sources."resolve-url-0.2.1"
|
sources."resolve-url-0.2.1"
|
||||||
sources."ret-0.1.15"
|
sources."ret-0.1.15"
|
||||||
|
@ -2608,7 +2608,7 @@ in
|
||||||
sources."assert-plus-1.0.0"
|
sources."assert-plus-1.0.0"
|
||||||
sources."asynckit-0.4.0"
|
sources."asynckit-0.4.0"
|
||||||
sources."aws-sign2-0.7.0"
|
sources."aws-sign2-0.7.0"
|
||||||
sources."aws4-1.8.0"
|
sources."aws4-1.9.0"
|
||||||
sources."balanced-match-1.0.0"
|
sources."balanced-match-1.0.0"
|
||||||
sources."base64-js-1.3.1"
|
sources."base64-js-1.3.1"
|
||||||
sources."bcrypt-pbkdf-1.0.2"
|
sources."bcrypt-pbkdf-1.0.2"
|
||||||
|
@ -2631,7 +2631,7 @@ in
|
||||||
sources."extend-3.0.2"
|
sources."extend-3.0.2"
|
||||||
sources."extsprintf-1.3.0"
|
sources."extsprintf-1.3.0"
|
||||||
sources."fast-deep-equal-2.0.1"
|
sources."fast-deep-equal-2.0.1"
|
||||||
sources."fast-json-stable-stringify-2.0.0"
|
sources."fast-json-stable-stringify-2.1.0"
|
||||||
sources."findit-2.0.0"
|
sources."findit-2.0.0"
|
||||||
sources."foreachasync-3.0.0"
|
sources."foreachasync-3.0.0"
|
||||||
sources."forever-agent-0.6.1"
|
sources."forever-agent-0.6.1"
|
||||||
|
@ -2671,8 +2671,8 @@ in
|
||||||
sources."json-stringify-safe-5.0.1"
|
sources."json-stringify-safe-5.0.1"
|
||||||
sources."jsonfile-1.0.1"
|
sources."jsonfile-1.0.1"
|
||||||
sources."jsprim-1.4.1"
|
sources."jsprim-1.4.1"
|
||||||
sources."mime-db-1.40.0"
|
sources."mime-db-1.42.0"
|
||||||
sources."mime-types-2.1.24"
|
sources."mime-types-2.1.25"
|
||||||
sources."minimatch-3.0.4"
|
sources."minimatch-3.0.4"
|
||||||
sources."minimist-0.0.8"
|
sources."minimist-0.0.8"
|
||||||
sources."minipass-2.9.0"
|
sources."minipass-2.9.0"
|
||||||
|
@ -2716,7 +2716,7 @@ in
|
||||||
sources."performance-now-2.1.0"
|
sources."performance-now-2.1.0"
|
||||||
sources."process-nextick-args-2.0.1"
|
sources."process-nextick-args-2.0.1"
|
||||||
sources."proto-list-1.2.4"
|
sources."proto-list-1.2.4"
|
||||||
sources."psl-1.4.0"
|
sources."psl-1.6.0"
|
||||||
sources."punycode-2.1.1"
|
sources."punycode-2.1.1"
|
||||||
sources."qs-6.5.2"
|
sources."qs-6.5.2"
|
||||||
(sources."readable-stream-2.3.6" // {
|
(sources."readable-stream-2.3.6" // {
|
||||||
|
@ -2725,7 +2725,7 @@ in
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
sources."request-2.88.0"
|
sources."request-2.88.0"
|
||||||
sources."resolve-1.12.0"
|
sources."resolve-1.14.1"
|
||||||
sources."retry-0.10.1"
|
sources."retry-0.10.1"
|
||||||
sources."rimraf-2.6.3"
|
sources."rimraf-2.6.3"
|
||||||
sources."safe-buffer-5.2.0"
|
sources."safe-buffer-5.2.0"
|
||||||
|
|
|
@ -85,13 +85,13 @@ let
|
||||||
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"aws4-1.8.0" = {
|
"aws4-1.9.0" = {
|
||||||
name = "aws4";
|
name = "aws4";
|
||||||
packageName = "aws4";
|
packageName = "aws4";
|
||||||
version = "1.8.0";
|
version = "1.9.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz";
|
url = "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz";
|
||||||
sha512 = "ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==";
|
sha512 = "Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"balanced-match-1.0.0" = {
|
"balanced-match-1.0.0" = {
|
||||||
|
@ -292,13 +292,13 @@ let
|
||||||
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"fast-json-stable-stringify-2.0.0" = {
|
"fast-json-stable-stringify-2.1.0" = {
|
||||||
name = "fast-json-stable-stringify";
|
name = "fast-json-stable-stringify";
|
||||||
packageName = "fast-json-stable-stringify";
|
packageName = "fast-json-stable-stringify";
|
||||||
version = "2.0.0";
|
version = "2.1.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz";
|
url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
|
||||||
sha1 = "d5142c0caee6b1189f87d3a76111064f86c8bbf2";
|
sha512 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"findit-2.0.0" = {
|
"findit-2.0.0" = {
|
||||||
|
@ -571,22 +571,22 @@ let
|
||||||
sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2";
|
sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"mime-db-1.40.0" = {
|
"mime-db-1.42.0" = {
|
||||||
name = "mime-db";
|
name = "mime-db";
|
||||||
packageName = "mime-db";
|
packageName = "mime-db";
|
||||||
version = "1.40.0";
|
version = "1.42.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz";
|
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz";
|
||||||
sha512 = "jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==";
|
sha512 = "UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"mime-types-2.1.24" = {
|
"mime-types-2.1.25" = {
|
||||||
name = "mime-types";
|
name = "mime-types";
|
||||||
packageName = "mime-types";
|
packageName = "mime-types";
|
||||||
version = "2.1.24";
|
version = "2.1.25";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz";
|
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz";
|
||||||
sha512 = "WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==";
|
sha512 = "5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"minimatch-3.0.4" = {
|
"minimatch-3.0.4" = {
|
||||||
|
@ -841,13 +841,13 @@ let
|
||||||
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"psl-1.4.0" = {
|
"psl-1.6.0" = {
|
||||||
name = "psl";
|
name = "psl";
|
||||||
packageName = "psl";
|
packageName = "psl";
|
||||||
version = "1.4.0";
|
version = "1.6.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz";
|
url = "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz";
|
||||||
sha512 = "HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==";
|
sha512 = "SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"punycode-1.4.1" = {
|
"punycode-1.4.1" = {
|
||||||
|
@ -895,13 +895,13 @@ let
|
||||||
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"resolve-1.12.0" = {
|
"resolve-1.14.1" = {
|
||||||
name = "resolve";
|
name = "resolve";
|
||||||
packageName = "resolve";
|
packageName = "resolve";
|
||||||
version = "1.12.0";
|
version = "1.14.1";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz";
|
url = "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz";
|
||||||
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==";
|
sha512 = "fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"retry-0.10.1" = {
|
"retry-0.10.1" = {
|
||||||
|
@ -1276,7 +1276,7 @@ in
|
||||||
sources."assert-plus-1.0.0"
|
sources."assert-plus-1.0.0"
|
||||||
sources."asynckit-0.4.0"
|
sources."asynckit-0.4.0"
|
||||||
sources."aws-sign2-0.7.0"
|
sources."aws-sign2-0.7.0"
|
||||||
sources."aws4-1.8.0"
|
sources."aws4-1.9.0"
|
||||||
sources."balanced-match-1.0.0"
|
sources."balanced-match-1.0.0"
|
||||||
sources."base64-js-1.3.1"
|
sources."base64-js-1.3.1"
|
||||||
sources."bcrypt-pbkdf-1.0.2"
|
sources."bcrypt-pbkdf-1.0.2"
|
||||||
|
@ -1299,7 +1299,7 @@ in
|
||||||
sources."extend-3.0.2"
|
sources."extend-3.0.2"
|
||||||
sources."extsprintf-1.3.0"
|
sources."extsprintf-1.3.0"
|
||||||
sources."fast-deep-equal-2.0.1"
|
sources."fast-deep-equal-2.0.1"
|
||||||
sources."fast-json-stable-stringify-2.0.0"
|
sources."fast-json-stable-stringify-2.1.0"
|
||||||
sources."findit-2.0.0"
|
sources."findit-2.0.0"
|
||||||
sources."foreachasync-3.0.0"
|
sources."foreachasync-3.0.0"
|
||||||
sources."forever-agent-0.6.1"
|
sources."forever-agent-0.6.1"
|
||||||
|
@ -1339,8 +1339,8 @@ in
|
||||||
sources."json-stringify-safe-5.0.1"
|
sources."json-stringify-safe-5.0.1"
|
||||||
sources."jsonfile-1.0.1"
|
sources."jsonfile-1.0.1"
|
||||||
sources."jsprim-1.4.1"
|
sources."jsprim-1.4.1"
|
||||||
sources."mime-db-1.40.0"
|
sources."mime-db-1.42.0"
|
||||||
sources."mime-types-2.1.24"
|
sources."mime-types-2.1.25"
|
||||||
sources."minimatch-3.0.4"
|
sources."minimatch-3.0.4"
|
||||||
sources."minimist-0.0.8"
|
sources."minimist-0.0.8"
|
||||||
sources."minipass-2.9.0"
|
sources."minipass-2.9.0"
|
||||||
|
@ -1384,7 +1384,7 @@ in
|
||||||
sources."performance-now-2.1.0"
|
sources."performance-now-2.1.0"
|
||||||
sources."process-nextick-args-2.0.1"
|
sources."process-nextick-args-2.0.1"
|
||||||
sources."proto-list-1.2.4"
|
sources."proto-list-1.2.4"
|
||||||
sources."psl-1.4.0"
|
sources."psl-1.6.0"
|
||||||
sources."punycode-2.1.1"
|
sources."punycode-2.1.1"
|
||||||
sources."qs-6.5.2"
|
sources."qs-6.5.2"
|
||||||
(sources."readable-stream-2.3.6" // {
|
(sources."readable-stream-2.3.6" // {
|
||||||
|
@ -1393,7 +1393,7 @@ in
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
sources."request-2.88.0"
|
sources."request-2.88.0"
|
||||||
sources."resolve-1.12.0"
|
sources."resolve-1.14.1"
|
||||||
sources."retry-0.10.1"
|
sources."retry-0.10.1"
|
||||||
sources."rimraf-2.6.3"
|
sources."rimraf-2.6.3"
|
||||||
sources."safe-buffer-5.2.0"
|
sources."safe-buffer-5.2.0"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue