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