Merge staging-next into staging
This commit is contained in:
commit
1d196d99be
@ -842,9 +842,12 @@ src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nix";
|
||||
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||
sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9";
|
||||
sha256 = "1i2yxndxb6yc9l6c99pypbd92lfq5aac4klq7y2v93c9qvx2cgpc";
|
||||
}
|
||||
</programlisting>
|
||||
Find the value to put as <literal>sha256</literal> by running
|
||||
<literal>nix run -f '<nixpkgs>' nix-prefetch-github -c nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix</literal>
|
||||
or <literal>nix-prefetch-url --unpack https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -23,27 +23,54 @@ rec {
|
||||
|
||||
# -- TRACING --
|
||||
|
||||
/* Trace msg, but only if pred is true.
|
||||
/* Conditionally trace the supplied message, based on a predicate.
|
||||
|
||||
Type: traceIf :: bool -> string -> a -> a
|
||||
|
||||
Example:
|
||||
traceIf true "hello" 3
|
||||
trace: hello
|
||||
=> 3
|
||||
*/
|
||||
traceIf = pred: msg: x: if pred then trace msg x else x;
|
||||
traceIf =
|
||||
# Predicate to check
|
||||
pred:
|
||||
# Message that should be traced
|
||||
msg:
|
||||
# Value to return
|
||||
x: if pred then trace msg x else x;
|
||||
|
||||
/* Trace the value and also return it.
|
||||
/* Trace the supplied value after applying a function to it, and
|
||||
return the original value.
|
||||
|
||||
Type: traceValFn :: (a -> b) -> a -> a
|
||||
|
||||
Example:
|
||||
traceValFn (v: "mystring ${v}") "foo"
|
||||
trace: mystring foo
|
||||
=> "foo"
|
||||
*/
|
||||
traceValFn = f: x: trace (f x) x;
|
||||
traceValFn =
|
||||
# Function to apply
|
||||
f:
|
||||
# Value to trace and return
|
||||
x: trace (f x) x;
|
||||
|
||||
/* Trace the supplied value and return it.
|
||||
|
||||
Type: traceVal :: a -> a
|
||||
|
||||
Example:
|
||||
traceVal 42
|
||||
# trace: 42
|
||||
=> 42
|
||||
*/
|
||||
traceVal = traceValFn id;
|
||||
|
||||
/* `builtins.trace`, but the value is `builtins.deepSeq`ed first.
|
||||
|
||||
Type: traceSeq :: a -> b -> b
|
||||
|
||||
Example:
|
||||
trace { a.b.c = 3; } null
|
||||
trace: { a = <CODE>; }
|
||||
@ -52,7 +79,11 @@ rec {
|
||||
trace: { a = { b = { c = 3; }; }; }
|
||||
=> null
|
||||
*/
|
||||
traceSeq = x: y: trace (builtins.deepSeq x x) y;
|
||||
traceSeq =
|
||||
# The value to trace
|
||||
x:
|
||||
# The value to return
|
||||
y: trace (builtins.deepSeq x x) y;
|
||||
|
||||
/* Like `traceSeq`, but only evaluate down to depth n.
|
||||
This is very useful because lots of `traceSeq` usages
|
||||
@ -76,27 +107,49 @@ rec {
|
||||
in trace (generators.toPretty { allowPrettyValues = true; }
|
||||
(modify depth snip x)) y;
|
||||
|
||||
/* A combination of `traceVal` and `traceSeq` */
|
||||
traceValSeqFn = f: v: traceValFn f (builtins.deepSeq v v);
|
||||
/* A combination of `traceVal` and `traceSeq` that applies a
|
||||
provided function to the value to be traced after `deepSeq`ing
|
||||
it.
|
||||
*/
|
||||
traceValSeqFn =
|
||||
# Function to apply
|
||||
f:
|
||||
# Value to trace
|
||||
v: traceValFn f (builtins.deepSeq v v);
|
||||
|
||||
/* A combination of `traceVal` and `traceSeq`. */
|
||||
traceValSeq = traceValSeqFn id;
|
||||
|
||||
/* A combination of `traceVal` and `traceSeqN` that applies a
|
||||
provided function to the value to be traced. */
|
||||
traceValSeqNFn =
|
||||
# Function to apply
|
||||
f:
|
||||
depth:
|
||||
# Value to trace
|
||||
v: traceSeqN depth (f v) v;
|
||||
|
||||
/* A combination of `traceVal` and `traceSeqN`. */
|
||||
traceValSeqNFn = f: depth: v: traceSeqN depth (f v) v;
|
||||
traceValSeqN = traceValSeqNFn id;
|
||||
|
||||
|
||||
# -- TESTING --
|
||||
|
||||
/* Evaluate a set of tests. A test is an attribute set {expr,
|
||||
expected}, denoting an expression and its expected result. The
|
||||
result is a list of failed tests, each represented as {name,
|
||||
expected, actual}, denoting the attribute name of the failing
|
||||
test and its expected and actual results. Used for regression
|
||||
testing of the functions in lib; see tests.nix for an example.
|
||||
Only tests having names starting with "test" are run.
|
||||
Add attr { tests = ["testName"]; } to run these test only
|
||||
/* Evaluate a set of tests. A test is an attribute set `{expr,
|
||||
expected}`, denoting an expression and its expected result. The
|
||||
result is a list of failed tests, each represented as `{name,
|
||||
expected, actual}`, denoting the attribute name of the failing
|
||||
test and its expected and actual results.
|
||||
|
||||
Used for regression testing of the functions in lib; see
|
||||
tests.nix for an example. Only tests having names starting with
|
||||
"test" are run.
|
||||
|
||||
Add attr { tests = ["testName"]; } to run these tests only.
|
||||
*/
|
||||
runTests = tests: lib.concatLists (lib.attrValues (lib.mapAttrs (name: test:
|
||||
runTests =
|
||||
# Tests to run
|
||||
tests: lib.concatLists (lib.attrValues (lib.mapAttrs (name: test:
|
||||
let testsToRun = if tests ? tests then tests.tests else [];
|
||||
in if (substring 0 4 name == "test" || elem name testsToRun)
|
||||
&& ((testsToRun == []) || elem name tests.tests)
|
||||
@ -105,8 +158,11 @@ rec {
|
||||
then [ { inherit name; expected = test.expected; result = test.expr; } ]
|
||||
else [] ) tests));
|
||||
|
||||
# create a test assuming that list elements are true
|
||||
# usage: { testX = allTrue [ true ]; }
|
||||
/* Create a test assuming that list elements are `true`.
|
||||
|
||||
Example:
|
||||
{ testX = allTrue [ true ]; }
|
||||
*/
|
||||
testAllTrue = expr: { inherit expr; expected = map (x: true) expr; };
|
||||
|
||||
|
||||
|
@ -309,6 +309,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
||||
fullName = "GNU General Public License v2.0 only";
|
||||
};
|
||||
|
||||
gpl2Classpath = {
|
||||
spdxId = "GPL-2.0-with-classpath-exception";
|
||||
fullName = "GNU General Public License v2.0 only (with Classpath exception)";
|
||||
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
|
||||
};
|
||||
|
||||
gpl2ClasspathPlus = {
|
||||
fullName = "GNU General Public License v2.0 or later (with Classpath exception)";
|
||||
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
|
||||
|
184
lib/lists.nix
184
lib/lists.nix
@ -1,4 +1,5 @@
|
||||
# General list operations.
|
||||
|
||||
{ lib }:
|
||||
with lib.trivial;
|
||||
let
|
||||
@ -8,21 +9,23 @@ rec {
|
||||
|
||||
inherit (builtins) head tail length isList elemAt concatLists filter elem genList;
|
||||
|
||||
/* Create a list consisting of a single element. `singleton x' is
|
||||
sometimes more convenient with respect to indentation than `[x]'
|
||||
/* Create a list consisting of a single element. `singleton x` is
|
||||
sometimes more convenient with respect to indentation than `[x]`
|
||||
when x spans multiple lines.
|
||||
|
||||
Type: singleton :: a -> [a]
|
||||
|
||||
Example:
|
||||
singleton "foo"
|
||||
=> [ "foo" ]
|
||||
*/
|
||||
singleton = x: [x];
|
||||
|
||||
/* “right fold” a binary function `op' between successive elements of
|
||||
`list' with `nul' as the starting value, i.e.,
|
||||
`foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))'.
|
||||
Type:
|
||||
foldr :: (a -> b -> b) -> b -> [a] -> b
|
||||
/* “right fold” a binary function `op` between successive elements of
|
||||
`list` with `nul' as the starting value, i.e.,
|
||||
`foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`.
|
||||
|
||||
Type: foldr :: (a -> b -> b) -> b -> [a] -> b
|
||||
|
||||
Example:
|
||||
concat = foldr (a: b: a + b) "z"
|
||||
@ -42,16 +45,15 @@ rec {
|
||||
else op (elemAt list n) (fold' (n + 1));
|
||||
in fold' 0;
|
||||
|
||||
/* `fold' is an alias of `foldr' for historic reasons */
|
||||
/* `fold` is an alias of `foldr` for historic reasons */
|
||||
# FIXME(Profpatsch): deprecate?
|
||||
fold = foldr;
|
||||
|
||||
|
||||
/* “left fold”, like `foldr', but from the left:
|
||||
/* “left fold”, like `foldr`, but from the left:
|
||||
`foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`.
|
||||
|
||||
Type:
|
||||
foldl :: (b -> a -> b) -> b -> [a] -> b
|
||||
Type: foldl :: (b -> a -> b) -> b -> [a] -> b
|
||||
|
||||
Example:
|
||||
lconcat = foldl (a: b: a + b) "z"
|
||||
@ -70,16 +72,20 @@ rec {
|
||||
else op (foldl' (n - 1)) (elemAt list n);
|
||||
in foldl' (length list - 1);
|
||||
|
||||
/* Strict version of `foldl'.
|
||||
/* Strict version of `foldl`.
|
||||
|
||||
The difference is that evaluation is forced upon access. Usually used
|
||||
with small whole results (in contract with lazily-generated list or large
|
||||
lists where only a part is consumed.)
|
||||
|
||||
Type: foldl' :: (b -> a -> b) -> b -> [a] -> b
|
||||
*/
|
||||
foldl' = builtins.foldl' or foldl;
|
||||
|
||||
/* Map with index starting from 0
|
||||
|
||||
Type: imap0 :: (int -> a -> b) -> [a] -> [b]
|
||||
|
||||
Example:
|
||||
imap0 (i: v: "${v}-${toString i}") ["a" "b"]
|
||||
=> [ "a-0" "b-1" ]
|
||||
@ -88,6 +94,8 @@ rec {
|
||||
|
||||
/* Map with index starting from 1
|
||||
|
||||
Type: imap1 :: (int -> a -> b) -> [a] -> [b]
|
||||
|
||||
Example:
|
||||
imap1 (i: v: "${v}-${toString i}") ["a" "b"]
|
||||
=> [ "a-1" "b-2" ]
|
||||
@ -96,6 +104,8 @@ rec {
|
||||
|
||||
/* Map and concatenate the result.
|
||||
|
||||
Type: concatMap :: (a -> [b]) -> [a] -> [b]
|
||||
|
||||
Example:
|
||||
concatMap (x: [x] ++ ["z"]) ["a" "b"]
|
||||
=> [ "a" "z" "b" "z" ]
|
||||
@ -118,15 +128,21 @@ rec {
|
||||
|
||||
/* Remove elements equal to 'e' from a list. Useful for buildInputs.
|
||||
|
||||
Type: remove :: a -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
remove 3 [ 1 3 4 3 ]
|
||||
=> [ 1 4 ]
|
||||
*/
|
||||
remove = e: filter (x: x != e);
|
||||
remove =
|
||||
# Element to remove from the list
|
||||
e: filter (x: x != e);
|
||||
|
||||
/* Find the sole element in the list matching the specified
|
||||
predicate, returns `default' if no such element exists, or
|
||||
`multiple' if there are multiple matching elements.
|
||||
predicate, returns `default` if no such element exists, or
|
||||
`multiple` if there are multiple matching elements.
|
||||
|
||||
Type: findSingle :: (a -> bool) -> a -> a -> [a] -> a
|
||||
|
||||
Example:
|
||||
findSingle (x: x == 3) "none" "multiple" [ 1 3 3 ]
|
||||
@ -136,14 +152,24 @@ rec {
|
||||
findSingle (x: x == 3) "none" "multiple" [ 1 9 ]
|
||||
=> "none"
|
||||
*/
|
||||
findSingle = pred: default: multiple: list:
|
||||
findSingle =
|
||||
# Predicate
|
||||
pred:
|
||||
# Default value to return if element was not found.
|
||||
default:
|
||||
# Default value to return if more than one element was found
|
||||
multiple:
|
||||
# Input list
|
||||
list:
|
||||
let found = filter pred list; len = length found;
|
||||
in if len == 0 then default
|
||||
else if len != 1 then multiple
|
||||
else head found;
|
||||
|
||||
/* Find the first element in the list matching the specified
|
||||
predicate or returns `default' if no such element exists.
|
||||
predicate or return `default` if no such element exists.
|
||||
|
||||
Type: findFirst :: (a -> bool) -> a -> [a] -> a
|
||||
|
||||
Example:
|
||||
findFirst (x: x > 3) 7 [ 1 6 4 ]
|
||||
@ -151,12 +177,20 @@ rec {
|
||||
findFirst (x: x > 9) 7 [ 1 6 4 ]
|
||||
=> 7
|
||||
*/
|
||||
findFirst = pred: default: list:
|
||||
findFirst =
|
||||
# Predicate
|
||||
pred:
|
||||
# Default value to return
|
||||
default:
|
||||
# Input list
|
||||
list:
|
||||
let found = filter pred list;
|
||||
in if found == [] then default else head found;
|
||||
|
||||
/* Return true iff function `pred' returns true for at least element
|
||||
of `list'.
|
||||
/* Return true if function `pred` returns true for at least one
|
||||
element of `list`.
|
||||
|
||||
Type: any :: (a -> bool) -> [a] -> bool
|
||||
|
||||
Example:
|
||||
any isString [ 1 "a" { } ]
|
||||
@ -166,8 +200,10 @@ rec {
|
||||
*/
|
||||
any = builtins.any or (pred: foldr (x: y: if pred x then true else y) false);
|
||||
|
||||
/* Return true iff function `pred' returns true for all elements of
|
||||
`list'.
|
||||
/* Return true if function `pred` returns true for all elements of
|
||||
`list`.
|
||||
|
||||
Type: all :: (a -> bool) -> [a] -> bool
|
||||
|
||||
Example:
|
||||
all (x: x < 3) [ 1 2 ]
|
||||
@ -177,19 +213,25 @@ rec {
|
||||
*/
|
||||
all = builtins.all or (pred: foldr (x: y: if pred x then y else false) true);
|
||||
|
||||
/* Count how many times function `pred' returns true for the elements
|
||||
of `list'.
|
||||
/* Count how many elements of `list` match the supplied predicate
|
||||
function.
|
||||
|
||||
Type: count :: (a -> bool) -> [a] -> int
|
||||
|
||||
Example:
|
||||
count (x: x == 3) [ 3 2 3 4 6 ]
|
||||
=> 2
|
||||
*/
|
||||
count = pred: foldl' (c: x: if pred x then c + 1 else c) 0;
|
||||
count =
|
||||
# Predicate
|
||||
pred: foldl' (c: x: if pred x then c + 1 else c) 0;
|
||||
|
||||
/* Return a singleton list or an empty list, depending on a boolean
|
||||
value. Useful when building lists with optional elements
|
||||
(e.g. `++ optional (system == "i686-linux") flashplayer').
|
||||
|
||||
Type: optional :: bool -> a -> [a]
|
||||
|
||||
Example:
|
||||
optional true "foo"
|
||||
=> [ "foo" ]
|
||||
@ -200,13 +242,19 @@ rec {
|
||||
|
||||
/* Return a list or an empty list, depending on a boolean value.
|
||||
|
||||
Type: optionals :: bool -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
optionals true [ 2 3 ]
|
||||
=> [ 2 3 ]
|
||||
optionals false [ 2 3 ]
|
||||
=> [ ]
|
||||
*/
|
||||
optionals = cond: elems: if cond then elems else [];
|
||||
optionals =
|
||||
# Condition
|
||||
cond:
|
||||
# List to return if condition is true
|
||||
elems: if cond then elems else [];
|
||||
|
||||
|
||||
/* If argument is a list, return it; else, wrap it in a singleton
|
||||
@ -223,20 +271,28 @@ rec {
|
||||
|
||||
/* Return a list of integers from `first' up to and including `last'.
|
||||
|
||||
Type: range :: int -> int -> [int]
|
||||
|
||||
Example:
|
||||
range 2 4
|
||||
=> [ 2 3 4 ]
|
||||
range 3 2
|
||||
=> [ ]
|
||||
*/
|
||||
range = first: last:
|
||||
range =
|
||||
# First integer in the range
|
||||
first:
|
||||
# Last integer in the range
|
||||
last:
|
||||
if first > last then
|
||||
[]
|
||||
else
|
||||
genList (n: first + n) (last - first + 1);
|
||||
|
||||
/* Splits the elements of a list in two lists, `right' and
|
||||
`wrong', depending on the evaluation of a predicate.
|
||||
/* Splits the elements of a list in two lists, `right` and
|
||||
`wrong`, depending on the evaluation of a predicate.
|
||||
|
||||
Type: (a -> bool) -> [a] -> { right :: [a], wrong :: [a] }
|
||||
|
||||
Example:
|
||||
partition (x: x > 2) [ 5 1 2 3 4 ]
|
||||
@ -252,7 +308,7 @@ rec {
|
||||
/* Splits the elements of a list into many lists, using the return value of a predicate.
|
||||
Predicate should return a string which becomes keys of attrset `groupBy' returns.
|
||||
|
||||
`groupBy'' allows to customise the combining function and initial value
|
||||
`groupBy'` allows to customise the combining function and initial value
|
||||
|
||||
Example:
|
||||
groupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
|
||||
@ -268,10 +324,6 @@ rec {
|
||||
xfce = [ { name = "xfce"; script = "xfce4-session &"; } ];
|
||||
}
|
||||
|
||||
|
||||
groupBy' allows to customise the combining function and initial value
|
||||
|
||||
Example:
|
||||
groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
|
||||
=> { true = 12; false = 3; }
|
||||
*/
|
||||
@ -289,17 +341,27 @@ rec {
|
||||
the merging stops at the shortest. How both lists are merged is defined
|
||||
by the first argument.
|
||||
|
||||
Type: zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]
|
||||
|
||||
Example:
|
||||
zipListsWith (a: b: a + b) ["h" "l"] ["e" "o"]
|
||||
=> ["he" "lo"]
|
||||
*/
|
||||
zipListsWith = f: fst: snd:
|
||||
zipListsWith =
|
||||
# Function to zip elements of both lists
|
||||
f:
|
||||
# First list
|
||||
fst:
|
||||
# Second list
|
||||
snd:
|
||||
genList
|
||||
(n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd));
|
||||
|
||||
/* Merges two lists of the same size together. If the sizes aren't the same
|
||||
the merging stops at the shortest.
|
||||
|
||||
Type: zipLists :: [a] -> [b] -> [{ fst :: a, snd :: b}]
|
||||
|
||||
Example:
|
||||
zipLists [ 1 2 ] [ "a" "b" ]
|
||||
=> [ { fst = 1; snd = "a"; } { fst = 2; snd = "b"; } ]
|
||||
@ -308,6 +370,8 @@ rec {
|
||||
|
||||
/* Reverse the order of the elements of a list.
|
||||
|
||||
Type: reverseList :: [a] -> [a]
|
||||
|
||||
Example:
|
||||
|
||||
reverseList [ "b" "o" "j" ]
|
||||
@ -321,8 +385,7 @@ rec {
|
||||
`before a b == true` means that `b` depends on `a` (there's an
|
||||
edge from `b` to `a`).
|
||||
|
||||
Examples:
|
||||
|
||||
Example:
|
||||
listDfs true hasPrefix [ "/home/user" "other" "/" "/home" ]
|
||||
== { minimal = "/"; # minimal element
|
||||
visited = [ "/home/user" ]; # seen elements (in reverse order)
|
||||
@ -336,7 +399,6 @@ rec {
|
||||
rest = [ "/home" "other" ]; # everything else
|
||||
|
||||
*/
|
||||
|
||||
listDfs = stopOnCycles: before: list:
|
||||
let
|
||||
dfs' = us: visited: rest:
|
||||
@ -361,7 +423,7 @@ rec {
|
||||
`before a b == true` means that `b` should be after `a`
|
||||
in the result.
|
||||
|
||||
Examples:
|
||||
Example:
|
||||
|
||||
toposort hasPrefix [ "/home/user" "other" "/" "/home" ]
|
||||
== { result = [ "/" "/home" "/home/user" "other" ]; }
|
||||
@ -376,7 +438,6 @@ rec {
|
||||
toposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; }
|
||||
|
||||
*/
|
||||
|
||||
toposort = before: list:
|
||||
let
|
||||
dfsthis = listDfs true before list;
|
||||
@ -467,26 +528,38 @@ rec {
|
||||
|
||||
/* Return the first (at most) N elements of a list.
|
||||
|
||||
Type: take :: int -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
take 2 [ "a" "b" "c" "d" ]
|
||||
=> [ "a" "b" ]
|
||||
take 2 [ ]
|
||||
=> [ ]
|
||||
*/
|
||||
take = count: sublist 0 count;
|
||||
take =
|
||||
# Number of elements to take
|
||||
count: sublist 0 count;
|
||||
|
||||
/* Remove the first (at most) N elements of a list.
|
||||
|
||||
Type: drop :: int -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
drop 2 [ "a" "b" "c" "d" ]
|
||||
=> [ "c" "d" ]
|
||||
drop 2 [ ]
|
||||
=> [ ]
|
||||
*/
|
||||
drop = count: list: sublist count (length list) list;
|
||||
drop =
|
||||
# Number of elements to drop
|
||||
count:
|
||||
# Input list
|
||||
list: sublist count (length list) list;
|
||||
|
||||
/* Return a list consisting of at most ‘count’ elements of ‘list’,
|
||||
starting at index ‘start’.
|
||||
/* Return a list consisting of at most `count` elements of `list`,
|
||||
starting at index `start`.
|
||||
|
||||
Type: sublist :: int -> int -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
sublist 1 3 [ "a" "b" "c" "d" "e" ]
|
||||
@ -494,7 +567,13 @@ rec {
|
||||
sublist 1 3 [ ]
|
||||
=> [ ]
|
||||
*/
|
||||
sublist = start: count: list:
|
||||
sublist =
|
||||
# Index at which to start the sublist
|
||||
start:
|
||||
# Number of elements to take
|
||||
count:
|
||||
# Input list
|
||||
list:
|
||||
let len = length list; in
|
||||
genList
|
||||
(n: elemAt list (n + start))
|
||||
@ -504,6 +583,10 @@ rec {
|
||||
|
||||
/* Return the last element of a list.
|
||||
|
||||
This function throws an error if the list is empty.
|
||||
|
||||
Type: last :: [a] -> a
|
||||
|
||||
Example:
|
||||
last [ 1 2 3 ]
|
||||
=> 3
|
||||
@ -512,7 +595,11 @@ rec {
|
||||
assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
|
||||
elemAt list (length list - 1);
|
||||
|
||||
/* Return all elements but the last
|
||||
/* Return all elements but the last.
|
||||
|
||||
This function throws an error if the list is empty.
|
||||
|
||||
Type: init :: [a] -> [a]
|
||||
|
||||
Example:
|
||||
init [ 1 2 3 ]
|
||||
@ -523,7 +610,7 @@ rec {
|
||||
take (length list - 1) list;
|
||||
|
||||
|
||||
/* return the image of the cross product of some lists by a function
|
||||
/* Return the image of the cross product of some lists by a function.
|
||||
|
||||
Example:
|
||||
crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]]
|
||||
@ -534,8 +621,9 @@ rec {
|
||||
|
||||
/* Remove duplicate elements from the list. O(n^2) complexity.
|
||||
|
||||
Example:
|
||||
Type: unique :: [a] -> [a]
|
||||
|
||||
Example:
|
||||
unique [ 3 2 3 4 ]
|
||||
=> [ 3 2 4 ]
|
||||
*/
|
||||
|
155
lib/options.nix
155
lib/options.nix
@ -8,61 +8,72 @@ with lib.strings;
|
||||
|
||||
rec {
|
||||
|
||||
# Returns true when the given argument is an option
|
||||
#
|
||||
# Examples:
|
||||
# isOption 1 // => false
|
||||
# isOption (mkOption {}) // => true
|
||||
/* Returns true when the given argument is an option
|
||||
|
||||
Type: isOption :: a -> bool
|
||||
|
||||
Example:
|
||||
isOption 1 // => false
|
||||
isOption (mkOption {}) // => true
|
||||
*/
|
||||
isOption = lib.isType "option";
|
||||
|
||||
# Creates an Option attribute set. mkOption accepts an attribute set with the following keys:
|
||||
#
|
||||
# default: Default value used when no definition is given in the configuration.
|
||||
# defaultText: Textual representation of the default, for in the manual.
|
||||
# example: Example value used in the manual.
|
||||
# description: String describing the option.
|
||||
# type: Option type, providing type-checking and value merging.
|
||||
# apply: Function that converts the option value to something else.
|
||||
# internal: Whether the option is for NixOS developers only.
|
||||
# visible: Whether the option shows up in the manual.
|
||||
# readOnly: Whether the option can be set only once
|
||||
# options: Obsolete, used by types.optionSet.
|
||||
#
|
||||
# All keys default to `null` when not given.
|
||||
#
|
||||
# Examples:
|
||||
# mkOption { } // => { _type = "option"; }
|
||||
# mkOption { defaultText = "foo"; } // => { _type = "option"; defaultText = "foo"; }
|
||||
/* Creates an Option attribute set. mkOption accepts an attribute set with the following keys:
|
||||
|
||||
All keys default to `null` when not given.
|
||||
|
||||
Example:
|
||||
mkOption { } // => { _type = "option"; }
|
||||
mkOption { defaultText = "foo"; } // => { _type = "option"; defaultText = "foo"; }
|
||||
*/
|
||||
mkOption =
|
||||
{ default ? null # Default value used when no definition is given in the configuration.
|
||||
, defaultText ? null # Textual representation of the default, for in the manual.
|
||||
, example ? null # Example value used in the manual.
|
||||
, description ? null # String describing the option.
|
||||
, relatedPackages ? null # Related packages used in the manual (see `genRelatedPackages` in ../nixos/doc/manual/default.nix).
|
||||
, type ? null # Option type, providing type-checking and value merging.
|
||||
, apply ? null # Function that converts the option value to something else.
|
||||
, internal ? null # Whether the option is for NixOS developers only.
|
||||
, visible ? null # Whether the option shows up in the manual.
|
||||
, readOnly ? null # Whether the option can be set only once
|
||||
, options ? null # Obsolete, used by types.optionSet.
|
||||
{
|
||||
# Default value used when no definition is given in the configuration.
|
||||
default ? null,
|
||||
# Textual representation of the default, for the manual.
|
||||
defaultText ? null,
|
||||
# Example value used in the manual.
|
||||
example ? null,
|
||||
# String describing the option.
|
||||
description ? null,
|
||||
# Related packages used in the manual (see `genRelatedPackages` in ../nixos/doc/manual/default.nix).
|
||||
relatedPackages ? null,
|
||||
# Option type, providing type-checking and value merging.
|
||||
type ? null,
|
||||
# Function that converts the option value to something else.
|
||||
apply ? null,
|
||||
# Whether the option is for NixOS developers only.
|
||||
internal ? null,
|
||||
# Whether the option shows up in the manual.
|
||||
visible ? null,
|
||||
# Whether the option can be set only once
|
||||
readOnly ? null,
|
||||
# Obsolete, used by types.optionSet.
|
||||
options ? null
|
||||
} @ attrs:
|
||||
attrs // { _type = "option"; };
|
||||
|
||||
# Creates a Option attribute set for a boolean value option i.e an option to be toggled on or off:
|
||||
#
|
||||
# Examples:
|
||||
# mkEnableOption "foo" // => { _type = "option"; default = false; description = "Whether to enable foo."; example = true; type = { ... }; }
|
||||
mkEnableOption = name: mkOption {
|
||||
/* Creates an Option attribute set for a boolean value option i.e an
|
||||
option to be toggled on or off:
|
||||
|
||||
Example:
|
||||
mkEnableOption "foo"
|
||||
=> { _type = "option"; default = false; description = "Whether to enable foo."; example = true; type = { ... }; }
|
||||
*/
|
||||
mkEnableOption =
|
||||
# Name for the created option
|
||||
name: mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable ${name}.";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
# This option accept anything, but it does not produce any result. This
|
||||
# is useful for sharing a module across different module sets without
|
||||
# having to implement similar features as long as the value of the options
|
||||
# are not expected.
|
||||
/* This option accepts anything, but it does not produce any result.
|
||||
|
||||
This is useful for sharing a module across different module sets
|
||||
without having to implement similar features as long as the
|
||||
values of the options are not accessed. */
|
||||
mkSinkUndeclaredOptions = attrs: mkOption ({
|
||||
internal = true;
|
||||
visible = false;
|
||||
@ -102,18 +113,24 @@ rec {
|
||||
else
|
||||
val) (head defs).value defs;
|
||||
|
||||
# Extracts values of all "value" keys of the given list
|
||||
#
|
||||
# Examples:
|
||||
# getValues [ { value = 1; } { value = 2; } ] // => [ 1 2 ]
|
||||
# getValues [ ] // => [ ]
|
||||
/* Extracts values of all "value" keys of the given list.
|
||||
|
||||
Type: getValues :: [ { value :: a } ] -> [a]
|
||||
|
||||
Example:
|
||||
getValues [ { value = 1; } { value = 2; } ] // => [ 1 2 ]
|
||||
getValues [ ] // => [ ]
|
||||
*/
|
||||
getValues = map (x: x.value);
|
||||
|
||||
# Extracts values of all "file" keys of the given list
|
||||
#
|
||||
# Examples:
|
||||
# getFiles [ { file = "file1"; } { file = "file2"; } ] // => [ "file1" "file2" ]
|
||||
# getFiles [ ] // => [ ]
|
||||
/* Extracts values of all "file" keys of the given list
|
||||
|
||||
Type: getFiles :: [ { file :: a } ] -> [a]
|
||||
|
||||
Example:
|
||||
getFiles [ { file = "file1"; } { file = "file2"; } ] // => [ "file1" "file2" ]
|
||||
getFiles [ ] // => [ ]
|
||||
*/
|
||||
getFiles = map (x: x.file);
|
||||
|
||||
# Generate documentation template from the list of option declaration like
|
||||
@ -146,10 +163,13 @@ rec {
|
||||
|
||||
|
||||
/* This function recursively removes all derivation attributes from
|
||||
`x' except for the `name' attribute. This is to make the
|
||||
generation of `options.xml' much more efficient: the XML
|
||||
representation of derivations is very large (on the order of
|
||||
megabytes) and is not actually used by the manual generator. */
|
||||
`x` except for the `name` attribute.
|
||||
|
||||
This is to make the generation of `options.xml` much more
|
||||
efficient: the XML representation of derivations is very large
|
||||
(on the order of megabytes) and is not actually used by the
|
||||
manual generator.
|
||||
*/
|
||||
scrubOptionValue = x:
|
||||
if isDerivation x then
|
||||
{ type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; }
|
||||
@ -158,20 +178,21 @@ rec {
|
||||
else x;
|
||||
|
||||
|
||||
/* For use in the ‘example’ option attribute. It causes the given
|
||||
text to be included verbatim in documentation. This is necessary
|
||||
for example values that are not simple values, e.g.,
|
||||
functions. */
|
||||
/* For use in the `example` option attribute. It causes the given
|
||||
text to be included verbatim in documentation. This is necessary
|
||||
for example values that are not simple values, e.g., functions.
|
||||
*/
|
||||
literalExample = text: { _type = "literalExample"; inherit text; };
|
||||
|
||||
# Helper functions.
|
||||
|
||||
/* Helper functions. */
|
||||
/* Convert an option, described as a list of the option parts in to a
|
||||
safe, human readable version.
|
||||
|
||||
# Convert an option, described as a list of the option parts in to a
|
||||
# safe, human readable version. ie:
|
||||
#
|
||||
# (showOption ["foo" "bar" "baz"]) == "foo.bar.baz"
|
||||
# (showOption ["foo" "bar.baz" "tux"]) == "foo.\"bar.baz\".tux"
|
||||
Example:
|
||||
(showOption ["foo" "bar" "baz"]) == "foo.bar.baz"
|
||||
(showOption ["foo" "bar.baz" "tux"]) == "foo.\"bar.baz\".tux"
|
||||
*/
|
||||
showOption = parts: let
|
||||
escapeOptionPart = part:
|
||||
let
|
||||
|
213
lib/strings.nix
213
lib/strings.nix
@ -12,6 +12,8 @@ rec {
|
||||
|
||||
/* Concatenate a list of strings.
|
||||
|
||||
Type: concatStrings :: [string] -> string
|
||||
|
||||
Example:
|
||||
concatStrings ["foo" "bar"]
|
||||
=> "foobar"
|
||||
@ -20,15 +22,19 @@ rec {
|
||||
|
||||
/* Map a function over a list and concatenate the resulting strings.
|
||||
|
||||
Type: concatMapStrings :: (a -> string) -> [a] -> string
|
||||
|
||||
Example:
|
||||
concatMapStrings (x: "a" + x) ["foo" "bar"]
|
||||
=> "afooabar"
|
||||
*/
|
||||
concatMapStrings = f: list: concatStrings (map f list);
|
||||
|
||||
/* Like `concatMapStrings' except that the f functions also gets the
|
||||
/* Like `concatMapStrings` except that the f functions also gets the
|
||||
position as a parameter.
|
||||
|
||||
Type: concatImapStrings :: (int -> a -> string) -> [a] -> string
|
||||
|
||||
Example:
|
||||
concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"]
|
||||
=> "1-foo2-bar"
|
||||
@ -37,17 +43,25 @@ rec {
|
||||
|
||||
/* Place an element between each element of a list
|
||||
|
||||
Type: intersperse :: a -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
intersperse "/" ["usr" "local" "bin"]
|
||||
=> ["usr" "/" "local" "/" "bin"].
|
||||
*/
|
||||
intersperse = separator: list:
|
||||
intersperse =
|
||||
# Separator to add between elements
|
||||
separator:
|
||||
# Input list
|
||||
list:
|
||||
if list == [] || length list == 1
|
||||
then list
|
||||
else tail (lib.concatMap (x: [separator x]) list);
|
||||
|
||||
/* Concatenate a list of strings with a separator between each element
|
||||
|
||||
Type: concatStringsSep :: string -> [string] -> string
|
||||
|
||||
Example:
|
||||
concatStringsSep "/" ["usr" "local" "bin"]
|
||||
=> "usr/local/bin"
|
||||
@ -55,43 +69,77 @@ rec {
|
||||
concatStringsSep = builtins.concatStringsSep or (separator: list:
|
||||
concatStrings (intersperse separator list));
|
||||
|
||||
/* First maps over the list and then concatenates it.
|
||||
/* Maps a function over a list of strings and then concatenates the
|
||||
result with the specified separator interspersed between
|
||||
elements.
|
||||
|
||||
Type: concatMapStringsSep :: string -> (string -> string) -> [string] -> string
|
||||
|
||||
Example:
|
||||
concatMapStringsSep "-" (x: toUpper x) ["foo" "bar" "baz"]
|
||||
=> "FOO-BAR-BAZ"
|
||||
*/
|
||||
concatMapStringsSep = sep: f: list: concatStringsSep sep (map f list);
|
||||
concatMapStringsSep =
|
||||
# Separator to add between elements
|
||||
sep:
|
||||
# Function to map over the list
|
||||
f:
|
||||
# List of input strings
|
||||
list: concatStringsSep sep (map f list);
|
||||
|
||||
/* First imaps over the list and then concatenates it.
|
||||
/* Same as `concatMapStringsSep`, but the mapping function
|
||||
additionally receives the position of its argument.
|
||||
|
||||
Type: concatMapStringsSep :: string -> (int -> string -> string) -> [string] -> string
|
||||
|
||||
Example:
|
||||
|
||||
concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ]
|
||||
=> "6-3-2"
|
||||
*/
|
||||
concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap1 f list);
|
||||
concatImapStringsSep =
|
||||
# Separator to add between elements
|
||||
sep:
|
||||
# Function that receives elements and their positions
|
||||
f:
|
||||
# List of input strings
|
||||
list: concatStringsSep sep (lib.imap1 f list);
|
||||
|
||||
/* Construct a Unix-style search path consisting of each `subDir"
|
||||
directory of the given list of packages.
|
||||
/* Construct a Unix-style, colon-separated search path consisting of
|
||||
the given `subDir` appended to each of the given paths.
|
||||
|
||||
Type: makeSearchPath :: string -> [string] -> string
|
||||
|
||||
Example:
|
||||
makeSearchPath "bin" ["/root" "/usr" "/usr/local"]
|
||||
=> "/root/bin:/usr/bin:/usr/local/bin"
|
||||
makeSearchPath "bin" ["/"]
|
||||
=> "//bin"
|
||||
makeSearchPath "bin" [""]
|
||||
=> "/bin"
|
||||
*/
|
||||
makeSearchPath = subDir: packages:
|
||||
concatStringsSep ":" (map (path: path + "/" + subDir) (builtins.filter (x: x != null) packages));
|
||||
makeSearchPath =
|
||||
# Directory name to append
|
||||
subDir:
|
||||
# List of base paths
|
||||
paths:
|
||||
concatStringsSep ":" (map (path: path + "/" + subDir) (builtins.filter (x: x != null) paths));
|
||||
|
||||
/* Construct a Unix-style search path, using given package output.
|
||||
If no output is found, fallback to `.out` and then to the default.
|
||||
/* Construct a Unix-style search path by appending the given
|
||||
`subDir` to the specified `output` of each of the packages. If no
|
||||
output by the given name is found, fallback to `.out` and then to
|
||||
the default.
|
||||
|
||||
Type: string -> string -> [package] -> string
|
||||
|
||||
Example:
|
||||
makeSearchPathOutput "dev" "bin" [ pkgs.openssl pkgs.zlib ]
|
||||
=> "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/bin:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/bin"
|
||||
*/
|
||||
makeSearchPathOutput = output: subDir: pkgs: makeSearchPath subDir (map (lib.getOutput output) pkgs);
|
||||
makeSearchPathOutput =
|
||||
# Package output to use
|
||||
output:
|
||||
# Directory name to append
|
||||
subDir:
|
||||
# List of packages
|
||||
pkgs: makeSearchPath subDir (map (lib.getOutput output) pkgs);
|
||||
|
||||
/* Construct a library search path (such as RPATH) containing the
|
||||
libraries for a set of packages
|
||||
@ -117,13 +165,12 @@ rec {
|
||||
|
||||
/* Construct a perl search path (such as $PERL5LIB)
|
||||
|
||||
FIXME(zimbatm): this should be moved in perl-specific code
|
||||
|
||||
Example:
|
||||
pkgs = import <nixpkgs> { }
|
||||
makePerlPath [ pkgs.perlPackages.libnet ]
|
||||
=> "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl"
|
||||
*/
|
||||
# FIXME(zimbatm): this should be moved in perl-specific code
|
||||
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
|
||||
|
||||
/* Construct a perl search path recursively including all dependencies (such as $PERL5LIB)
|
||||
@ -138,34 +185,51 @@ rec {
|
||||
/* Depending on the boolean `cond', return either the given string
|
||||
or the empty string. Useful to concatenate against a bigger string.
|
||||
|
||||
Type: optionalString :: bool -> string -> string
|
||||
|
||||
Example:
|
||||
optionalString true "some-string"
|
||||
=> "some-string"
|
||||
optionalString false "some-string"
|
||||
=> ""
|
||||
*/
|
||||
optionalString = cond: string: if cond then string else "";
|
||||
optionalString =
|
||||
# Condition
|
||||
cond:
|
||||
# String to return if condition is true
|
||||
string: if cond then string else "";
|
||||
|
||||
/* Determine whether a string has given prefix.
|
||||
|
||||
Type: hasPrefix :: string -> string -> bool
|
||||
|
||||
Example:
|
||||
hasPrefix "foo" "foobar"
|
||||
=> true
|
||||
hasPrefix "foo" "barfoo"
|
||||
=> false
|
||||
*/
|
||||
hasPrefix = pref: str:
|
||||
substring 0 (stringLength pref) str == pref;
|
||||
hasPrefix =
|
||||
# Prefix to check for
|
||||
pref:
|
||||
# Input string
|
||||
str: substring 0 (stringLength pref) str == pref;
|
||||
|
||||
/* Determine whether a string has given suffix.
|
||||
|
||||
Type: hasSuffix :: string -> string -> bool
|
||||
|
||||
Example:
|
||||
hasSuffix "foo" "foobar"
|
||||
=> false
|
||||
hasSuffix "foo" "barfoo"
|
||||
=> true
|
||||
*/
|
||||
hasSuffix = suffix: content:
|
||||
hasSuffix =
|
||||
# Suffix to check for
|
||||
suffix:
|
||||
# Input string
|
||||
content:
|
||||
let
|
||||
lenContent = stringLength content;
|
||||
lenSuffix = stringLength suffix;
|
||||
@ -180,6 +244,8 @@ rec {
|
||||
Also note that Nix treats strings as a list of bytes and thus doesn't
|
||||
handle unicode.
|
||||
|
||||
Type: stringtoCharacters :: string -> [string]
|
||||
|
||||
Example:
|
||||
stringToCharacters ""
|
||||
=> [ ]
|
||||
@ -194,18 +260,25 @@ rec {
|
||||
/* Manipulate a string character by character and replace them by
|
||||
strings before concatenating the results.
|
||||
|
||||
Type: stringAsChars :: (string -> string) -> string -> string
|
||||
|
||||
Example:
|
||||
stringAsChars (x: if x == "a" then "i" else x) "nax"
|
||||
=> "nix"
|
||||
*/
|
||||
stringAsChars = f: s:
|
||||
concatStrings (
|
||||
stringAsChars =
|
||||
# Function to map over each individual character
|
||||
f:
|
||||
# Input string
|
||||
s: concatStrings (
|
||||
map f (stringToCharacters s)
|
||||
);
|
||||
|
||||
/* Escape occurrence of the elements of ‘list’ in ‘string’ by
|
||||
/* Escape occurrence of the elements of `list` in `string` by
|
||||
prefixing it with a backslash.
|
||||
|
||||
Type: escape :: [string] -> string -> string
|
||||
|
||||
Example:
|
||||
escape ["(" ")"] "(foo)"
|
||||
=> "\\(foo\\)"
|
||||
@ -214,6 +287,8 @@ rec {
|
||||
|
||||
/* Quote string to be used safely within the Bourne shell.
|
||||
|
||||
Type: escapeShellArg :: string -> string
|
||||
|
||||
Example:
|
||||
escapeShellArg "esc'ape\nme"
|
||||
=> "'esc'\\''ape\nme'"
|
||||
@ -222,6 +297,8 @@ rec {
|
||||
|
||||
/* Quote all arguments to be safely passed to the Bourne shell.
|
||||
|
||||
Type: escapeShellArgs :: [string] -> string
|
||||
|
||||
Example:
|
||||
escapeShellArgs ["one" "two three" "four'five"]
|
||||
=> "'one' 'two three' 'four'\\''five'"
|
||||
@ -230,13 +307,15 @@ rec {
|
||||
|
||||
/* Turn a string into a Nix expression representing that string
|
||||
|
||||
Type: string -> string
|
||||
|
||||
Example:
|
||||
escapeNixString "hello\${}\n"
|
||||
=> "\"hello\\\${}\\n\""
|
||||
*/
|
||||
escapeNixString = s: escape ["$"] (builtins.toJSON s);
|
||||
|
||||
/* Obsolete - use replaceStrings instead. */
|
||||
# Obsolete - use replaceStrings instead.
|
||||
replaceChars = builtins.replaceStrings or (
|
||||
del: new: s:
|
||||
let
|
||||
@ -256,6 +335,8 @@ rec {
|
||||
|
||||
/* Converts an ASCII string to lower-case.
|
||||
|
||||
Type: toLower :: string -> string
|
||||
|
||||
Example:
|
||||
toLower "HOME"
|
||||
=> "home"
|
||||
@ -264,6 +345,8 @@ rec {
|
||||
|
||||
/* Converts an ASCII string to upper-case.
|
||||
|
||||
Type: toUpper :: string -> string
|
||||
|
||||
Example:
|
||||
toUpper "home"
|
||||
=> "HOME"
|
||||
@ -273,7 +356,7 @@ rec {
|
||||
/* Appends string context from another string. This is an implementation
|
||||
detail of Nix.
|
||||
|
||||
Strings in Nix carry an invisible `context' which is a list of strings
|
||||
Strings in Nix carry an invisible `context` which is a list of strings
|
||||
representing store paths. If the string is later used in a derivation
|
||||
attribute, the derivation will properly populate the inputDrvs and
|
||||
inputSrcs.
|
||||
@ -319,8 +402,9 @@ rec {
|
||||
in
|
||||
recurse 0 0;
|
||||
|
||||
/* Return the suffix of the second argument if the first argument matches
|
||||
its prefix.
|
||||
/* Return a string without the specified prefix, if the prefix matches.
|
||||
|
||||
Type: string -> string -> string
|
||||
|
||||
Example:
|
||||
removePrefix "foo." "foo.bar.baz"
|
||||
@ -328,18 +412,23 @@ rec {
|
||||
removePrefix "xxx" "foo.bar.baz"
|
||||
=> "foo.bar.baz"
|
||||
*/
|
||||
removePrefix = pre: s:
|
||||
removePrefix =
|
||||
# Prefix to remove if it matches
|
||||
prefix:
|
||||
# Input string
|
||||
str:
|
||||
let
|
||||
preLen = stringLength pre;
|
||||
sLen = stringLength s;
|
||||
preLen = stringLength prefix;
|
||||
sLen = stringLength str;
|
||||
in
|
||||
if hasPrefix pre s then
|
||||
substring preLen (sLen - preLen) s
|
||||
if hasPrefix prefix str then
|
||||
substring preLen (sLen - preLen) str
|
||||
else
|
||||
s;
|
||||
str;
|
||||
|
||||
/* Return the prefix of the second argument if the first argument matches
|
||||
its suffix.
|
||||
/* Return a string without the specified suffix, if the suffix matches.
|
||||
|
||||
Type: string -> string -> string
|
||||
|
||||
Example:
|
||||
removeSuffix "front" "homefront"
|
||||
@ -347,17 +436,21 @@ rec {
|
||||
removeSuffix "xxx" "homefront"
|
||||
=> "homefront"
|
||||
*/
|
||||
removeSuffix = suf: s:
|
||||
removeSuffix =
|
||||
# Suffix to remove if it matches
|
||||
suffix:
|
||||
# Input string
|
||||
str:
|
||||
let
|
||||
sufLen = stringLength suf;
|
||||
sLen = stringLength s;
|
||||
sufLen = stringLength suffix;
|
||||
sLen = stringLength str;
|
||||
in
|
||||
if sufLen <= sLen && suf == substring (sLen - sufLen) sufLen s then
|
||||
substring 0 (sLen - sufLen) s
|
||||
if sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str then
|
||||
substring 0 (sLen - sufLen) str
|
||||
else
|
||||
s;
|
||||
str;
|
||||
|
||||
/* Return true iff string v1 denotes a version older than v2.
|
||||
/* Return true if string v1 denotes a version older than v2.
|
||||
|
||||
Example:
|
||||
versionOlder "1.1" "1.2"
|
||||
@ -367,7 +460,7 @@ rec {
|
||||
*/
|
||||
versionOlder = v1: v2: builtins.compareVersions v2 v1 == 1;
|
||||
|
||||
/* Return true iff string v1 denotes a version equal to or newer than v2.
|
||||
/* Return true if string v1 denotes a version equal to or newer than v2.
|
||||
|
||||
Example:
|
||||
versionAtLeast "1.1" "1.0"
|
||||
@ -459,6 +552,11 @@ rec {
|
||||
/* Create a fixed width string with additional prefix to match
|
||||
required width.
|
||||
|
||||
This function will fail if the input string is longer than the
|
||||
requested length.
|
||||
|
||||
Type: fixedWidthString :: int -> string -> string
|
||||
|
||||
Example:
|
||||
fixedWidthString 5 "0" (toString 15)
|
||||
=> "00015"
|
||||
@ -502,12 +600,16 @@ rec {
|
||||
=> false
|
||||
*/
|
||||
isStorePath = x:
|
||||
isCoercibleToString x
|
||||
&& builtins.substring 0 1 (toString x) == "/"
|
||||
&& dirOf x == builtins.storeDir;
|
||||
if isCoercibleToString x then
|
||||
let str = toString x; in
|
||||
builtins.substring 0 1 str == "/"
|
||||
&& dirOf str == builtins.storeDir
|
||||
else
|
||||
false;
|
||||
|
||||
/* Convert string to int
|
||||
Obviously, it is a bit hacky to use fromJSON that way.
|
||||
/* Parse a string string as an int.
|
||||
|
||||
Type: string -> int
|
||||
|
||||
Example:
|
||||
toInt "1337"
|
||||
@ -517,17 +619,18 @@ rec {
|
||||
toInt "3.14"
|
||||
=> error: floating point JSON numbers are not supported
|
||||
*/
|
||||
# Obviously, it is a bit hacky to use fromJSON this way.
|
||||
toInt = str:
|
||||
let may_be_int = builtins.fromJSON str; in
|
||||
if builtins.isInt may_be_int
|
||||
then may_be_int
|
||||
else throw "Could not convert ${str} to int.";
|
||||
|
||||
/* Read a list of paths from `file', relative to the `rootPath'. Lines
|
||||
beginning with `#' are treated as comments and ignored. Whitespace
|
||||
is significant.
|
||||
/* Read a list of paths from `file`, relative to the `rootPath`.
|
||||
Lines beginning with `#` are treated as comments and ignored.
|
||||
Whitespace is significant.
|
||||
|
||||
NOTE: this function is not performant and should be avoided
|
||||
NOTE: This function is not performant and should be avoided.
|
||||
|
||||
Example:
|
||||
readPathsFromFile /prefix
|
||||
@ -549,6 +652,8 @@ rec {
|
||||
|
||||
/* Read the contents of a file removing the trailing \n
|
||||
|
||||
Type: fileContents :: path -> string
|
||||
|
||||
Example:
|
||||
$ echo "1.0" > ./version
|
||||
|
||||
|
@ -32,6 +32,7 @@ rec {
|
||||
else if final.isUClibc then "uclibc"
|
||||
else if final.isAndroid then "bionic"
|
||||
else if final.isLinux /* default */ then "glibc"
|
||||
else if final.isAvr then "avrlibc"
|
||||
# TODO(@Ericson2314) think more about other operating systems
|
||||
else "native/impure";
|
||||
extensions = {
|
||||
|
@ -99,6 +99,34 @@ rec {
|
||||
riscv64 = riscv "64";
|
||||
riscv32 = riscv "32";
|
||||
|
||||
avr = {
|
||||
config = "avr";
|
||||
};
|
||||
|
||||
arm-embedded = {
|
||||
config = "arm-none-eabi";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
aarch64-embedded = {
|
||||
config = "aarch64-none-elf";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
ppc-embedded = {
|
||||
config = "powerpc-none-eabi";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
i686-embedded = {
|
||||
config = "i686-elf";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
x86_64-embedded = {
|
||||
config = "x86_64-elf";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
#
|
||||
# Darwin
|
||||
|
@ -19,6 +19,7 @@ rec {
|
||||
isRiscV = { cpu = { family = "riscv"; }; };
|
||||
isSparc = { cpu = { family = "sparc"; }; };
|
||||
isWasm = { cpu = { family = "wasm"; }; };
|
||||
isAvr = { cpu = { family = "avr"; }; };
|
||||
|
||||
is32bit = { cpu = { bits = 32; }; };
|
||||
is64bit = { cpu = { bits = 64; }; };
|
||||
|
@ -101,6 +101,8 @@ rec {
|
||||
|
||||
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
|
||||
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
|
||||
|
||||
avr = { bits = 8; family = "avr"; };
|
||||
};
|
||||
|
||||
################################################################################
|
||||
@ -117,6 +119,7 @@ rec {
|
||||
apple = {};
|
||||
pc = {};
|
||||
|
||||
none = {};
|
||||
unknown = {};
|
||||
};
|
||||
|
||||
@ -200,6 +203,7 @@ rec {
|
||||
cygnus = {};
|
||||
msvc = {};
|
||||
eabi = {};
|
||||
elf = {};
|
||||
|
||||
androideabi = {};
|
||||
android = {
|
||||
@ -255,9 +259,16 @@ rec {
|
||||
setType "system" components;
|
||||
|
||||
mkSkeletonFromList = l: {
|
||||
"1" = if elemAt l 0 == "avr"
|
||||
then { cpu = elemAt l 0; kernel = "none"; abi = "unknown"; }
|
||||
else throw "Target specification with 1 components is ambiguous";
|
||||
"2" = # We only do 2-part hacks for things Nix already supports
|
||||
if elemAt l 1 == "cygwin"
|
||||
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
|
||||
else if (elemAt l 1 == "eabi")
|
||||
then { cpu = elemAt l 0; vendor = "none"; kernel = "none"; abi = elemAt l 1; }
|
||||
else if (elemAt l 1 == "elf")
|
||||
then { cpu = elemAt l 0; vendor = "none"; kernel = "none"; abi = elemAt l 1; }
|
||||
else { cpu = elemAt l 0; kernel = elemAt l 1; };
|
||||
"3" = # Awkwards hacks, beware!
|
||||
if elemAt l 1 == "apple"
|
||||
@ -268,6 +279,10 @@ rec {
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; abi = "gnu"; }
|
||||
else if hasPrefix "netbsd" (elemAt l 2)
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
||||
else if (elemAt l 2 == "eabi")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "none"; abi = elemAt l 2; }
|
||||
else if (elemAt l 2 == "elf")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "none"; abi = elemAt l 2; }
|
||||
else throw "Target specification with 3 components is ambiguous";
|
||||
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
|
||||
}.${toString (length l)}
|
||||
|
@ -112,7 +112,7 @@ runTests {
|
||||
storePathAppendix = isStorePath
|
||||
"${goodPath}/bin/python";
|
||||
nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath)));
|
||||
asPath = isStorePath goodPath;
|
||||
asPath = isStorePath (/. + goodPath);
|
||||
otherPath = isStorePath "/something/else";
|
||||
otherVals = {
|
||||
attrset = isStorePath {};
|
||||
|
117
lib/trivial.nix
117
lib/trivial.nix
@ -9,23 +9,37 @@ rec {
|
||||
|
||||
Type: id :: a -> a
|
||||
*/
|
||||
id = x: x;
|
||||
id =
|
||||
# The value to return
|
||||
x: x;
|
||||
|
||||
/* The constant function
|
||||
Ignores the second argument.
|
||||
Or: Construct a function that always returns a static value.
|
||||
|
||||
Ignores the second argument. If called with only one argument,
|
||||
constructs a function that always returns a static value.
|
||||
|
||||
Type: const :: a -> b -> a
|
||||
Example:
|
||||
let f = const 5; in f 10
|
||||
=> 5
|
||||
*/
|
||||
const = x: y: x;
|
||||
const =
|
||||
# Value to return
|
||||
x:
|
||||
# Value to ignore
|
||||
y: x;
|
||||
|
||||
|
||||
## Named versions corresponding to some builtin operators.
|
||||
|
||||
/* Concatenate two lists */
|
||||
/* Concatenate two lists
|
||||
|
||||
Type: concat :: [a] -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
concat [ 1 2 ] [ 3 4 ]
|
||||
=> [ 1 2 3 4 ]
|
||||
*/
|
||||
concat = x: y: x ++ y;
|
||||
|
||||
/* boolean “or” */
|
||||
@ -53,27 +67,40 @@ rec {
|
||||
bitNot = builtins.sub (-1);
|
||||
|
||||
/* Convert a boolean to a string.
|
||||
Note that toString on a bool returns "1" and "".
|
||||
|
||||
This function uses the strings "true" and "false" to represent
|
||||
boolean values. Calling `toString` on a bool instead returns "1"
|
||||
and "" (sic!).
|
||||
|
||||
Type: boolToString :: bool -> string
|
||||
*/
|
||||
boolToString = b: if b then "true" else "false";
|
||||
|
||||
/* Merge two attribute sets shallowly, right side trumps left
|
||||
|
||||
mergeAttrs :: attrs -> attrs -> attrs
|
||||
|
||||
Example:
|
||||
mergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }
|
||||
=> { a = 1; b = 3; c = 4; }
|
||||
*/
|
||||
mergeAttrs = x: y: x // y;
|
||||
mergeAttrs =
|
||||
# Left attribute set
|
||||
x:
|
||||
# Right attribute set (higher precedence for equal keys)
|
||||
y: x // y;
|
||||
|
||||
/* Flip the order of the arguments of a binary function.
|
||||
|
||||
Type: flip :: (a -> b -> c) -> (b -> a -> c)
|
||||
|
||||
Example:
|
||||
flip concat [1] [2]
|
||||
=> [ 2 1 ]
|
||||
*/
|
||||
flip = f: a: b: f b a;
|
||||
|
||||
/* Apply function if argument is non-null.
|
||||
/* Apply function if the supplied argument is non-null.
|
||||
|
||||
Example:
|
||||
mapNullable (x: x+1) null
|
||||
@ -81,7 +108,11 @@ rec {
|
||||
mapNullable (x: x+1) 22
|
||||
=> 23
|
||||
*/
|
||||
mapNullable = f: a: if isNull a then a else f a;
|
||||
mapNullable =
|
||||
# Function to call
|
||||
f:
|
||||
# Argument to check for null before passing it to `f`
|
||||
a: if isNull a then a else f a;
|
||||
|
||||
# Pull in some builtins not included elsewhere.
|
||||
inherit (builtins)
|
||||
@ -92,21 +123,27 @@ rec {
|
||||
|
||||
## nixpks version strings
|
||||
|
||||
# The current full nixpkgs version number.
|
||||
/* Returns the current full nixpkgs version number. */
|
||||
version = release + versionSuffix;
|
||||
|
||||
# The current nixpkgs version number as string.
|
||||
/* Returns the current nixpkgs release number as string. */
|
||||
release = lib.strings.fileContents ../.version;
|
||||
|
||||
# The current nixpkgs version suffix as string.
|
||||
/* Returns the current nixpkgs version suffix as string. */
|
||||
versionSuffix =
|
||||
let suffixFile = ../.version-suffix;
|
||||
in if pathExists suffixFile
|
||||
then lib.strings.fileContents suffixFile
|
||||
else "pre-git";
|
||||
|
||||
# Attempt to get the revision nixpkgs is from
|
||||
revisionWithDefault = default:
|
||||
/* Attempts to return the the current revision of nixpkgs and
|
||||
returns the supplied default value otherwise.
|
||||
|
||||
Type: revisionWithDefault :: string -> string
|
||||
*/
|
||||
revisionWithDefault =
|
||||
# Default value to return if revision can not be determined
|
||||
default:
|
||||
let
|
||||
revisionFile = "${toString ./..}/.git-revision";
|
||||
gitRepo = "${toString ./..}/.git";
|
||||
@ -117,14 +154,20 @@ rec {
|
||||
|
||||
nixpkgsVersion = builtins.trace "`lib.nixpkgsVersion` is deprecated, use `lib.version` instead!" version;
|
||||
|
||||
# Whether we're being called by nix-shell.
|
||||
/* Determine whether the function is being called from inside a Nix
|
||||
shell.
|
||||
|
||||
Type: inNixShell :: bool
|
||||
*/
|
||||
inNixShell = builtins.getEnv "IN_NIX_SHELL" != "";
|
||||
|
||||
|
||||
## Integer operations
|
||||
|
||||
# Return minimum/maximum of two numbers.
|
||||
/* Return minimum of two numbers. */
|
||||
min = x: y: if x < y then x else y;
|
||||
|
||||
/* Return maximum of two numbers. */
|
||||
max = x: y: if x > y then x else y;
|
||||
|
||||
/* Integer modulus
|
||||
@ -158,8 +201,9 @@ rec {
|
||||
second subtype, compare elements of a single subtype with `yes`
|
||||
and `no` respectively.
|
||||
|
||||
Example:
|
||||
Type: (a -> bool) -> (a -> a -> int) -> (a -> a -> int) -> (a -> a -> int)
|
||||
|
||||
Example:
|
||||
let cmp = splitByAndCompare (hasPrefix "foo") compare compare; in
|
||||
|
||||
cmp "a" "z" => -1
|
||||
@ -170,31 +214,44 @@ rec {
|
||||
# while
|
||||
compare "fooa" "a" => 1
|
||||
*/
|
||||
splitByAndCompare = p: yes: no: a: b:
|
||||
splitByAndCompare =
|
||||
# Predicate
|
||||
p:
|
||||
# Comparison function if predicate holds for both values
|
||||
yes:
|
||||
# Comparison function if predicate holds for neither value
|
||||
no:
|
||||
# First value to compare
|
||||
a:
|
||||
# Second value to compare
|
||||
b:
|
||||
if p a
|
||||
then if p b then yes a b else -1
|
||||
else if p b then 1 else no a b;
|
||||
|
||||
|
||||
/* Reads a JSON file. */
|
||||
/* Reads a JSON file.
|
||||
|
||||
Type :: path -> any
|
||||
*/
|
||||
importJSON = path:
|
||||
builtins.fromJSON (builtins.readFile path);
|
||||
|
||||
|
||||
## Warnings
|
||||
|
||||
/* See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
|
||||
to expand to Nix builtins that carry metadata so that Nix can filter out
|
||||
the INFO messages without parsing the message string.
|
||||
# See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
|
||||
# to expand to Nix builtins that carry metadata so that Nix can filter out
|
||||
# the INFO messages without parsing the message string.
|
||||
#
|
||||
# Usage:
|
||||
# {
|
||||
# foo = lib.warn "foo is deprecated" oldFoo;
|
||||
# }
|
||||
#
|
||||
# TODO: figure out a clever way to integrate location information from
|
||||
# something like __unsafeGetAttrPos.
|
||||
|
||||
Usage:
|
||||
{
|
||||
foo = lib.warn "foo is deprecated" oldFoo;
|
||||
}
|
||||
|
||||
TODO: figure out a clever way to integrate location information from
|
||||
something like __unsafeGetAttrPos.
|
||||
*/
|
||||
warn = msg: builtins.trace "WARNING: ${msg}";
|
||||
info = msg: builtins.trace "INFO: ${msg}";
|
||||
|
||||
|
@ -495,6 +495,11 @@
|
||||
github = "bennofs";
|
||||
name = "Benno Fünfstück";
|
||||
};
|
||||
benpye = {
|
||||
email = "ben@curlybracket.co.uk";
|
||||
github = "benpye";
|
||||
name = "Ben Pye";
|
||||
};
|
||||
benwbooth = {
|
||||
email = "benwbooth@gmail.com";
|
||||
github = "benwbooth";
|
||||
@ -4623,6 +4628,11 @@
|
||||
github = "wucke13";
|
||||
name = "Wucke";
|
||||
};
|
||||
wykurz = {
|
||||
email = "wykurz@gmail.com";
|
||||
github = "wykurz";
|
||||
name = "Mateusz Wykurz";
|
||||
};
|
||||
wyvie = {
|
||||
email = "elijahrum@gmail.com";
|
||||
github = "wyvie";
|
||||
|
@ -15,7 +15,7 @@ containers.database =
|
||||
{ config =
|
||||
{ config, pkgs, ... }:
|
||||
{ <xref linkend="opt-services.postgresql.enable"/> = true;
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql96;
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_9_6;
|
||||
};
|
||||
};
|
||||
</programlisting>
|
||||
|
@ -197,10 +197,10 @@ swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
|
||||
pkgs.emacs
|
||||
];
|
||||
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql90;
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_10;
|
||||
</programlisting>
|
||||
The latter option definition changes the default PostgreSQL package used
|
||||
by NixOS’s PostgreSQL service to 9.0. For more information on packages,
|
||||
by NixOS’s PostgreSQL service to 10.x. For more information on packages,
|
||||
including how to add new ones, see <xref linkend="sec-custom-packages"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -637,6 +637,11 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
||||
anyways for clarity.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Groups <literal>kvm</literal> and <literal>render</literal> are introduced now, as systemd requires them.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
@ -139,6 +139,21 @@
|
||||
make sure to update your configuration if you want to keep <literal>proglodyte-wasm</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
OpenSMTPD has been upgraded to version 6.4.0p1. This release makes
|
||||
backwards-incompatible changes to the configuration file format. See
|
||||
<command>man smtpd.conf</command> for more information on the new file
|
||||
format.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The versioned <varname>postgresql</varname> have been renamed to use
|
||||
underscore number seperators. For example, <varname>postgresql96</varname>
|
||||
has been renamed to <varname>postgresql_9_6</varname>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
@ -157,6 +172,15 @@
|
||||
Matomo version.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The deprecated <literal>truecrypt</literal> package has been removed
|
||||
and <literal>truecrypt</literal> attribute is now an alias for
|
||||
<literal>veracrypt</literal>. VeraCrypt is backward-compatible with
|
||||
TrueCrypt volumes. Note that <literal>cryptsetup</literal> also
|
||||
supports loading TrueCrypt volumes.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -53,7 +53,8 @@ in rec {
|
||||
inherit prefix check;
|
||||
modules = modules ++ extraModules ++ baseModules ++ [ pkgsModule ];
|
||||
args = extraArgs;
|
||||
specialArgs = { modulesPath = ../modules; } // specialArgs;
|
||||
specialArgs =
|
||||
{ modulesPath = builtins.toString ../modules; } // specialArgs;
|
||||
}) config options;
|
||||
|
||||
# These are the extra arguments passed to every module. In
|
||||
|
@ -250,7 +250,8 @@ sub connect {
|
||||
$self->start;
|
||||
|
||||
local $SIG{ALRM} = sub { die "timed out waiting for the VM to connect\n"; };
|
||||
alarm 300;
|
||||
# 50 minutes -- increased as a test, see #49441
|
||||
alarm 3000;
|
||||
readline $self->{socket} or die "the VM quit before connecting\n";
|
||||
alarm 0;
|
||||
|
||||
|
@ -22,4 +22,42 @@ with lib;
|
||||
|
||||
powerManagement.enable = false;
|
||||
system.stateVersion = mkDefault "18.03";
|
||||
|
||||
installer.cloneConfigExtra = ''
|
||||
# Let demo build as a trusted user.
|
||||
# nix.trustedUsers = [ "demo" ];
|
||||
|
||||
# Mount a VirtualBox shared folder.
|
||||
# This is configurable in the VirtualBox menu at
|
||||
# Machine / Settings / Shared Folders.
|
||||
# fileSystems."/mnt" = {
|
||||
# fsType = "vboxsf";
|
||||
# device = "nameofdevicetomount";
|
||||
# options = [ "rw" ];
|
||||
# };
|
||||
|
||||
# By default, the NixOS VirtualBox demo image includes SDDM and Plasma.
|
||||
# If you prefer another desktop manager or display manager, you may want
|
||||
# to disable the default.
|
||||
# services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
|
||||
# services.xserver.displayManager.sddm.enable = lib.mkForce false;
|
||||
|
||||
# Enable GDM/GNOME by uncommenting above two lines and two lines below.
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
# services.xserver.desktopManager.gnome3.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# \$ nix search wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# wget vim
|
||||
# ];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
system.stateVersion = mkDefault "18.03";
|
||||
'';
|
||||
}
|
||||
|
@ -126,6 +126,7 @@
|
||||
./programs/udevil.nix
|
||||
./programs/venus.nix
|
||||
./programs/vim.nix
|
||||
./programs/wavemon.nix
|
||||
./programs/way-cooler.nix
|
||||
./programs/wireshark.nix
|
||||
./programs/xfs_quota.nix
|
||||
|
@ -48,6 +48,8 @@ let
|
||||
|
||||
{
|
||||
imports = [ ${toString config.installer.cloneConfigIncludes} ];
|
||||
|
||||
${config.installer.cloneConfigExtra}
|
||||
}
|
||||
'';
|
||||
|
||||
@ -73,6 +75,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
installer.cloneConfigExtra = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
Extra text to include in the cloned configuration.nix included in this
|
||||
installer.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -63,7 +63,7 @@ with lib;
|
||||
# Tell the Nix evaluator to garbage collect more aggressively.
|
||||
# This is desirable in memory-constrained environments that don't
|
||||
# (yet) have swap set up.
|
||||
environment.variables.GC_INITIAL_HEAP_SIZE = "100000";
|
||||
environment.variables.GC_INITIAL_HEAP_SIZE = "1M";
|
||||
|
||||
# Make the installer more likely to succeed in low memory
|
||||
# environments. The kernel's overcommit heustistics bite us
|
||||
|
28
nixos/modules/programs/wavemon.nix
Normal file
28
nixos/modules/programs/wavemon.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.wavemon;
|
||||
in {
|
||||
options = {
|
||||
programs.wavemon = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to add wavemon to the global environment and configure a
|
||||
setcap wrapper for it.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ wavemon ];
|
||||
security.wrappers.wavemon = {
|
||||
source = "${pkgs.wavemon}/bin/wavemon";
|
||||
capabilities = "cap_net_admin+ep";
|
||||
};
|
||||
};
|
||||
}
|
@ -20,7 +20,6 @@ with lib;
|
||||
KERNEL=="random", TAG+="systemd"
|
||||
SUBSYSTEM=="cpu", ENV{MODALIAS}=="cpu:type:x86,*feature:*009E*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
|
||||
KERNEL=="hw_random", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
|
||||
${if config.services.tcsd.enable then "" else ''KERNEL=="tpm0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"''}
|
||||
'';
|
||||
|
||||
systemd.services.rngd = {
|
||||
@ -30,8 +29,7 @@ with lib;
|
||||
|
||||
description = "Hardware RNG Entropy Gatherer Daemon";
|
||||
|
||||
serviceConfig.ExecStart = "${pkgs.rng-tools}/sbin/rngd -f -v" +
|
||||
(if config.services.tcsd.enable then " --no-tpm=1" else "");
|
||||
serviceConfig.ExecStart = "${pkgs.rng-tools}/sbin/rngd -f -v";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ in
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
};
|
||||
restartTriggers = [
|
||||
config.environment.etc."salt/master".source
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,6 @@ let
|
||||
# Default is in /etc/salt/pki/minion
|
||||
pki_dir = "/var/lib/salt/pki/minion";
|
||||
} cfg.configuration;
|
||||
configDir = pkgs.writeTextDir "minion" (builtins.toJSON fullConfig);
|
||||
|
||||
in
|
||||
|
||||
@ -28,15 +27,24 @@ in
|
||||
default = {};
|
||||
description = ''
|
||||
Salt minion configuration as Nix attribute set.
|
||||
See <link xlink:href="https://docs.saltstack.com/en/latest/ref/configuration/minion.html"/>
|
||||
for details.
|
||||
See <link xlink:href="https://docs.saltstack.com/en/latest/ref/configuration/minion.html"/>
|
||||
for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ salt ];
|
||||
environment = {
|
||||
# Set this up in /etc/salt/minion so `salt-call`, etc. work.
|
||||
# The alternatives are
|
||||
# - passing --config-dir to all salt commands, not just the minion unit,
|
||||
# - setting aglobal environment variable.
|
||||
etc."salt/minion".source = pkgs.writeText "minion" (
|
||||
builtins.toJSON fullConfig
|
||||
);
|
||||
systemPackages = with pkgs; [ salt ];
|
||||
};
|
||||
systemd.services.salt-minion = {
|
||||
description = "Salt Minion";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -45,11 +53,14 @@ in
|
||||
utillinux
|
||||
];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.salt}/bin/salt-minion --config-dir=${configDir}";
|
||||
ExecStart = "${pkgs.salt}/bin/salt-minion";
|
||||
LimitNOFILE = 8192;
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
};
|
||||
restartTriggers = [
|
||||
config.environment.etc."salt/minion".source
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ in
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
example = literalExample "pkgs.postgresql96";
|
||||
example = literalExample "pkgs.postgresql_9_6";
|
||||
description = ''
|
||||
PostgreSQL package to use.
|
||||
'';
|
||||
@ -118,7 +118,7 @@ in
|
||||
extraPlugins = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
example = literalExample "[ (pkgs.postgis.override { postgresql = pkgs.postgresql94; }) ]";
|
||||
example = literalExample "[ (pkgs.postgis.override { postgresql = pkgs.postgresql_9_4; }) ]";
|
||||
description = ''
|
||||
When this list contains elements a new store path is created.
|
||||
PostgreSQL and the elements are symlinked into it. Then pg_config,
|
||||
@ -167,9 +167,9 @@ in
|
||||
# Note: when changing the default, make it conditional on
|
||||
# ‘system.stateVersion’ to maintain compatibility with existing
|
||||
# systems!
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql96
|
||||
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql95
|
||||
else pkgs.postgresql94);
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
|
||||
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5
|
||||
else pkgs.postgresql_9_4);
|
||||
|
||||
services.postgresql.dataDir =
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
|
||||
|
@ -27,12 +27,12 @@
|
||||
<filename>configuration.nix</filename>:
|
||||
<programlisting>
|
||||
<xref linkend="opt-services.postgresql.enable"/> = true;
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql94;
|
||||
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_9_4;
|
||||
</programlisting>
|
||||
Note that you are required to specify the desired version of PostgreSQL
|
||||
(e.g. <literal>pkgs.postgresql94</literal>). Since upgrading your PostgreSQL
|
||||
version requires a database dump and reload (see below), NixOS cannot
|
||||
provide a default value for
|
||||
(e.g. <literal>pkgs.postgresql_9_4</literal>). Since upgrading your
|
||||
PostgreSQL version requires a database dump and reload (see below), NixOS
|
||||
cannot provide a default value for
|
||||
<xref linkend="opt-services.postgresql.package"/> such as the most recent
|
||||
release of PostgreSQL.
|
||||
</para>
|
||||
|
@ -56,6 +56,32 @@ in
|
||||
{ Type = "dbus";
|
||||
BusName = "org.freedesktop.UPower";
|
||||
ExecStart = "@${cfg.package}/libexec/upowerd upowerd";
|
||||
Restart = "on-failure";
|
||||
# Upstream lockdown:
|
||||
# Filesystem lockdown
|
||||
ProtectSystem = "strict";
|
||||
# Needed by keyboard backlight support
|
||||
ProtectKernelTunables = false;
|
||||
ProtectControlGroups = true;
|
||||
ReadWritePaths = "/var/lib/upower";
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
|
||||
# Network
|
||||
# PrivateNetwork=true would block udev's netlink socket
|
||||
RestrictAddressFamilies = "AF_UNIX AF_NETLINK";
|
||||
|
||||
# Execute Mappings
|
||||
MemoryDenyWriteExecute = true;
|
||||
|
||||
# Modules
|
||||
ProtectKernelModules = true;
|
||||
|
||||
# Real-time
|
||||
RestrictRealtime = true;
|
||||
|
||||
# Privilege escalation
|
||||
NoNewPrivileges = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
|
||||
purple_plugin_path =
|
||||
lib.concatMapStringsSep ":"
|
||||
(plugin: "${plugin}/lib/pidgin/")
|
||||
(plugin: "${plugin}/lib/pidgin/:${plugin}/lib/purple-2/")
|
||||
cfg.libpurple_plugins
|
||||
;
|
||||
|
||||
|
@ -46,7 +46,7 @@ let
|
||||
|
||||
configFile = pkgs.writeText "nginx.conf" ''
|
||||
user ${cfg.user} ${cfg.group};
|
||||
error_log stderr;
|
||||
error_log ${cfg.logError};
|
||||
daemon off;
|
||||
|
||||
${cfg.config}
|
||||
@ -341,6 +341,35 @@ in
|
||||
";
|
||||
};
|
||||
|
||||
logError = mkOption {
|
||||
default = "stderr";
|
||||
description = "
|
||||
Configures logging.
|
||||
The first parameter defines a file that will store the log. The
|
||||
special value stderr selects the standard error file. Logging to
|
||||
syslog can be configured by specifying the “syslog:” prefix.
|
||||
The second parameter determines the level of logging, and can be
|
||||
one of the following: debug, info, notice, warn, error, crit,
|
||||
alert, or emerg. Log levels above are listed in the order of
|
||||
increasing severity. Setting a certain log level will cause all
|
||||
messages of the specified and more severe log levels to be logged.
|
||||
If this parameter is omitted then error is used.
|
||||
";
|
||||
};
|
||||
|
||||
preStart = mkOption {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
test -d ${cfg.stateDir}/logs || mkdir -m 750 -p ${cfg.stateDir}/logs
|
||||
test `stat -c %a ${cfg.stateDir}` = "750" || chmod 750 ${cfg.stateDir}
|
||||
test `stat -c %a ${cfg.stateDir}/logs` = "750" || chmod 750 ${cfg.stateDir}/logs
|
||||
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
|
||||
'';
|
||||
description = "
|
||||
Shell commands executed before the service's nginx is started.
|
||||
";
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
@ -608,9 +637,7 @@ in
|
||||
stopIfChanged = false;
|
||||
preStart =
|
||||
''
|
||||
mkdir -p ${cfg.stateDir}/logs
|
||||
chmod 700 ${cfg.stateDir}
|
||||
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
|
||||
${cfg.preStart}
|
||||
${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir} -t
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
@ -387,7 +387,7 @@ let
|
||||
|
||||
logindHandlerType = types.enum [
|
||||
"ignore" "poweroff" "reboot" "halt" "kexec" "suspend"
|
||||
"hibernate" "hybrid-sleep" "lock"
|
||||
"hibernate" "hybrid-sleep" "suspend-then-hibernate" "lock"
|
||||
];
|
||||
|
||||
in
|
||||
@ -587,6 +587,15 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
services.journald.forwardToSyslog = mkOption {
|
||||
default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
|
||||
defaultText = "config.services.rsyslogd.enable || config.services.syslog-ng.enable";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to forward log messages to syslog.
|
||||
'';
|
||||
};
|
||||
|
||||
services.logind.extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
@ -754,6 +763,9 @@ in
|
||||
ForwardToConsole=yes
|
||||
TTYPath=${config.services.journald.console}
|
||||
''}
|
||||
${optionalString (config.services.journald.forwardToSyslog) ''
|
||||
ForwardToSyslog=yes
|
||||
''}
|
||||
${config.services.journald.extraConfig}
|
||||
'';
|
||||
|
||||
|
@ -606,7 +606,7 @@ in
|
||||
{ config =
|
||||
{ config, pkgs, ... }:
|
||||
{ services.postgresql.enable = true;
|
||||
services.postgresql.package = pkgs.postgresql96;
|
||||
services.postgresql.package = pkgs.postgresql_9_6;
|
||||
|
||||
system.stateVersion = "17.03";
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ in {
|
||||
virtualbox = {
|
||||
baseImageSize = mkOption {
|
||||
type = types.int;
|
||||
default = 10 * 1024;
|
||||
default = 50 * 1024;
|
||||
description = ''
|
||||
The size of the VirtualBox base image in MiB.
|
||||
'';
|
||||
@ -61,7 +61,7 @@ in {
|
||||
export HOME=$PWD
|
||||
export PATH=${pkgs.virtualbox}/bin:$PATH
|
||||
|
||||
echo "creating VirtualBox pass-through disk wrapper (no copying invovled)..."
|
||||
echo "creating VirtualBox pass-through disk wrapper (no copying involved)..."
|
||||
VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk $diskImage
|
||||
|
||||
echo "creating VirtualBox VM..."
|
||||
@ -72,9 +72,9 @@ in {
|
||||
--memory ${toString cfg.memorySize} --acpi on --vram 32 \
|
||||
${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \
|
||||
--nictype1 virtio --nic1 nat \
|
||||
--audiocontroller ac97 --audio alsa \
|
||||
--audiocontroller ac97 --audio alsa --audioout on \
|
||||
--rtcuseutc on \
|
||||
--usb on --mouse usbtablet
|
||||
--usb on --usbehci on --mouse usbtablet
|
||||
VBoxManage storagectl "$vmName" --name SATA --add sata --portcount 4 --bootable on --hostiocache on
|
||||
VBoxManage storageattach "$vmName" --storagectl SATA --port 0 --device 0 --type hdd \
|
||||
--medium disk.vmdk
|
||||
@ -82,7 +82,7 @@ in {
|
||||
echo "exporting VirtualBox VM..."
|
||||
mkdir -p $out
|
||||
fn="$out/${cfg.vmFileName}"
|
||||
VBoxManage export "$vmName" --output "$fn"
|
||||
VBoxManage export "$vmName" --output "$fn" --options manifest
|
||||
|
||||
rm -v $diskImage
|
||||
|
||||
|
@ -399,6 +399,7 @@ in rec {
|
||||
tests.radicale = callTest tests/radicale.nix {};
|
||||
tests.redmine = callTest tests/redmine.nix {};
|
||||
tests.rspamd = callSubTests tests/rspamd.nix {};
|
||||
tests.rsyslogd = callSubTests tests/rsyslogd.nix {};
|
||||
tests.runInMachine = callTest tests/run-in-machine.nix {};
|
||||
tests.rxe = callTest tests/rxe.nix {};
|
||||
tests.samba = callTest tests/samba.nix {};
|
||||
@ -467,7 +468,7 @@ in rec {
|
||||
{ services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "foo@example.org";
|
||||
services.postgresql.enable = true;
|
||||
services.postgresql.package = pkgs.postgresql93;
|
||||
services.postgresql.package = pkgs.postgresql_9_3;
|
||||
environment.systemPackages = [ pkgs.php ];
|
||||
});
|
||||
};
|
||||
|
@ -74,7 +74,6 @@ in {
|
||||
print "$log\n";
|
||||
|
||||
# Check that no errors were logged
|
||||
# The timer can get out of sync due to Hydra's load, so this error is ignored
|
||||
$hass->fail("cat ${configDir}/home-assistant.log | grep -vF 'Timer got out of sync' | grep -qF ERROR");
|
||||
$hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR");
|
||||
'';
|
||||
})
|
||||
|
@ -17,11 +17,12 @@ import ./make-test.nix {
|
||||
extraServerArgs = [ "-v" ];
|
||||
serverConfiguration = ''
|
||||
listen on 0.0.0.0
|
||||
action do_relay relay
|
||||
# DO NOT DO THIS IN PRODUCTION!
|
||||
# Setting up authentication requires a certificate which is painful in
|
||||
# a test environment, but THIS WOULD BE DANGEROUS OUTSIDE OF A
|
||||
# WELL-CONTROLLED ENVIRONMENT!
|
||||
accept from any for any relay
|
||||
match from any for any action do_relay
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -41,8 +42,9 @@ import ./make-test.nix {
|
||||
extraServerArgs = [ "-v" ];
|
||||
serverConfiguration = ''
|
||||
listen on 0.0.0.0
|
||||
accept from any for local deliver to mda \
|
||||
action dovecot_deliver mda \
|
||||
"${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}"
|
||||
match from any for local action dovecot_deliver
|
||||
'';
|
||||
};
|
||||
services.dovecot2 = {
|
||||
|
@ -26,31 +26,20 @@ import ./make-test.nix ({ pkgs, ...} :
|
||||
services.xserver.displayManager.sddm.theme = "breeze-ocr-theme";
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
services.xserver.desktopManager.default = "plasma5";
|
||||
services.xserver.displayManager.sddm.autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
virtualisation.memorySize = 1024;
|
||||
environment.systemPackages = [ sddm_theme ];
|
||||
|
||||
# fontconfig-penultimate-0.3.3 -> 0.3.4 broke OCR apparently, but no idea why.
|
||||
nixpkgs.config.packageOverrides = superPkgs: {
|
||||
fontconfig-penultimate = superPkgs.fontconfig-penultimate.override {
|
||||
version = "0.3.3";
|
||||
sha256 = "1z76jbkb0nhf4w7fy647yyayqr4q02fgk6w58k0yi700p0m3h4c9";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
xdo = "${pkgs.xdotool}/bin/xdotool";
|
||||
in ''
|
||||
startAll;
|
||||
# Wait for display manager to start
|
||||
$machine->waitForText(qr/${user.description}/);
|
||||
$machine->screenshot("sddm");
|
||||
|
||||
# Log in
|
||||
$machine->sendChars("${user.password}\n");
|
||||
# wait for log in
|
||||
$machine->waitForFile("/home/alice/.Xauthority");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
|
||||
|
@ -9,7 +9,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = let mypg = pkgs.postgresql100; in {
|
||||
services.postgresql = let mypg = pkgs.postgresql_11; in {
|
||||
enable = true;
|
||||
package = mypg;
|
||||
extraPlugins = [ (pkgs.postgis.override { postgresql = mypg; }) ];
|
||||
|
38
nixos/tests/rsyslogd.nix
Normal file
38
nixos/tests/rsyslogd.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ system ? builtins.currentSystem }:
|
||||
|
||||
with import ../lib/testing.nix { inherit system; };
|
||||
with pkgs.lib;
|
||||
{
|
||||
test1 = makeTest {
|
||||
name = "rsyslogd-test1";
|
||||
meta.maintainers = [ maintainers.aanderse ];
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
{ services.rsyslogd.enable = true;
|
||||
services.journald.forwardToSyslog = false;
|
||||
};
|
||||
|
||||
# ensure rsyslogd isn't receiving messages from journald if explicitly disabled
|
||||
testScript = ''
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->fail("test -f /var/log/messages");
|
||||
'';
|
||||
};
|
||||
|
||||
test2 = makeTest {
|
||||
name = "rsyslogd-test2";
|
||||
meta.maintainers = [ maintainers.aanderse ];
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
{ services.rsyslogd.enable = true;
|
||||
};
|
||||
|
||||
# ensure rsyslogd is receiving messages from journald
|
||||
testScript = ''
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->succeed("test -f /var/log/messages");
|
||||
'';
|
||||
};
|
||||
}
|
@ -90,5 +90,5 @@ rec {
|
||||
parity-beta = callPackage ./parity/beta.nix { };
|
||||
parity-ui = callPackage ./parity-ui { };
|
||||
|
||||
particl-core = callPackage ./particl/particl-core.nix { boost = boost165; miniupnpc = miniupnpc_2; };
|
||||
particl-core = callPackage ./particl/particl-core.nix { miniupnpc = miniupnpc_2; };
|
||||
}
|
||||
|
@ -10,31 +10,40 @@
|
||||
, zeromq
|
||||
, zlib
|
||||
, unixtools
|
||||
, python3
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "particl-core-${version}";
|
||||
version = "0.16.2.0";
|
||||
version = "0.17.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/particl/particl-core/archive/v${version}.tar.gz";
|
||||
sha256 = "1d2vvg7avlhsg0rcpd5pbzafnk1w51a2y29xjjkpafi6iqs2l617";
|
||||
sha256 = "0bkxdayl0jrfhgz8qzqqpwzv0yavz3nwsn6c8k003jnbcw65fkhx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [
|
||||
openssl db48 boost zlib miniupnpc libevent zeromq
|
||||
unixtools.hexdump
|
||||
buildInputs = [ openssl db48 boost zlib miniupnpc libevent zeromq unixtools.hexdump python3 ];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-bench"
|
||||
"--with-boost-libdir=${boost.out}/lib"
|
||||
] ++ optionals (!doCheck) [
|
||||
"--enable-tests=no"
|
||||
];
|
||||
|
||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
|
||||
# Always check during Hydra builds
|
||||
doCheck = true;
|
||||
preCheck = "patchShebangs test";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Privacy-Focused Marketplace & Decentralized Application Platform";
|
||||
longDescription= ''
|
||||
An open source, decentralized privacy platform built for global person to person eCommerce.
|
||||
RPC daemon and CLI client only.
|
||||
'';
|
||||
homepage = https://particl.io/;
|
||||
maintainers = with maintainers; [ demyanrogozhin ];
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ stdenv, fetchFromGitHub, fetchurl, makeWrapper, unzip
|
||||
, gnumake, gcc-arm-embedded, dfu-util-axoloti, jdk, ant, libfaketime }:
|
||||
, gnumake, gcc-arm-embedded, binutils-arm-embedded
|
||||
, dfu-util-axoloti, jdk, ant, libfaketime }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.12-2";
|
||||
@ -20,7 +21,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0lb5s8pkj80mqhsy47mmq0lqk34s2a2m3xagzihalvabwd0frhlj";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper unzip gcc-arm-embedded dfu-util-axoloti jdk ant libfaketime ];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
unzip
|
||||
gcc-arm-embedded
|
||||
binutils-arm-embedded
|
||||
dfu-util-axoloti
|
||||
ant
|
||||
];
|
||||
buildInputs = [jdk libfaketime ];
|
||||
|
||||
patchPhase = ''
|
||||
unzip ${chibios}
|
||||
|
@ -18,9 +18,9 @@ let
|
||||
sha256Hash = "0bg1h0msd6mpkvirkg4pssa1ak32smv2rlxxsjdm3p29p8gg59px";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "3.4.0.0"; # "Android Studio 3.4 Canary 1"
|
||||
build = "182.5070326";
|
||||
sha256Hash = "03h2yns8s9dqbbc9agxhidpmziy9g3z89nm3byydw43hdz54hxab";
|
||||
version = "3.4.0.1"; # "Android Studio 3.4 Canary 2"
|
||||
build = "183.5081642";
|
||||
sha256Hash = "0ck6habkgnwbr10pr3bfy8ywm3dsm21k9jdj7g685v22sw0zy3yk";
|
||||
};
|
||||
in rec {
|
||||
# Old alias
|
||||
|
@ -289,12 +289,12 @@ in
|
||||
|
||||
idea-community = buildIdea rec {
|
||||
name = "idea-community-${version}";
|
||||
version = "2018.2.4"; /* updated by script */
|
||||
version = "2018.2.5"; /* 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 = "1syrxkp4pk95bvx02g2hg0mvn36w098h82k0qv0j6aqv0sidfzjy"; /* updated by script */
|
||||
sha256 = "0jnnmhn1gba670q2yprlh3ypa6k21pbg91pshz9aqkdhhmzk4759"; /* 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 = "2018.2.4"; /* updated by script */
|
||||
version = "2018.2.5"; /* 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-jdk.tar.gz";
|
||||
sha256 = "0z1ga6lzmkn7y7y24984vmp3ilrfc1ak1ddcgsdkwkiq5bx67ck8"; /* updated by script */
|
||||
sha256 = "105mzbqm3bx05bmkwyfykz76bzgzzgb9hb6wcagb9fv7dvqyggg6"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-idea";
|
||||
update-channel = "IntelliJ IDEA Release";
|
||||
|
@ -6,7 +6,7 @@
|
||||
let
|
||||
verMajor = "1";
|
||||
verMinor = "1";
|
||||
verPatch = "456";
|
||||
verPatch = "463";
|
||||
version = "${verMajor}.${verMinor}.${verPatch}";
|
||||
ginVer = "1.5";
|
||||
gwtVer = "2.7.0";
|
||||
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "rstudio";
|
||||
repo = "rstudio";
|
||||
rev = "v${version}";
|
||||
sha256 = "0hv07qrbjwapbjrkddasglsgk0x5j7qal468i5rv77krsp09s4fz";
|
||||
sha256 = "014g984znsczzy1fyn9y1ly3rbsngryfs674lfgciz60mqnl8im6";
|
||||
};
|
||||
|
||||
# Hack RStudio to only use the input R.
|
||||
|
@ -4,13 +4,13 @@ with python3.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "thonny";
|
||||
version = "3.0.1";
|
||||
version = "3.0.5";
|
||||
|
||||
src = fetchFromBitbucket {
|
||||
owner = "plas";
|
||||
repo = pname;
|
||||
rev = "f66bd266deda11534561a01ede53cf1b71d2c3c0";
|
||||
sha256 = "0mjskb0gyddybvlbhm10ch1rwzvmci95b018x67bh67bybdl4hm7";
|
||||
rev = "e5a1ad4ae9d24066a769489b1e168b4bd6e00b03";
|
||||
sha256 = "1lrl5pj9dpw9i5ij863hd47gfd15nmvglqkl2ldwgfn7kgpsdkz5";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
|
@ -13,8 +13,8 @@ let
|
||||
else throw "ImageMagick is not supported on this platform.";
|
||||
|
||||
cfg = {
|
||||
version = "7.0.8-12";
|
||||
sha256 = "0rq7qhbfsxvclazi1l6kqi4wqsph7hmzcjbh2pmf0276mrkgm7cd";
|
||||
version = "7.0.8-14";
|
||||
sha256 = "0pbrmzsjc8l4klfsz739rnmw61m712r82ryjl8ycvbxdzxwnwm9v";
|
||||
patches = [];
|
||||
};
|
||||
in
|
||||
|
@ -8,13 +8,13 @@ assert useUnrar -> unrar != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ahoviewer-${version}";
|
||||
version = "1.5.0";
|
||||
version = "1.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ahodesuka";
|
||||
repo = "ahoviewer";
|
||||
rev = version;
|
||||
sha256 = "1adzxp30fwh41y339ha8i5qp89zf21dw18vcicqqnzvyxbk5r3ig";
|
||||
sha256 = "144jmk8w7dnmqy4w81b3kzama7i97chx16pgax2facn72a92921q";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -29,11 +29,6 @@ stdenv.mkDerivation rec {
|
||||
gst_all_1.gst-plugins-base
|
||||
] ++ stdenv.lib.optional useUnrar unrar;
|
||||
|
||||
# https://github.com/ahodesuka/ahoviewer/issues/60
|
||||
# Already fixed in the master branch
|
||||
# TODO: remove this next release
|
||||
makeFlags = [ ''LIBS=-lssl -lcrypto'' ];
|
||||
|
||||
postPatch = ''patchShebangs version.sh'';
|
||||
|
||||
postInstall = ''
|
||||
|
@ -1,23 +1,24 @@
|
||||
{ stdenv, makeDesktopItem, fetchurl, unzip
|
||||
, gdk_pixbuf, glib, gtk2, atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsaLib, cups, expat, udev, gnome2
|
||||
, xorg, mozjpeg
|
||||
, gdk_pixbuf, glib, gtk3, atk, at-spi2-atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsaLib, cups, expat, udev, gnome3
|
||||
, xorg, mozjpeg, makeWrapper, gsettings-desktop-schemas
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "avocode-${version}";
|
||||
version = "3.4.0";
|
||||
version = "3.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
|
||||
sha256 = "1dk4vgam9r5nl8dvpfwrn52gq6r4zxs4zz63p3c4gk73d8qnh4dl";
|
||||
sha256 = "1slxxr3j0djqdnbk645sriwl99jp9imndyxiwd8aqggmmlp145a2";
|
||||
};
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath (with xorg; with gnome2; [
|
||||
libPath = stdenv.lib.makeLibraryPath (with xorg; with gnome3; [
|
||||
stdenv.cc.cc.lib
|
||||
gdk_pixbuf
|
||||
glib
|
||||
gtk2
|
||||
gtk3
|
||||
atk
|
||||
at-spi2-atk
|
||||
pango
|
||||
cairo
|
||||
freetype
|
||||
@ -29,7 +30,6 @@ stdenv.mkDerivation rec {
|
||||
cups
|
||||
expat
|
||||
udev
|
||||
GConf
|
||||
libX11
|
||||
libxcb
|
||||
libXi
|
||||
@ -54,7 +54,8 @@ stdenv.mkDerivation rec {
|
||||
comment = "The bridge between designers and developers";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
buildInputs = [ unzip gtk3 gsettings-desktop-schemas];
|
||||
|
||||
# src is producing multiple folder on unzip so we must
|
||||
# override unpackCmd to extract it into newly created folder
|
||||
@ -85,6 +86,10 @@ stdenv.mkDerivation rec {
|
||||
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
||||
patchelf --set-rpath ${libPath}:$out/ $file
|
||||
done
|
||||
for file in $out/bin/*; do
|
||||
wrapProgram $file \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
|
||||
done
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
mkDerivation rec {
|
||||
name = "krita-${version}";
|
||||
version = "4.1.3";
|
||||
version = "4.1.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.kde.org/stable/krita/${version}/${name}.tar.gz";
|
||||
sha256 = "0d546dxs552z0pxnaka1jm7ksravw17f777wf593z0pl4ds8dgdx";
|
||||
sha256 = "1by8p8ifdp03f05bhg8ygdd1j036anfpjjnzbx63l2fbmy9k6q10";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, unzip, mono, avrbinutils, avrgcc, avrdude, gtk2, xdg_utils }:
|
||||
{ stdenv, fetchurl, unzip, mono, avrdude, gtk2, xdg_utils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "avrdudess-2.2.20140102";
|
||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk2 mono]}"
|
||||
# We need PATH from user env for xdg-open to find its tools, which
|
||||
# typically depend on the currently running desktop environment.
|
||||
export PATH="${stdenv.lib.makeBinPath [ avrgcc avrbinutils avrdude xdg_utils ]}:\$PATH"
|
||||
export PATH="${stdenv.lib.makeBinPath [ avrdude xdg_utils ]}:\$PATH"
|
||||
|
||||
# avrdudess must have its resource files in its current working directory
|
||||
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, aalib, ncurses, xorg, libmikmod }:
|
||||
{ stdenv, lib, fetchurl, darwin, aalib, ncurses, xorg, libmikmod }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bb-${version}";
|
||||
@ -12,13 +12,17 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
aalib ncurses libmikmod
|
||||
xorg.libXau xorg.libXdmcp xorg.libX11
|
||||
];
|
||||
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudio;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i -e '/^#include <malloc.h>$/d' *.c
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://aa-project.sourceforge.net/bb;
|
||||
description = "AA-lib demo";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.rnhmjoj ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dmrconfig-${version}";
|
||||
version = "2018-10-20";
|
||||
version = "2018-10-29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sergev";
|
||||
repo = "dmrconfig";
|
||||
rev = "a4c5f893d2749727493427320c7f01768966ba51";
|
||||
sha256 = "0h7hv6fv6v5g922nvgrb0w7hsqbhaw7xmdc6vydh2p3l7sp31vg2";
|
||||
rev = "4924d00283c3c81a4b8251669e42aecd96b6145a";
|
||||
sha256 = "00a4hmbr71g0d4faskb8q96y6z212g2r4n533yvp88z8rq8vbxxn";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -18,7 +18,7 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
|
||||
sha256 = "022iw4cq0c009wvqn7wd815jc0nv8198lq3cawn8h6c28hw2mhs1";
|
||||
sha256 = "139kzapas1l61w1in9f7c6ybricid4fzryfnvsrfhpaqh83ydn2c";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "hugo-${version}";
|
||||
version = "0.47.1";
|
||||
version = "0.49.2";
|
||||
|
||||
goPackagePath = "github.com/gohugoio/hugo";
|
||||
|
||||
@ -10,7 +10,7 @@ buildGoPackage rec {
|
||||
owner = "gohugoio";
|
||||
repo = "hugo";
|
||||
rev = "v${version}";
|
||||
sha256 = "0n27vyg66jfx4lwswsmdlybly8c9gy5rk7yhy7wzs3rwzlqv1jzj";
|
||||
sha256 = "0a320mv6x770vppbz0aw5ikywmy0mxqq1lhc0syp48hgg42d46is";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
421
pkgs/applications/misc/hugo/deps.nix
generated
421
pkgs/applications/misc/hugo/deps.nix
generated
@ -1,488 +1,721 @@
|
||||
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
|
||||
[
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/BurntSushi/locker";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/BurntSushi/locker";
|
||||
rev = "a6e239ea1c69bff1cfdb20c4b73dadf52f784b6a";
|
||||
rev = "a6e239ea1c69";
|
||||
sha256 = "1xak4aync4klswq5217qvw191asgla51jr42y94vp109lirm5dzg";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/BurntSushi/toml";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/BurntSushi/toml";
|
||||
rev = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005";
|
||||
sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
|
||||
rev = "a368813c5e64";
|
||||
sha256 = "1sjxs2lwc8jpln80s4rlzp7nprbcljhy5mz4rf9995gq93wqnym5";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/PuerkitoBio/purell";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/PuerkitoBio/purell";
|
||||
rev = "975f53781597ed779763b7b65566e74c4004d8de";
|
||||
sha256 = "1j5l793zxrjv09z3cdgs05qn45sbhbm9njsw5cfv168x8z88pd3l";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "0vsxyn1fbm7g873b8kf3hcsgqgncb5nmfq3zfsc35a9yhzarka91";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/PuerkitoBio/urlesc";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/PuerkitoBio/urlesc";
|
||||
rev = "de5bf2ad457846296e2031421a34e2568e304e35";
|
||||
rev = "de5bf2ad4578";
|
||||
sha256 = "0n0srpqwbaan1wrhh2b7ysz543pjs1xw2rghvqyffg9l0g8kzgcw";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/assert";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/assert";
|
||||
rev = "405dbfeb8e38";
|
||||
sha256 = "1l567pi17k593nrd1qlbmiq8z9jy3qs60px2a16fdpzjsizwqx8l";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/chroma";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/chroma";
|
||||
rev = "5d7fef2ae60b501bbf28d476c3f273b8017d8261";
|
||||
rev = "v0.5.0";
|
||||
sha256 = "150jv4vhsdi1gj3liwkgicdrwnzgv5qkq2fwznlnzf64vmfb0b9f";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/colour";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/colour";
|
||||
rev = "60882d9e2721";
|
||||
sha256 = "0iq566534gbzkd16ixg7fk298wd766821vvs80838yifx9yml5vs";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/repr";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/repr";
|
||||
rev = "117648cd9897";
|
||||
sha256 = "05v1rgzdqc8razf702laagrvhvx68xd9yxxmzd3dyz0d6425pdrp";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/bep/debounce";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/bep/debounce";
|
||||
rev = "844797fa1dd9ba969d71b62797ff19d1e49d4eac";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "1sh4zv0hv7f454mhzpl2mbv7ar5rm00wyy5qr78x1h84bgph87wy";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/bep/gitmap";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/bep/gitmap";
|
||||
rev = "ecb6fe06dbfd6bb4225e7fda7dc15612ecc8d960";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0zqdl5h4ayi2gi5aqf35f1sjszhbcriksm2bf84fkrg7ngr48jn6";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/bep/go-tocss";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/bep/go-tocss";
|
||||
rev = "2abb118dc8688b6c7df44e12f4152c2bded9b19c";
|
||||
rev = "v0.5.0";
|
||||
sha256 = "12q7h6nydklq4kg65kcgd85209rx7zf64ba6nf3k7y16knj4233q";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/chaseadamsio/goorgeous";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/chaseadamsio/goorgeous";
|
||||
rev = "dcf1ef873b8987bf12596fe6951c48347986eb2f";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "07qdqi46klizq3wigxqbiksnlgbrdc8hvmizgzg0aas5iqy88dcb";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/cpuguy83/go-md2man";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/cpuguy83/go-md2man";
|
||||
rev = "691ee98543af2f262f35fbb54bdd42f00b9b9cc5";
|
||||
sha256 = "1864g10y9n6ni0p1yqjhvwyjdh0lgxnf7dlb0c4njazdg5rppww9";
|
||||
rev = "v1.0.8";
|
||||
sha256 = "1w22dfdamsq63b5rvalh9k2y7rbwfkkjs7vm9vd4a13h2ql70lg2";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/danwakefield/fnmatch";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/danwakefield/fnmatch";
|
||||
rev = "cbb64ac3d964b81592e64f957ad53df015803288";
|
||||
rev = "cbb64ac3d964";
|
||||
sha256 = "0cbf511ppsa6hf59mdl7nbyn2b2n71y0bpkzbmfkdqjhanqh1lqz";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/davecgh/go-spew";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/davecgh/go-spew";
|
||||
rev = "v1.1.1";
|
||||
sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/disintegration/imaging";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/disintegration/imaging";
|
||||
rev = "0bd5694c78c9c3d9a3cd06a706a8f3c59296a9ac";
|
||||
rev = "v1.5.0";
|
||||
sha256 = "1laxccmzi7q51zxn81ringmdwp8iaipivrl375yc3gq56d70sp0r";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/dlclark/regexp2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/dlclark/regexp2";
|
||||
rev = "7632a260cbaf5e7594fc1544a503456ecd0827f1";
|
||||
sha256 = "0vhp5r0ywv9p1c74fm8xzclnwx2mg9f0764b3id7a9nwh0plisx2";
|
||||
rev = "v1.1.6";
|
||||
sha256 = "144s81ndviwhyy20ipxvvfvap8phv5p762glxrz6aqxprkxfarj5";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/eknkc/amber";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/eknkc/amber";
|
||||
rev = "cdade1c073850f4ffc70a829e31235ea6892853b";
|
||||
rev = "cdade1c07385";
|
||||
sha256 = "152w97yckwncgw7lwjvgd8d00wy6y0nxzlvx72kl7nqqxs9vhxd9";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/fortytw2/leaktest";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/fortytw2/leaktest";
|
||||
rev = "v1.2.0";
|
||||
sha256 = "1lf9l6zgzjbcc7hmcjhhg3blx0y8icyxvjmjqqwfbwdk502803ra";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/fsnotify/fsnotify";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/fsnotify/fsnotify";
|
||||
rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9";
|
||||
rev = "v1.4.7";
|
||||
sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gobuffalo/envy";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gobuffalo/envy";
|
||||
rev = "3c96536452167a705ca5a70b831d3810e1e10452";
|
||||
sha256 = "0ixqpdmb7kjlarkv0qlbwnbr194sajx9flysnhcldzmciqgk5bqs";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/gobwas/glob";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gobwas/glob";
|
||||
rev = "f756513aec94125582ee6c0dc94179251ef87370";
|
||||
sha256 = "1pyzlvb950864syf2safazv39s7rpi08r7x2vby82kj9ykqgvhc4";
|
||||
rev = "v0.2.3";
|
||||
sha256 = "0jxk1x806zn5x86342s72dq2qy64ksb3zrvrlgir2avjhwb18n6z";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/websocket";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/websocket";
|
||||
rev = "3ff3320c2a1756a3691521efc290b4701575147c";
|
||||
sha256 = "1b0kpix2qxv3qiiq739nk9fjh453if0mcpr9gmlizicdpjp5alw2";
|
||||
rev = "v1.4.0";
|
||||
sha256 = "00i4vb31nsfkzzk7swvx3i75r2d960js3dri1875vypk3v2s0pzk";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/hashicorp/go-immutable-radix";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/hashicorp/go-immutable-radix";
|
||||
rev = "7f3cd4390caab3250a57f30efdb2a65dd7649ecf";
|
||||
sha256 = "13nv1dac6i2mjdy8vsd4vwawwja78vggdjcnj1xfykg2k8jbkphv";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "1v3nmsnk1s8bzpclrhirz7iq0g5xxbw9q5gvrg9ss6w9crs72qr6";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/hashicorp/go-uuid";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/hashicorp/go-uuid";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "1jflywlani7583qm4ysph40hsgx3n66n5zr2k84i057fmwa1ypfy";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/hashicorp/golang-lru";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/hashicorp/golang-lru";
|
||||
rev = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3";
|
||||
sha256 = "0vg4yn3088ym4sj1d34kr13lp4v5gya7r2nxshp2bz70n46fsqn2";
|
||||
rev = "v0.5.0";
|
||||
sha256 = "12k2cp2k615fjvfa5hyb9k2alian77wivds8s65diwshwv41939f";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/hashicorp/hcl";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/hashicorp/hcl";
|
||||
rev = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168";
|
||||
sha256 = "1qalfsc31fra7hcw2lc3s20aj7al62fq3j5fn5kga3mg99b82nyr";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/inconshreveable/mousetrap";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/inconshreveable/mousetrap";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/jdkato/prose";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/jdkato/prose";
|
||||
rev = "99216ea17cba4e2f2a4e8bca778643e5a529b7aa";
|
||||
sha256 = "1mdh276lmj21jbi22ky8ngdsl9hfcdv6czshycbaiwjr5y9cv7bn";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "1gjqgrpc7wbqvnhgwyfhxng24qvx37qjy0x2mbikiw1vaygxqsmy";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/joho/godotenv";
|
||||
goPackagePath = "github.com/kr/pretty";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/joho/godotenv";
|
||||
rev = "1709ab122c988931ad53508747b3c061400c2984";
|
||||
sha256 = "1pym5lydb28ggxrz80q9s26bj2bd80ax1igm1zfhyhx9i3060kif";
|
||||
url = "https://github.com/kr/pretty";
|
||||
rev = "v0.1.0";
|
||||
sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/kr/pty";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/kr/pty";
|
||||
rev = "v1.1.1";
|
||||
sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/kr/text";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/kr/text";
|
||||
rev = "v0.1.0";
|
||||
sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/kyokomi/emoji";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/kyokomi/emoji";
|
||||
rev = "2e9a9507333f3ee28f3fab88c2c3aba34455d734";
|
||||
rev = "v1.5.1";
|
||||
sha256 = "005rxyxlqcd2sfjn686xb52l11wn2w0g5jv042ka6pnsx24r812a";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/magefile/mage";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/magefile/mage";
|
||||
rev = "v1.4.0";
|
||||
sha256 = "177hzmmzhk7bcm3jj2cj6d5l9h5ql3cikvndhk4agkslrhwr3xka";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/magiconair/properties";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/magiconair/properties";
|
||||
rev = "c2353362d570a7bfa228149c62842019201cfb71";
|
||||
rev = "v1.8.0";
|
||||
sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/markbates/inflect";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/markbates/inflect";
|
||||
rev = "84854b5b4c0dbb0c107480d480a71f7db1fc7dae";
|
||||
sha256 = "0b7shs0mxhkl7v7mwp799n7jgjsdbgi81f5hbaz2b936gbxksw7d";
|
||||
rev = "a12c3aec81a6";
|
||||
sha256 = "0mawr6z9nav4f5j0nmjdxg9lbfhr7wz8zi34g7b6wndmzyf8jbsd";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/mattn/go-isatty";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mattn/go-isatty";
|
||||
rev = "v0.0.4";
|
||||
sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/mattn/go-runewidth";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mattn/go-runewidth";
|
||||
rev = "ce7b0b5c7b45a81508558cd1dba6bb1e4ddb51bb";
|
||||
rev = "v0.0.3";
|
||||
sha256 = "0lc39b6xrxv7h3v3y1kgz49cgi5qxwlygs715aam6ba35m48yi7g";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/miekg/mmark";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/miekg/mmark";
|
||||
rev = "057eb9e3ae87944c038036d046101dec0c56e21f";
|
||||
sha256 = "0hlqcwx6qqgy3vs13r10wn0d9x0xmww1v9jm09y2dp1ykgbampnk";
|
||||
rev = "v1.3.6";
|
||||
sha256 = "0q2zrwa2vwk7a0zhmi000zpqrc01zssrj9c5n3573rg68fksg77m";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/mitchellh/hashstructure";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mitchellh/hashstructure";
|
||||
rev = "2bca23e0e452137f789efbc8610126fd8b94f73b";
|
||||
sha256 = "0vpacsls26474wya360fjhzi6l4y8s8s251c4szvqxh17n5f5gk1";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0zgl5c03ip2yzkb9b7fq9ml08i7j8prgd46ha1fcg8c6r7k9xl3i";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/mitchellh/mapstructure";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mitchellh/mapstructure";
|
||||
rev = "f15292f7a699fcc1a38a80977f80a046874ba8ac";
|
||||
sha256 = "0zm3nhdvmj3f8q0vg2sjfw1sm3pwsw0ggz501awz95w99664a8al";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0f06q4fpzg0c370cvmpsl0iq2apl5nkbz5cd3nba5x5ysmshv1lm";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/muesli/smartcrop";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/muesli/smartcrop";
|
||||
rev = "f6ebaa786a12a0fdb2d7c6dee72808e68c296464";
|
||||
rev = "f6ebaa786a12";
|
||||
sha256 = "0xbv5wbn0z36nkw9ay3ly6z23lpsrs0khryl1w54fz85lvwh66gp";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/nfnt/resize";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/nfnt/resize";
|
||||
rev = "83c6a9932646";
|
||||
sha256 = "005cpiwq28krbjf0zjwpfh63rp4s4is58700idn24fs3g7wdbwya";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/nicksnyder/go-i18n";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/nicksnyder/go-i18n";
|
||||
rev = "04f547cc50da4c144c5fdfd4495aef143637a236";
|
||||
sha256 = "1h4ndn822k7i04h9k5dxm6c29mhhhqhl63vzpmz2l1k0zpj7xyd1";
|
||||
rev = "v1.10.0";
|
||||
sha256 = "1nlvq85c232z5yjs86pxpmkv7hk6gb5pa6j4hhzgdz85adk2ma04";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/olekukonko/tablewriter";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/olekukonko/tablewriter";
|
||||
rev = "d4647c9c7a84d847478d890b816b7d8b62b0b279";
|
||||
rev = "d4647c9c7a84";
|
||||
sha256 = "1274k5r9ardh1f6gsmadxmdds7zy8rkr55fb9swvnm0vazr3y01l";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/pelletier/go-toml";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/pelletier/go-toml";
|
||||
rev = "c2dbbc24a97911339e01bda0b8cabdbd8f13b602";
|
||||
sha256 = "0v1dsqnk5zmn6ir8jgxijx14s47jvijlqfz3aq435snfrgybd5rz";
|
||||
rev = "v1.2.0";
|
||||
sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/pkg/errors";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/pkg/errors";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/pmezard/go-difflib";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/pmezard/go-difflib";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/russross/blackfriday";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/russross/blackfriday";
|
||||
rev = "46c73eb196baff5bb07288f245b223bd1a30fba6";
|
||||
rev = "46c73eb196ba";
|
||||
sha256 = "01z1jsdkac09cw95lqq4pahkw9xnini2mb956lvb772bby2x3dmj";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/sanity-io/litter";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/sanity-io/litter";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "09nywwxxd6rmhxc7rsvs96ynjszmnvmhwr7dvh1n35hb6h9y7s2r";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/sergi/go-diff";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/sergi/go-diff";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "0swiazj8wphs2zmk1qgq75xza6m19snif94h2m6fi8dqkwqdl7c7";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/shurcooL/sanitized_anchor_name";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/shurcooL/sanitized_anchor_name";
|
||||
rev = "86672fcb3f950f35f2e675df2240550f2a50762f";
|
||||
rev = "86672fcb3f95";
|
||||
sha256 = "142m507s9971cl8qdmbcw7sqxnkgi3xqd8wzvfq15p0w7w8i4a3h";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/afero";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/afero";
|
||||
rev = "787d034dfe70e44075ccc060d346146ef53270ad";
|
||||
sha256 = "0138rjiacl71h7kvhzinviwvy6qa2m6rflpv9lgqv15hnjvhwvg1";
|
||||
rev = "v1.1.2";
|
||||
sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/cast";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/cast";
|
||||
rev = "8965335b8c7107321228e3e3702cab9832751bac";
|
||||
sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2";
|
||||
rev = "v1.3.0";
|
||||
sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/cobra";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/cobra";
|
||||
rev = "ff0d02e8555041edecbd0ce27f32c6ea4b214483";
|
||||
sha256 = "1ilw6b2nir1bg7hmx8hrn60za37qqm18xvamv90fx5vxq85fsml9";
|
||||
rev = "v0.0.3";
|
||||
sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/fsync";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/fsync";
|
||||
rev = "12a01e648f05a938100a26858d2d59a120307a18";
|
||||
rev = "12a01e648f05";
|
||||
sha256 = "1vvbgxbbsc4mvi1axgqgn9pzjz1p495dsmwpc7mr8qxh8f6s0nhv";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/jwalterweatherman";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/jwalterweatherman";
|
||||
rev = "14d3d4c518341bea657dd8a226f5121c0ff8c9f2";
|
||||
sha256 = "1f9154lijbz0kkgqwmbphykwl4adv4fvkx6n1p7fdq3x5j9g8i17";
|
||||
rev = "4a4406e478ca";
|
||||
sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/nitro";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/nitro";
|
||||
rev = "24d7ef30a12da0bdc5e2eb370a79c659ddccf0e8";
|
||||
rev = "24d7ef30a12d";
|
||||
sha256 = "143sbpx0jdgf8f8ayv51x6l4jg6cnv6nps6n60qxhx4vd90s6mib";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/pflag";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/pflag";
|
||||
rev = "947b89bd1b7dabfed991ac30e1a56f5193f0c88b";
|
||||
sha256 = "0n4h5cb07n96fcw9k8dwnj6yisf2x357lsiwjmrq6xr1vkzdlk8c";
|
||||
rev = "v1.0.2";
|
||||
sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/spf13/viper";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/viper";
|
||||
rev = "907c19d40d9a6c9bb55f040ff4ae45271a4754b9";
|
||||
sha256 = "177ziws6mwxdlvicmgpv7w7zy5ri2wgnw2f2v3789b5skv9d6a6b";
|
||||
rev = "v1.2.0";
|
||||
sha256 = "0klv7dyllvv9jkyspy4ww5nrz24ngb3adlh884cbdjn7562bhi47";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/stretchr/testify";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/stretchr/testify";
|
||||
rev = "f2347ac6c9c9";
|
||||
sha256 = "0ns8zc2n8gpcsd1fdaqbq7a8d939lnaxraqx5nr2fi2zdxqyh7hm";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/tdewolff/minify";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/tdewolff/minify";
|
||||
rev = "948b6490cf3cacab5f4d7474104c3d21bf6eda46";
|
||||
sha256 = "1js5l0405kbic53qgim0lj3crw7cc2a2sbga35h9qcnm8l3cx22f";
|
||||
rev = "v2.3.5";
|
||||
sha256 = "0x67kgjhc6mfzjhr4xmw0j3qapzhkgwwahvv5b44rb449ml2qx5m";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/tdewolff/parse";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/tdewolff/parse";
|
||||
rev = "dd9676af8dd934a61082c5b3038e79626847fa32";
|
||||
sha256 = "1hp9qh8knx3q57aw5qavsf7ia3mxm8ka0bk6kjkqkqq8k9jq97qk";
|
||||
rev = "v2.3.3";
|
||||
sha256 = "190y2jykp8qyp6y58ky1v1fvmaqjnrsr1ksbqrrspf1gpjy69i94";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/tdewolff/test";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/tdewolff/test";
|
||||
rev = "265427085153";
|
||||
sha256 = "1h0cmsjjia92w50dzr06c5h10zd5c7snhpixqjv94wbl7dv80yp0";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/wellington/go-libsass";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/wellington/go-libsass";
|
||||
rev = "615eaa47ef794d037c1906a0eb7bf85375a5decf";
|
||||
rev = "615eaa47ef79";
|
||||
sha256 = "0imjiskn4vq7nml5jwb1scgl61jg53cfpkjnb9rsc6m8gsd8s16s";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "github.com/yosssi/ace";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/yosssi/ace";
|
||||
rev = "2b21b56204aee785bf8d500c3f9dcbe3ed7d4515";
|
||||
sha256 = "0cgpq1zdnh8l8zsn9w63asc9k7cm6k4qvjgrb4hr1106h8fjwfma";
|
||||
rev = "v0.0.5";
|
||||
sha256 = "1kbvbc56grrpnl65grygd23gyn3nkkhxdg8awhzkjmd0cvki8w1f";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "golang.org/x/image";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/image";
|
||||
rev = "c73c2afc3b812cdd6385de5a50616511c4a3d458";
|
||||
rev = "c73c2afc3b81";
|
||||
sha256 = "1kkafy29vz5xf6r29ghbvvbwrgjxwxvzk6dsa2qhyp1ddk6l2vkz";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "golang.org/x/net";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/net";
|
||||
rev = "922f4815f713f213882e8ef45e0d315b164d705c";
|
||||
sha256 = "1ci1rxk2d6hmfsjjc19n2sxhyn4jqr5ia3ykyah1h08p0pn7k52w";
|
||||
rev = "161cd47e91fd";
|
||||
sha256 = "0254ld010iijygbzykib2vags1dc0wlmcmhgh4jl8iny159lhbcv";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "golang.org/x/sync";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/sync";
|
||||
rev = "1d60e4601c6fd243af51cc01ddf169918a5407ca";
|
||||
rev = "1d60e4601c6f";
|
||||
sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "golang.org/x/sys";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/sys";
|
||||
rev = "4ea2f632f6e912459fe60b26b1749377f0d889d5";
|
||||
sha256 = "16pdi4mmjlcrjdcz7k559jqnsvkhdmff68bbqq7ii1lp8vrpqqmy";
|
||||
rev = "d0be0721c37e";
|
||||
sha256 = "081wyvfnlf842dqg03raxfz6lldlxpmyh1prix9lmrrm65arxb12";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "golang.org/x/text";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/text";
|
||||
rev = "6e3c4e7365ddcc329f090f96e4348398f6310088";
|
||||
sha256 = "1r511ncipn7sdlssn06fpzcpy4mp4spagni4ryxq86p2b0bi8pn4";
|
||||
rev = "v0.3.0";
|
||||
sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "gopkg.in/check.v1";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/check.v1";
|
||||
rev = "788fd7840127";
|
||||
sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
goPackagePath = "gopkg.in/yaml.v2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/yaml.v2";
|
||||
rev = "5420a8b6744d3b0345ab293f6fcba19c978f1183";
|
||||
rev = "v2.2.1";
|
||||
sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1";
|
||||
};
|
||||
}
|
||||
|
@ -1,22 +1,6 @@
|
||||
{ stdenv, pkgs, python3 }:
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
|
||||
# https://github.com/pimutils/khal/issues/780
|
||||
python-dateutil = super.python-dateutil.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "2.6.1";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca";
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
in with python.pkgs; buildPythonApplication rec {
|
||||
with python3.pkgs; buildPythonApplication rec {
|
||||
pname = "khal";
|
||||
version = "0.9.10";
|
||||
|
||||
@ -50,6 +34,9 @@ in with python.pkgs; buildPythonApplication rec {
|
||||
install -D misc/__khal $out/share/zsh/site-functions/__khal
|
||||
'';
|
||||
|
||||
# One test fails as of 0.9.10 due to the upgrade to icalendar 4.0.3
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
'';
|
||||
@ -58,6 +45,6 @@ in with python.pkgs; buildPythonApplication rec {
|
||||
homepage = http://lostpackets.de/khal/;
|
||||
description = "CLI calendar application";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jgeerds ];
|
||||
maintainers = with maintainers; [ jgeerds gebner ];
|
||||
};
|
||||
}
|
||||
|
@ -13,12 +13,12 @@ let
|
||||
inherit (python2.pkgs) paramiko pycairo pyodbc;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "mysql-workbench";
|
||||
version = "8.0.12";
|
||||
version = "8.0.13";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
|
||||
sha256 = "0d6k1kw0bi3q5dlilzlgds1gcrlf7pis4asm3d6pssh2jmn5hh82";
|
||||
sha256 = "1p4xy2a5cin1l06j4ixpgp1ynhjdj5gax4fjhznspch3c63jp9hj";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, cmake, gcc-arm-embedded, python
|
||||
, cmake, gcc-arm-embedded, binutils-arm-embedded, python
|
||||
, qt5, SDL, gmock
|
||||
, dfu-util, avrdude
|
||||
}:
|
||||
@ -21,10 +21,12 @@ in stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gcc-arm-embedded binutils-arm-embedded
|
||||
];
|
||||
|
||||
buildInputs = with qt5; [
|
||||
gcc-arm-embedded
|
||||
python python.pkgs.pyqt4
|
||||
qtbase qtmultimedia qttranslations
|
||||
SDL gmock
|
||||
|
49
pkgs/applications/misc/pbpst/default.nix
Normal file
49
pkgs/applications/misc/pbpst/default.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ llvmPackages, stdenv, fetchFromGitHub
|
||||
, python36Packages, which, pkgconfig, curl, git, gettext, jansson
|
||||
|
||||
# Optional overrides
|
||||
, maxFileSize ? 64 # in MB
|
||||
, provider ? "https://ptpb.pw/"
|
||||
}:
|
||||
|
||||
llvmPackages.stdenv.mkDerivation rec {
|
||||
version = "unstable-2018-01-11";
|
||||
name = "pbpst-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HalosGhost";
|
||||
repo = "pbpst";
|
||||
rev = "ecbe08a0b72a6e4212f09fc6cf52a73506992346";
|
||||
sha256 = "0dwhmw1dg4hg75nlvk5kmvv3slz2n3b9x65q4ig16agwqfsp4mdm";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
python36Packages.sphinx
|
||||
which
|
||||
pkgconfig
|
||||
curl
|
||||
git
|
||||
gettext
|
||||
];
|
||||
buildInputs = [ curl jansson ];
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs ./configure
|
||||
|
||||
# Remove hardcoded check for libs in /usr/lib/
|
||||
sed -e '64,67d' -i ./configure
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--file-max=${toString (maxFileSize * 1024 * 1024)}" # convert to bytes
|
||||
"--provider=${provider}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A command-line libcurl C client for pb deployments";
|
||||
inherit (src.meta) homepage;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ tmplt ];
|
||||
};
|
||||
}
|
39
pkgs/applications/misc/tabula/default.nix
Normal file
39
pkgs/applications/misc/tabula/default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ stdenv, fetchzip, jre, makeWrapper }:
|
||||
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tabula-${version}";
|
||||
version = "1.2.1";
|
||||
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/tabulapdf/tabula/releases/download/v${version}/tabula-jar-${version}.zip";
|
||||
sha256 = "0lkpv8hkji81fanyxm7ph8421fr9a6phqc3pbhw2bc4gljg7sgxi";
|
||||
};
|
||||
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/share/tabula
|
||||
cp -v * $out/share/tabula
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/tabula --add-flags "-jar $out/share/tabula/tabula.jar"
|
||||
'';
|
||||
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A tool for liberating data tables locked inside PDF files";
|
||||
longDescription = ''
|
||||
If you’ve ever tried to do anything with data provided to you in PDFs, you
|
||||
know how painful it is — there's no easy way to copy-and-paste rows of data
|
||||
out of PDF files. Tabula allows you to extract that data into a CSV or
|
||||
Microsoft Excel spreadsheet using a simple, easy-to-use interface.
|
||||
'';
|
||||
homepage = https://tabula.technology/;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.dpaetzel ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
Requirements for Building TrueCrypt for Linux and macOS:
|
||||
-----------------------------------------------------------
|
||||
|
||||
- GNU Make
|
||||
- GNU C++ Compiler 4.0 or compatible
|
||||
- Apple XCode (macOS only)
|
||||
- pkg-config
|
||||
- wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
|
||||
- FUSE library (available at http://fuse.sourceforge.net and
|
||||
http://code.google.com/p/macfuse)
|
||||
|
||||
|
||||
Instructions for Building TrueCrypt for Linux and macOS:
|
||||
-----------------------------------------------------------
|
||||
|
||||
1) Change the current directory to the root of the TrueCrypt source code.
|
||||
|
||||
2) Run the following command to configure the wxWidgets library for TrueCrypt
|
||||
and to build it:
|
||||
|
||||
$ make WX_ROOT=/usr/src/wxWidgets wxbuild
|
||||
|
||||
The variable WX_ROOT must point to the location of the source code of the
|
||||
wxWidgets library. Output files will be placed in the './wxrelease/'
|
||||
directory.
|
||||
|
||||
3) To build TrueCrypt, run the following command:
|
||||
|
||||
$ make
|
||||
|
||||
4) If successful, the TrueCrypt executable should be located in the directory
|
||||
'Main'.
|
||||
|
||||
By default, a universal executable supporting both graphical and text user
|
||||
interface is built. To build a console-only executable, which requires no GUI
|
||||
library, use the 'NOGUI' parameter:
|
||||
|
||||
$ make NOGUI=1 WX_ROOT=/usr/src/wxWidgets wxbuild
|
||||
$ make NOGUI=1
|
||||
*/
|
||||
|
||||
{ fetchurl, stdenv, pkgconfig, nasm, fuse, wxGTK, lvm2,
|
||||
wxGUI ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "truecrypt-7.1a";
|
||||
|
||||
patchPhase = "patch -p0 < ${./gcc6.patch}";
|
||||
|
||||
preBuild = ''
|
||||
cp $pkcs11h pkcs11.h
|
||||
cp $pkcs11th pkcs11t.h
|
||||
cp $pkcs11fh pkcs11f.h
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
''PKCS11_INC="`pwd`"''
|
||||
(if wxGUI then "" else "NOGUI=1")
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -D -t $out/bin Main/truecrypt
|
||||
install -D License.txt $out/share/$name/LICENSE
|
||||
'';
|
||||
|
||||
src = fetchurl {
|
||||
url = https://fossies.org/linux/misc/old/TrueCrypt-7.1a-Source.tar.gz;
|
||||
sha256 = "e6214e911d0bbededba274a2f8f8d7b3f6f6951e20f1c3a598fc7a23af81c8dc";
|
||||
};
|
||||
|
||||
pkcs11h = fetchurl {
|
||||
url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h;
|
||||
sha256 = "1563d877b6f8868b8eb8687358162bfb7f868104ed694beb35ae1c5cf1a58b9b";
|
||||
};
|
||||
|
||||
pkcs11th = fetchurl {
|
||||
url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h;
|
||||
sha256 = "8ce68616304684f92a7e267bcc8f486441e92a5cbdfcfd97e69ac9a0b436fb7b";
|
||||
};
|
||||
|
||||
pkcs11fh = fetchurl {
|
||||
url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h;
|
||||
sha256 = "5ae6a4f32ca737e02def3bf314c9842fb89be82bf00b6f4022a97d8d565522b8";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ fuse lvm2 wxGTK nasm ];
|
||||
|
||||
meta = {
|
||||
description = "Free Open-Source filesystem on-the-fly encryption";
|
||||
homepage = http://www.truecrypt.org/;
|
||||
license = "TrueCrypt License Version 2.6";
|
||||
maintainers = with stdenv.lib.maintainers; [ ryantm ];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
--- Main/Resources.cpp 2016-05-16 16:47:35.846462041 +0200
|
||||
+++ Main/Resources.cpp 2016-05-16 17:12:21.838202520 +0200
|
||||
@@ -45,13 +45,13 @@
|
||||
strBuf.CopyFrom (res);
|
||||
return string (reinterpret_cast <char *> (strBuf.Ptr()));
|
||||
#else
|
||||
- static const char LanguageXml[] =
|
||||
+ static byte LanguageXml[] =
|
||||
{
|
||||
# include "Common/Language.xml.h"
|
||||
, 0
|
||||
};
|
||||
|
||||
- return string (LanguageXml);
|
||||
+ return string ((const char*) LanguageXml);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@
|
||||
strBuf.CopyFrom (res);
|
||||
return string (reinterpret_cast <char *> (strBuf.Ptr()));
|
||||
#else
|
||||
- static const char License[] =
|
||||
+ static byte License[] =
|
||||
{
|
||||
# include "License.txt.h"
|
||||
, 0
|
||||
};
|
||||
|
||||
- return string (License);
|
||||
+ return string ((const char*) License);
|
||||
#endif
|
||||
}
|
||||
|
||||
--- Main/Forms/PreferencesDialog.cpp 2016-05-16 17:14:47.704707908 +0200
|
||||
+++ Main/Forms/PreferencesDialog.cpp 2016-05-16 17:15:56.927964437 +0200
|
||||
@@ -414,11 +414,11 @@
|
||||
libExtension = wxDynamicLibrary::CanonicalizeName (L"x");
|
||||
|
||||
#ifdef TC_MACOSX
|
||||
- extensions.push_back (make_pair (L"dylib", LangString["DLL_FILES"]));
|
||||
+ extensions.push_back (make_pair (L"dylib", static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
|
||||
#endif
|
||||
if (!libExtension.empty())
|
||||
{
|
||||
- extensions.push_back (make_pair (libExtension.Mid (libExtension.find (L'.') + 1), LangString["DLL_FILES"]));
|
||||
+ extensions.push_back (make_pair (static_cast<const wchar_t*>(libExtension.Mid (libExtension.find (L'.') + 1).wc_str()), static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
|
||||
extensions.push_back (make_pair (L"*", L""));
|
||||
}
|
||||
|
||||
--- Main/GraphicUserInterface.cpp 2016-05-16 17:16:38.724591342 +0200
|
||||
+++ Main/GraphicUserInterface.cpp 2016-05-16 17:17:09.854562653 +0200
|
||||
@@ -1445,7 +1445,7 @@
|
||||
FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const
|
||||
{
|
||||
list < pair <wstring, wstring> > extensions;
|
||||
- extensions.push_back (make_pair (L"tc", LangString["TC_VOLUMES"]));
|
||||
+ extensions.push_back (make_pair (L"tc", static_cast<const wchar_t*>(LangString["TC_VOLUMES"].wc_str())));
|
||||
|
||||
FilePathList selFiles = Gui->SelectFiles (parent, LangString[saveMode ? "OPEN_NEW_VOLUME" : "OPEN_VOL_TITLE"], saveMode, false, extensions, directory);
|
||||
|
@ -1,43 +1,38 @@
|
||||
{ fetchurl, stdenv, pkgconfig, yasm, fuse, wxGTK30, lvm2, makeself,
|
||||
wxGUI ? true
|
||||
}:
|
||||
{ stdenv, fetchurl, pkgconfig, makeself, yasm, fuse, wxGTK, lvm2 }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "veracrypt-${version}";
|
||||
version = "1.22";
|
||||
pname = "veracrypt";
|
||||
name = "${pname}-${version}";
|
||||
version = "1.23";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/veracrypt/trunk/${version}/+download/VeraCrypt_${version}_Source.tar.bz2";
|
||||
sha256 = "0w5qyxnx03vn93ach1kb995w2mdg43s82gf1isbk206sxp00qk4y";
|
||||
url = "https://launchpad.net/${pname}/trunk/${version}/+download/VeraCrypt_${version}_Source.tar.bz2";
|
||||
sha256 = "009lqi43n2w272sxv7y7dz9sqx15qkx6lszkswr8mwmkpgkm0px1";
|
||||
};
|
||||
|
||||
unpackPhase =
|
||||
''
|
||||
tar xjf $src
|
||||
cd src
|
||||
'';
|
||||
sourceRoot = "src";
|
||||
|
||||
nativeBuildInputs = [ makeself yasm pkgconfig ];
|
||||
buildInputs = [ fuse lvm2 ]
|
||||
++ optional wxGUI wxGTK30;
|
||||
makeFlags = optionalString (!wxGUI) "NOGUI=1";
|
||||
nativeBuildInputs = [ makeself pkgconfig yasm ];
|
||||
buildInputs = [ fuse lvm2 wxGTK ];
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
cp Main/veracrypt $out/bin
|
||||
mkdir -p $out/share/$name
|
||||
cp License.txt $out/share/$name/LICENSE
|
||||
mkdir -p $out/share/applications
|
||||
sed "s,Exec=.*,Exec=$out/bin/veracrypt," Setup/Linux/veracrypt.desktop > $out/share/applications/veracrypt.desktop
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm 755 Main/${pname} "$out/bin/${pname}"
|
||||
install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/${pname}.xpm"
|
||||
install -Dm 444 License.txt -t "$out/share/doc/${pname}/"
|
||||
install -d $out/share/applications
|
||||
substitute Setup/Linux/${pname}.desktop $out/share/applications/${pname}.desktop \
|
||||
--replace "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \
|
||||
--replace "Icon=veracrypt" "Icon=veracrypt.xpm"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Free Open-Source filesystem on-the-fly encryption";
|
||||
homepage = https://www.veracrypt.fr/;
|
||||
license = "VeraCrypt License";
|
||||
license = [ licenses.asl20 /* or */ "TrueCrypt License version 3.0" ];
|
||||
maintainers = with maintainers; [ dsferruzza ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, gn, ninja, which, nodejs, fetchurl, fetchpatch, gnutar
|
||||
{ stdenv, llvmPackages, gn, ninja, which, nodejs, fetchurl, fetchpatch, gnutar
|
||||
|
||||
# default dependencies
|
||||
, bzip2, flac, speex, libopus
|
||||
@ -130,14 +130,16 @@ let
|
||||
patches = optional enableWideVine ./patches/widevine.patch ++ [
|
||||
./patches/nix_plugin_paths_68.patch
|
||||
./patches/remove-webp-include-69.patch
|
||||
|
||||
# Unfortunately, chromium regularly breaks on major updates and
|
||||
# then needs various patches backported. Good sources for such patches and other hints:
|
||||
# then needs various patches backported in order to be compiled with GCC.
|
||||
# Good sources for such patches and other hints:
|
||||
# - https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/
|
||||
# - https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/chromium
|
||||
# - https://github.com/chromium/chromium/search?q=GCC&s=committer-date&type=Commits
|
||||
#
|
||||
# ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
|
||||
] ++ optionals (versionOlder version "71") [
|
||||
] ++ optionals (!stdenv.cc.isClang && (versionRange "70" "71")) [
|
||||
( githubPatch "cbdb8bd6567c8143dc8c1e5e86a21a8ea064eea4" "0258qlffp6f6izswczb11p8zdpn550z5yqa9z7gdg2rg5171n5i8" )
|
||||
( githubPatch "e98f8ef8b2f236ecbb01df8c39e6ee1c8fbe8d7d" "1ky5xrzch6aya87kn0bgb31lksl3g8kh2v8k676ks7pdl2v132p9" )
|
||||
( githubPatch "a4de8da116585357c123d71e5f54d1103824c6df" "1y7afnjrsz6j2l3vy1ms8mrkbb51xhcafw9r371algi48il7rajm" )
|
||||
@ -159,7 +161,7 @@ let
|
||||
sha256 = "018fbdzyw9rvia8m0qkk5gv8q8gl7x34rrjbn7mi1fgxdsayn22s";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
postPatch = ''
|
||||
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
||||
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
|
||||
@ -207,10 +209,16 @@ let
|
||||
'' + optionalString stdenv.isAarch64 ''
|
||||
substituteInPlace build/toolchain/linux/BUILD.gn \
|
||||
--replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
|
||||
'' + optionalString stdenv.cc.isClang ''
|
||||
mkdir -p third_party/llvm-build/Release+Asserts/bin
|
||||
ln -s ${stdenv.cc}/bin/clang third_party/llvm-build/Release+Asserts/bin/clang
|
||||
ln -s ${stdenv.cc}/bin/clang++ third_party/llvm-build/Release+Asserts/bin/clang++
|
||||
ln -s ${llvmPackages.llvm}/bin/llvm-ar third_party/llvm-build/Release+Asserts/bin/llvm-ar
|
||||
'';
|
||||
|
||||
gnFlags = mkGnFlags ({
|
||||
linux_use_bundled_binutils = false;
|
||||
use_lld = false;
|
||||
use_gold = true;
|
||||
gold_path = "${stdenv.cc}/bin";
|
||||
is_debug = false;
|
||||
@ -224,7 +232,7 @@ let
|
||||
use_cups = cupsSupport;
|
||||
|
||||
treat_warnings_as_errors = false;
|
||||
is_clang = false;
|
||||
is_clang = stdenv.cc.isClang;
|
||||
clang_use_chrome_plugins = false;
|
||||
remove_webcore_debug_symbols = true;
|
||||
enable_swiftshader = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ newScope, stdenv, makeWrapper, makeDesktopItem, ed
|
||||
{ newScope, stdenv, llvmPackages, makeWrapper, makeDesktopItem, ed
|
||||
, glib, gtk3, gnome3, gsettings-desktop-schemas
|
||||
|
||||
# package customization
|
||||
@ -14,12 +14,13 @@
|
||||
, commandLineArgs ? ""
|
||||
}:
|
||||
|
||||
assert stdenv.cc.isClang -> (stdenv == llvmPackages.stdenv);
|
||||
let
|
||||
callPackage = newScope chromium;
|
||||
|
||||
chromium = {
|
||||
inherit stdenv;
|
||||
|
||||
inherit stdenv llvmPackages;
|
||||
|
||||
upstream-info = (callPackage ./update.nix {}).getChannel channel;
|
||||
|
||||
mkChromiumDerivation = callPackage ./common.nix {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ stdenv, gcc
|
||||
, jshon
|
||||
, glib
|
||||
, nspr
|
||||
@ -69,7 +69,7 @@ let
|
||||
! find -iname '*.so' -exec ldd {} + | grep 'not found'
|
||||
'';
|
||||
|
||||
PATCH_RPATH = mkrpath [ stdenv.cc.cc glib nspr nss ];
|
||||
PATCH_RPATH = mkrpath [ gcc.cc glib nspr nss ];
|
||||
|
||||
patchPhase = ''
|
||||
chmod +x libwidevinecdm.so libwidevinecdmadapter.so
|
||||
@ -110,7 +110,7 @@ let
|
||||
|
||||
patchPhase = ''
|
||||
chmod +x libpepflashplayer.so
|
||||
patchelf --set-rpath "${mkrpath [ stdenv.cc.cc ]}" libpepflashplayer.so
|
||||
patchelf --set-rpath "${mkrpath [ gcc.cc ]}" libpepflashplayer.so
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
@ -1,18 +1,18 @@
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
beta = {
|
||||
sha256 = "0dqfwghl73gcmbnl9wb3i5wz8q65y1vhg7n0m2nh0hv33w1w4mp9";
|
||||
sha256bin64 = "0x7npns1ng7p4w1qswcj889v9lplvy2wv1ccxrk4ilyqiwzvwy1z";
|
||||
version = "70.0.3538.67";
|
||||
sha256 = "0kkdfp5f3gmzngfj1nfw023bpyvm47h94k9rpwml2kxlijswd1gl";
|
||||
sha256bin64 = "13ghx5ysl8f2iphdvjh698q4jksh765ljjrd74m6x0ih6qm0ksaq";
|
||||
version = "71.0.3578.20";
|
||||
};
|
||||
dev = {
|
||||
sha256 = "1kw0rn58s4nd43z2qkjph7aid0s3jnmm650d7k1yxppgmfsal246";
|
||||
sha256bin64 = "0518qrghjk5jlzhmynk6nngp5i81bpxi3880gimpbd7bblj6dg7y";
|
||||
version = "71.0.3578.10";
|
||||
sha256 = "1d7q8hbqbxy2izdvv4d9126ljiglsfc3w7wns3zbbbiyqa2rj00y";
|
||||
sha256bin64 = "0v6yahsvsgxcqg6k84lgr589rnx9af1r2axn7cggyn1a2lk63jck";
|
||||
version = "72.0.3590.0";
|
||||
};
|
||||
stable = {
|
||||
sha256 = "0dqfwghl73gcmbnl9wb3i5wz8q65y1vhg7n0m2nh0hv33w1w4mp9";
|
||||
sha256bin64 = "0ihs2xfb2zn8aq11kg7miw9rnjwc6l4k5jgf24dm661463xmd3ha";
|
||||
version = "70.0.3538.67";
|
||||
sha256 = "0j84556r3m4igigqsx9zvw4kvbn4psfsi7m8xhcvfxc39ingh569";
|
||||
sha256bin64 = "082cf9d1wm36w4i09ai4xnprvxfqdar6cbgsxz5q5srd41mqdy6p";
|
||||
version = "70.0.3538.77";
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -14,12 +14,6 @@ let
|
||||
sha256 = "11acb0ms4jrswp7268nm2p8g8l4lv8zc666a5bqjbb09x9k6b78k";
|
||||
};
|
||||
|
||||
firefox60_triplet_patch = fetchpatch {
|
||||
name = "triplet.patch";
|
||||
url = https://hg.mozilla.org/releases/mozilla-release/raw-rev/bc651d3d910c;
|
||||
sha256 = "0iybkadsgsf6a3pq3jh8z1p110vmpkih8i35jfj8micdkhxzi89g";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
@ -116,8 +110,7 @@ rec {
|
||||
find . -exec touch -d'2010-01-01 00:00' {} \;
|
||||
'';
|
||||
|
||||
patches = nixpkgsPatches
|
||||
++ lib.optional (args.tbversion == "8.0.2") firefox60_triplet_patch;
|
||||
patches = nixpkgsPatches;
|
||||
|
||||
meta = {
|
||||
description = "A web browser built from TorBrowser source tree";
|
||||
@ -173,16 +166,16 @@ in rec {
|
||||
};
|
||||
|
||||
tor-browser-8-0 = tbcommon rec {
|
||||
ffversion = "60.2.1esr";
|
||||
tbversion = "8.0.2";
|
||||
ffversion = "60.3.0esr";
|
||||
tbversion = "8.0.3";
|
||||
|
||||
# FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
|
||||
src = fetchFromGitHub {
|
||||
owner = "SLNOS";
|
||||
repo = "tor-browser";
|
||||
# branch "tor-browser-60.2.1esr-8.0-1-slnos"
|
||||
rev = "4f71403a3e6203baa349a8f81d8664782c5ea548";
|
||||
sha256 = "0zxdi162gpnfca7g77hc0rw4wkmxhfzp9hfmw6dpn97d5kn1zqq3";
|
||||
# branch "tor-browser-60.3.0esr-8.0-1-slnos"
|
||||
rev = "bd512ad9c40069adfc983f4f03dbd9d220cdf2f9";
|
||||
sha256 = "1j349aqiqrf58zrx8pkqvh292w41v1vwr7x7dmd74hq4pi2iwpn8";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -28,12 +28,12 @@ let
|
||||
|
||||
in python3Packages.buildPythonApplication rec {
|
||||
pname = "qutebrowser";
|
||||
version = "1.5.1";
|
||||
version = "1.5.2";
|
||||
|
||||
# the release tarballs are different from the git checkout!
|
||||
src = fetchurl {
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1yn181gscj04ni58swk6cmggn047q29siqwgn66pvxhfdf0ny7fq";
|
||||
sha256 = "0ki19mynq91aih3kxhipnay3jmn56s7p6rilws0gq0k98li6a4my";
|
||||
};
|
||||
|
||||
# Needs tox
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ stdenv, newScope, makeWrapper, electron, xdg_utils, makeDesktopItem
|
||||
{ stdenv, newScope, makeWrapper
|
||||
, wrapGAppsHook, gnome3, glib
|
||||
, electron, xdg_utils, makeDesktopItem
|
||||
, auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU"
|
||||
, auth0Domain ? "nixpkgs.auth0.com" }:
|
||||
|
||||
@ -26,16 +28,25 @@ with self;
|
||||
stdenv.mkDerivation {
|
||||
name = "rambox-${rambox-bare.version}";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
||||
|
||||
buildInputs = [ glib gnome3.gsettings_desktop_schemas ];
|
||||
unpackPhase = ":";
|
||||
|
||||
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
||||
|
||||
installPhase = ''
|
||||
makeWrapper ${electron}/bin/electron $out/bin/rambox \
|
||||
--add-flags "${rambox-bare} --without-update" \
|
||||
--prefix PATH : ${xdg_utils}/bin
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/applications
|
||||
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${electron}/bin/electron $out/bin/rambox \
|
||||
--add-flags "${rambox-bare} --without-update" \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--prefix PATH : ${xdg_utils}/bin
|
||||
'';
|
||||
|
||||
inherit (rambox-bare.meta // {
|
||||
|
@ -1,15 +1,15 @@
|
||||
{ stdenv, fetchurl, gzip, which, unzip, jdk }:
|
||||
|
||||
let
|
||||
version = "6.5.3.6";
|
||||
version = "6.6.0.13";
|
||||
srcs = {
|
||||
i686-linux = fetchurl {
|
||||
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-i386.sh.zip";
|
||||
sha256 = "0g3hk3fdgmkdsr6ck1fgsmaxa9wbj2fpk84rk382ff9ny55bbzv9";
|
||||
sha256 = "15b197108b49mf0afpihkh3p68lxm7580zz2w0xsbahglnvhwyfz";
|
||||
};
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-amd64.sh.zip";
|
||||
sha256 = "08j8gak1xsxdjgkv6s24jv97jc49pi5yf906ynjmxb27wqpxn9mz";
|
||||
sha256 = "1cxhckmx1802p9qiw09cgb1v5f30wcvnrwkshmia8p8n0q47lpp4";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
@ -56,11 +56,11 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "signal-desktop-${version}";
|
||||
version = "1.17.1";
|
||||
version = "1.17.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "1cvgjllnbdsr61pz6r4dkbbz58cf69k7p8wriyp1vpzkdi7k5bpl";
|
||||
sha256 = "1ibci07w4dh7r0dkwb3nbqm470rgak2a98rlqf8390rxrinfli3p";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "inboxer-${version}";
|
||||
version = "1.1.5";
|
||||
version = "1.2.1";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Unofficial, free and open-source Google Inbox Desktop App";
|
||||
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/denysdovhan/inboxer/releases/download/v${version}/inboxer_${version}_amd64.deb";
|
||||
sha256 = "11xid07rqn7j6nxn0azxwf0g8g3jhams2fmf9q7xc1is99zfy7z4";
|
||||
sha256 = "0nyxas07d6ckgjazxapmc6iyakd2cddla6wflr5rhfp78d7kax3a";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
@ -4,6 +4,9 @@
|
||||
, withTcl ? false, tcl
|
||||
, withCyrus ? true, cyrus_sasl
|
||||
, withUnicode ? true, icu
|
||||
, withZlib ? true, zlib
|
||||
, withIPv6 ? true
|
||||
, withDebug ? false
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@ -24,7 +27,8 @@ stdenv.mkDerivation rec {
|
||||
++ optional withPython python3
|
||||
++ optional withTcl tcl
|
||||
++ optional withCyrus cyrus_sasl
|
||||
++ optional withUnicode icu;
|
||||
++ optional withUnicode icu
|
||||
++ optional withZlib zlib;
|
||||
|
||||
configureFlags = [
|
||||
(stdenv.lib.enableFeature withPerl "perl")
|
||||
@ -32,7 +36,8 @@ stdenv.mkDerivation rec {
|
||||
(stdenv.lib.enableFeature withTcl "tcl")
|
||||
(stdenv.lib.withFeatureAs withTcl "tcl" "${tcl}/lib")
|
||||
(stdenv.lib.enableFeature withCyrus "cyrus")
|
||||
];
|
||||
] ++ optional (!withIPv6) [ "--disable-ipv6" ]
|
||||
++ optional withDebug [ "--enable-debug" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Advanced IRC bouncer";
|
||||
|
@ -9,6 +9,8 @@ let
|
||||
inherit buildPhase;
|
||||
inherit installPhase;
|
||||
|
||||
buildInputs = znc.buildInputs;
|
||||
|
||||
meta = a.meta // { platforms = stdenv.lib.platforms.unix; };
|
||||
passthru.module_name = module_name;
|
||||
});
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, python3, glibcLocales }:
|
||||
{ stdenv, python3, glibcLocales, fetchpatch }:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs) buildPythonApplication fetchPypi;
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "todoman";
|
||||
version = "3.4.0";
|
||||
version = "3.4.1";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "09441fdrwz2irsbrxnpwys51372z6rn6gnxn87p95r3fv9gmh0fw";
|
||||
sha256 = "1rvid1rklvgvsf6xmxd91j2fi46v4fzn5z6zbs5yn0wpb0k605r5";
|
||||
};
|
||||
|
||||
LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux
|
||||
@ -29,9 +29,17 @@ buildPythonApplication rec {
|
||||
makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive"
|
||||
"--set CHARSET en_us.UTF-8" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/pimutils/todoman/commit/3e191111b72df9ec91a773befefa291799374422.patch";
|
||||
sha256 = "12mskbp0d8p2lllkxm3m9wyy2hsbnz2qs297civsc3ly2l5bcrag";
|
||||
})
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# Remove one failing test that only checks whether the command line works
|
||||
rm tests/test_main.py
|
||||
rm tests/test_cli.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,97 +0,0 @@
|
||||
# - coqide compilation can be disabled by setting lablgtk to null;
|
||||
# - The csdp program used for the Micromega tactic is statically referenced.
|
||||
# However, coq can build without csdp by setting it to null.
|
||||
# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
|
||||
|
||||
{stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
|
||||
|
||||
let
|
||||
version = "8.4pl6";
|
||||
coq-version = "8.4";
|
||||
buildIde = lablgtk != null;
|
||||
ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
|
||||
csdpPatch = if csdp != null then ''
|
||||
substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
|
||||
substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
|
||||
'' else "";
|
||||
|
||||
self =
|
||||
stdenv.mkDerivation {
|
||||
name = "coq-${version}";
|
||||
|
||||
inherit coq-version;
|
||||
inherit ocaml camlp5;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
|
||||
sha256 = "1mpbj4yf36kpjg2v2sln12i8dzqn8rag6fd07hslj2lpm4qs4h55";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ ocaml findlib camlp5 ncurses lablgtk ];
|
||||
|
||||
patches = [ ./configure.patch ];
|
||||
|
||||
postPatch = ''
|
||||
UNAME=$(type -tp uname)
|
||||
RM=$(type -tp rm)
|
||||
substituteInPlace configure --replace "/bin/uname" "$UNAME"
|
||||
substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
|
||||
${csdpPatch}
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray=(
|
||||
-opt
|
||||
-camldir ${ocaml}/bin
|
||||
-camlp5dir $(ocamlfind query camlp5)
|
||||
${ideFlags}
|
||||
)
|
||||
'';
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
|
||||
buildFlags = "revision coq coqide";
|
||||
|
||||
setupHook = writeText "setupHook.sh" ''
|
||||
addCoqPath () {
|
||||
if test -d "''$1/lib/coq/${coq-version}/user-contrib"; then
|
||||
export COQPATH="''${COQPATH}''${COQPATH:+:}''$1/lib/coq/${coq-version}/user-contrib/"
|
||||
fi
|
||||
}
|
||||
|
||||
addEnvHooks "$targetOffset" addCoqPath
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit findlib;
|
||||
emacsBufferSetup = pkgs: ''
|
||||
; Propagate coq paths to children
|
||||
(inherit-local-permanent coq-prog-name "${self}/bin/coqtop")
|
||||
(inherit-local-permanent coq-dependency-analyzer "${self}/bin/coqdep")
|
||||
(inherit-local-permanent coq-compiler "${self}/bin/coqc")
|
||||
; If the coq-library path was already set, re-set it based on our current coq
|
||||
(when (fboundp 'get-coq-library-directory)
|
||||
(inherit-local-permanent coq-library-directory (get-coq-library-directory))
|
||||
(coq-prog-args))
|
||||
(mapc (lambda (arg)
|
||||
(when (file-directory-p (concat arg "/lib/coq/${coq-version}/user-contrib"))
|
||||
(setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${coq-version}/user-contrib")))) '(${stdenv.lib.concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Formal proof management system";
|
||||
longDescription = ''
|
||||
Coq is a formal proof management system. It provides a formal language
|
||||
to write mathematical definitions, executable algorithms and theorems
|
||||
together with an environment for semi-interactive development of
|
||||
machine-checked proofs.
|
||||
'';
|
||||
homepage = http://coq.inria.fr;
|
||||
license = licenses.lgpl21;
|
||||
branch = coq-version;
|
||||
maintainers = with maintainers; [ roconnor thoughtpolice vbgl ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}; in self
|
@ -1,11 +0,0 @@
|
||||
diff -Nuar coq-8.3pl3-orig/configure coq-8.3pl3/configure
|
||||
--- coq-8.3pl3-orig/configure 2011-12-19 22:57:30.000000000 +0100
|
||||
+++ coq-8.3pl3/configure 2012-03-17 16:38:16.000000000 +0100
|
||||
@@ -395,7 +395,6 @@
|
||||
ocamlyaccexec=$CAMLBIN/ocamlyacc
|
||||
ocamlmktopexec=$CAMLBIN/ocamlmktop
|
||||
ocamlmklibexec=$CAMLBIN/ocamlmklib
|
||||
- camlp4oexec=$CAMLBIN/camlp4o
|
||||
esac
|
||||
|
||||
if test ! -f "$CAMLC" ; then
|
@ -39,7 +39,7 @@ buildGoPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
mkdir $data
|
||||
cp -R $src/{public,templates} $data
|
||||
cp -R $src/{public,templates,options} $data
|
||||
mkdir -p $out
|
||||
cp -R $src/options/locale $out/locale
|
||||
|
||||
|
@ -11,29 +11,29 @@ let
|
||||
groups = [ "default" "unicorn" "ed25519" "metrics" ];
|
||||
};
|
||||
|
||||
version = "11.4.0";
|
||||
version = "11.4.3";
|
||||
|
||||
sources = if gitlabEnterprise then {
|
||||
gitlabDeb = fetchurl {
|
||||
url = "https://packages.gitlab.com/gitlab/gitlab-ee/packages/debian/stretch/gitlab-ee_${version}-ee.0_amd64.deb/download.deb";
|
||||
sha256 = "1y2a8acgsgrgcjazijsflhxq4fwqvd9yhrjx5pcncb24vl0x6dg4";
|
||||
sha256 = "1cw75qj508z6n00rqgqjzdm2013kyb7c57cypmq0m08nc6f3jspz";
|
||||
};
|
||||
gitlab = fetchFromGitLab {
|
||||
owner = "gitlab-org";
|
||||
repo = "gitlab-ee";
|
||||
rev = "v${version}-ee";
|
||||
sha256 = "1pyqk1c5bml7chs4pq1fcxkrhk5r327xx9my6zmp2cb503s5m590";
|
||||
sha256 = "1vqc77whpbsifbm9vgcmpxnw13v8jz1s9q04i8jfv99c59fjlids";
|
||||
};
|
||||
} else {
|
||||
gitlabDeb = fetchurl {
|
||||
url = "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_${version}-ce.0_amd64.deb/download.deb";
|
||||
sha256 = "0wiizjihn1a6hg6a2wpwmnh5a34n102va4djac3sgx74mwx4bniq";
|
||||
sha256 = "0vk03k42pp92h520wnynl9czcigjhj9m7y68z1x0gwqr9m61r7zm";
|
||||
};
|
||||
gitlab = fetchFromGitLab {
|
||||
owner = "gitlab-org";
|
||||
repo = "gitlab-ce";
|
||||
rev = "v${version}";
|
||||
sha256 = "1a8pavqc9bblss5z9ikc9b0k0ra33vw73zy7rvn0v1wgvbqpc24k";
|
||||
sha256 = "1zvjz2gv2vwqqjz52zcvi0ap3d8rdbpgsqk9wv80hqq4v37a5gfx";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,24 +1,35 @@
|
||||
{ stdenv, fetchurl, rustPlatform, darwin }:
|
||||
{ stdenv, fetchurl, rustPlatform, darwin, openssl, libsodium, pkgconfig }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
buildRustPackage rec {
|
||||
name = "pijul-${version}";
|
||||
version = "0.8.0";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pijul.org/releases/${name}.tar.gz";
|
||||
sha256 = "00pi03yp2bgnjpsz2hgaapxfw2i4idbjqc88cagpvn4yr1612wqx";
|
||||
sha256 = "1lkipcp83rfsj9yqddvb46dmqdf2ch9njwvjv8f3g91rmfjcngys";
|
||||
};
|
||||
|
||||
sourceRoot = "${name}/pijul";
|
||||
cargoPatches = [
|
||||
./libpijul.patch
|
||||
];
|
||||
|
||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/{bash-completion/completions,zsh/site-functions,fish/vendor_completions.d}
|
||||
$out/bin/pijul generate-completions --bash > $out/share/bash-completion/completions/pijul
|
||||
$out/bin/pijul generate-completions --zsh > $out/share/zsh/site-functions/_pijul
|
||||
$out/bin/pijul generate-completions --fish > $out/share/fish/vendor_completions.d/pijul.fish
|
||||
'';
|
||||
|
||||
buildInputs = [ openssl libsodium ] ++ stdenv.lib.optionals stdenv.isDarwin
|
||||
(with darwin.apple_sdk.frameworks; [ Security ]);
|
||||
|
||||
doCheck = false;
|
||||
|
||||
cargoSha256 = "1cnr08qbpia3336l37k1jli20d7kwnrw2gys8s9mg271cb4vdx03";
|
||||
cargoSha256 = "1419mlxa4p53hm5qzfd1yi2k0n1bcv8kaslls1nyx661vknhfamw";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A distributed version control system";
|
||||
|
61
pkgs/applications/version-management/pijul/libpijul.patch
Normal file
61
pkgs/applications/version-management/pijul/libpijul.patch
Normal file
@ -0,0 +1,61 @@
|
||||
--- 2/pijul-0.10.0/Cargo.lock 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ pijul-0.10.0/Cargo.lock 2018-10-28 10:09:48.557639255 +0000
|
||||
@@ -552,7 +552,7 @@
|
||||
|
||||
[[package]]
|
||||
name = "libpijul"
|
||||
-version = "0.10.0"
|
||||
+version = "0.10.1"
|
||||
dependencies = [
|
||||
"base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -577,9 +577,29 @@
|
||||
|
||||
[[package]]
|
||||
name = "libpijul"
|
||||
-version = "0.10.0"
|
||||
+version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-replace = "libpijul 0.10.0"
|
||||
+dependencies = [
|
||||
+ "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "openssl 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "sanakirja 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "serde 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "serde_derive 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "serde_json 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "thrussh-keys 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+]
|
||||
|
||||
[[package]]
|
||||
name = "line"
|
||||
@@ -917,7 +937,7 @@
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"isatty 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libpijul 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "libpijul 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"line 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pager 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1796,7 +1816,7 @@
|
||||
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
|
||||
"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b"
|
||||
"checksum libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1a429b86418868c7ea91ee50e9170683f47fd9d94f5375438ec86ec3adb74e8e"
|
||||
-"checksum libpijul 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80fd579ba6762eac3f12c9624d5496edaba5a2f2e8785bcf8310372328e06ebe"
|
||||
+"checksum libpijul 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cf6fc1aa0e9402f8283bdeb2507cfb6798d2f2f973da34c3f4b0c96a456b74cd"
|
||||
"checksum line 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ecdd22a3856203276b7854e16213139428e82922530438f36356e5b361ea4a42"
|
||||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
|
||||
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
|
@ -12,13 +12,13 @@ with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mkvtoolnix-${version}";
|
||||
version = "27.0.0";
|
||||
version = "28.2.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "mbunkus";
|
||||
repo = "mkvtoolnix";
|
||||
rev = "release-${version}";
|
||||
sha256 = "0pcf0bzs588p0a4j01jzcy5y9c4hiblz3kwfznn1sjcyxm552z6n";
|
||||
sha256 = "162qj5z9wzm63im6jnd0n95ggzdk6fzq5bxgrr0l3y82ahfb7qwa";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -12,6 +12,7 @@
|
||||
, withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null
|
||||
, jackSupport ? false
|
||||
, fetchpatch
|
||||
, removeReferencesTo
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@ -42,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||
] ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]
|
||||
++ optional jackSupport libjack2;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook perl pkgconfig ];
|
||||
nativeBuildInputs = [ autoreconfHook perl pkgconfig removeReferencesTo ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@ -60,10 +61,14 @@ stdenv.mkDerivation rec {
|
||||
/usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype
|
||||
'';
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830
|
||||
# - Touch plugins (plugins cache keyed off mtime and file size:
|
||||
# https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830
|
||||
# - Remove references to the Qt development headers (used in error messages)
|
||||
postFixup = ''
|
||||
find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';'
|
||||
$out/lib/vlc/vlc-cache-gen $out/vlc/plugins
|
||||
|
||||
remove-references-to -t "${qtbase.dev}" $out/lib/vlc/plugins/gui/libqt_plugin.so
|
||||
'';
|
||||
|
||||
# Most of the libraries are auto-detected so we don't need to set a bunch of
|
||||
@ -72,6 +77,11 @@ stdenv.mkDerivation rec {
|
||||
"--with-kde-solid=$out/share/apps/solid/actions"
|
||||
] ++ optional onlyLibVLC "--disable-vlc";
|
||||
|
||||
# Remove runtime dependencies on libraries
|
||||
postConfigure = ''
|
||||
sed -i 's|^#define CONFIGURE_LINE.*$|#define CONFIGURE_LINE "<removed>"|g' config.h
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Cross-platform media player and streaming server";
|
||||
homepage = http://www.videolan.org/vlc/;
|
||||
|
@ -0,0 +1,44 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, pkgconfig, gettext, libXpm, libGL, fltk, hicolor-icon-theme, glib, gnome2, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "jwm-settings-manager-${version}";
|
||||
version = "2018-10-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Israel-D";
|
||||
repo = "jwm-settings-manager";
|
||||
rev = "cb32a70563cf1f3927339093481542b85ec3c8c8";
|
||||
sha256 = "0d5bqf74p8zg8azns44g46q973blhmp715k8kcd73x88g7sfir8s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkgconfig
|
||||
gettext
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libXpm
|
||||
libGL
|
||||
fltk
|
||||
hicolor-icon-theme
|
||||
which # needed at runtime to locate optional programs
|
||||
glib.bin # provides gsettings
|
||||
gnome2.GConf # provides gconftool-2
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace 'CMAKE_INSTALL_PREFIX "/usr"' "CMAKE_INSTALL_PREFIX $out"
|
||||
substituteInPlace data/CMakeLists.txt \
|
||||
--replace 'DESTINATION usr/share' "DESTINATION share"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A full configuration manager for JWM";
|
||||
homepage = https://joewing.net/projects/jwm;
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.romildo ];
|
||||
};
|
||||
}
|
@ -186,6 +186,7 @@ stdenv.mkDerivation {
|
||||
}.${targetPlatform.parsed.cpu.name}
|
||||
else if targetPlatform.isPower then if targetPlatform.isBigEndian then "ppc" else "lppc"
|
||||
else if targetPlatform.isSparc then "sparc"
|
||||
else if targetPlatform.isAvr then "avr"
|
||||
else throw "unknown emulation for platform: " + targetPlatform.config;
|
||||
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
|
||||
|
||||
@ -209,7 +210,7 @@ stdenv.mkDerivation {
|
||||
## General libc support
|
||||
##
|
||||
|
||||
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
||||
echo "-L${libc_lib}${libc.libdir or "/lib"}" > $out/nix-support/libc-ldflags
|
||||
|
||||
echo "${libc_lib}" > $out/nix-support/orig-libc
|
||||
echo "${libc_dev}" > $out/nix-support/orig-libc-dev
|
||||
@ -292,6 +293,16 @@ stdenv.mkDerivation {
|
||||
hardening_unsupported_flags+=" pic"
|
||||
''
|
||||
|
||||
+ optionalString targetPlatform.isAvr ''
|
||||
hardening_unsupported_flags+=" relro bindnow"
|
||||
''
|
||||
|
||||
+ optionalString (libc != null && targetPlatform.isAvr) ''
|
||||
for isa in avr5 avr3 avr4 avr6 avr25 avr31 avr35 avr51 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack; do
|
||||
echo "-L${getLib libc}/avr/lib/$isa" >> $out/nix-support/libc-cflags
|
||||
done
|
||||
''
|
||||
|
||||
+ ''
|
||||
set +u
|
||||
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
|
@ -232,7 +232,7 @@ stdenv.mkDerivation {
|
||||
# compile, because it uses "#include_next <limits.h>" to find the
|
||||
# limits.h file in ../includes-fixed. To remedy the problem,
|
||||
# another -idirafter is necessary to add that directory again.
|
||||
echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include ${optionalString isGNU "-idirafter ${cc}/lib/gcc/*/*/include-fixed"}" > $out/nix-support/libc-cflags
|
||||
echo "-B${libc_lib}${libc.libdir or "/lib/"} -idirafter ${libc_dev}${libc.incdir or "/include"} ${optionalString isGNU "-idirafter ${cc}/lib/gcc/*/*/include-fixed"}" > $out/nix-support/libc-cflags
|
||||
|
||||
echo "${libc_lib}" > $out/nix-support/orig-libc
|
||||
echo "${libc_dev}" > $out/nix-support/orig-libc-dev
|
||||
@ -284,6 +284,20 @@ stdenv.mkDerivation {
|
||||
hardening_unsupported_flags+=" stackprotector"
|
||||
''
|
||||
|
||||
+ optionalString targetPlatform.isAvr ''
|
||||
hardening_unsupported_flags+=" stackprotector pic"
|
||||
''
|
||||
|
||||
+ optionalString (targetPlatform.libc == "newlib") ''
|
||||
hardening_unsupported_flags+=" stackprotector fortify pie pic"
|
||||
''
|
||||
|
||||
+ optionalString (libc != null && targetPlatform.isAvr) ''
|
||||
for isa in avr5 avr3 avr4 avr6 avr25 avr31 avr35 avr51 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack; do
|
||||
echo "-B${getLib libc}/avr/lib/$isa" >> $out/nix-support/libc-cflags
|
||||
done
|
||||
''
|
||||
|
||||
+ ''
|
||||
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
|
||||
|
@ -2,7 +2,7 @@
|
||||
{ crateName,
|
||||
dependencies,
|
||||
crateFeatures, libName, release, libPath,
|
||||
crateType, metadata, crateBin,
|
||||
crateType, metadata, crateBin, hasCrateBin,
|
||||
extraRustcOpts, verbose, colors }:
|
||||
|
||||
let
|
||||
@ -13,6 +13,17 @@
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
(["-C codegen-units=1"] ++ extraRustcOpts);
|
||||
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
|
||||
|
||||
# Some platforms have different names for rustc.
|
||||
rustPlatform =
|
||||
with stdenv.hostPlatform.parsed;
|
||||
let cpu_ = if cpu.name == "armv7a" then "armv7"
|
||||
else cpu.name;
|
||||
vendor_ = vendor.name;
|
||||
kernel_ = kernel.name;
|
||||
abi_ = abi.name;
|
||||
in
|
||||
"${cpu_}-${vendor_}-${kernel_}-${abi_}";
|
||||
in ''
|
||||
runHook preBuild
|
||||
norm=""
|
||||
@ -32,7 +43,8 @@
|
||||
lib_src=$1
|
||||
echo_build_heading $lib_src ${libName}
|
||||
|
||||
noisily rustc --crate-name $CRATE_NAME $lib_src --crate-type ${crateType} \
|
||||
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}
|
||||
@ -54,7 +66,8 @@
|
||||
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}
|
||||
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors} \
|
||||
${if stdenv.hostPlatform != stdenv.buildPlatform then "--target ${rustPlatform} -C linker=${stdenv.hostPlatform.config}-gcc" else ""}
|
||||
if [ "$crate_name_" != "$crate_name" ]; then
|
||||
mv target/bin/$crate_name_ target/bin/$crate_name
|
||||
fi
|
||||
@ -103,9 +116,9 @@
|
||||
tr '\n' ' ' < target/link > target/link_
|
||||
LINK=$(cat target/link_)
|
||||
fi
|
||||
|
||||
mkdir -p target/bin
|
||||
${lib.optionalString (crateBin != "") ''
|
||||
printf "%s\n" "${crateBin}" | head -n1 | tr -s ',' '\n' | while read -r BIN_NAME BIN_PATH; do
|
||||
mkdir -p target/bin
|
||||
# filter empty entries / empty "lines"
|
||||
if [[ -z "$BIN_NAME" ]]; then
|
||||
continue
|
||||
@ -141,13 +154,15 @@
|
||||
fi
|
||||
build_bin "$BIN_NAME" "$BIN_PATH"
|
||||
done
|
||||
''}
|
||||
|
||||
|
||||
${lib.optionalString (crateBin == "") ''
|
||||
${lib.optionalString (crateBin == "" && !hasCrateBin) ''
|
||||
if [[ -e src/main.rs ]]; then
|
||||
mkdir -p target/bin
|
||||
build_bin ${crateName} src/main.rs
|
||||
fi
|
||||
for i in src/bin/*.rs; do #*/
|
||||
mkdir -p target/bin
|
||||
build_bin "$(basename $i .rs)" "$i"
|
||||
done
|
||||
''}
|
||||
|
@ -4,7 +4,7 @@
|
||||
# This can be useful for deploying packages with NixOps, and to share
|
||||
# binary dependencies between projects.
|
||||
|
||||
{ lib, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }:
|
||||
{ lib, stdenv, defaultCrateOverrides, fetchCrate, rustc }:
|
||||
|
||||
let
|
||||
# This doesn't appear to be officially documented anywhere yet.
|
||||
@ -16,7 +16,7 @@ let
|
||||
makeDeps = dependencies:
|
||||
(lib.concatMapStringsSep " " (dep:
|
||||
let extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName; in
|
||||
(if dep.crateType == "lib" then
|
||||
(if lib.lists.any (x: x == "lib") dep.crateType then
|
||||
" --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib"
|
||||
else
|
||||
" --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
|
||||
@ -86,7 +86,8 @@ stdenv.mkDerivation (rec {
|
||||
else
|
||||
fetchCrate { inherit (crate) crateName version sha256; };
|
||||
name = "rust_${crate.crateName}-${crate.version}";
|
||||
buildInputs = [ rust ncurses ] ++ (crate.buildInputs or []) ++ buildInputs_;
|
||||
depsBuildBuild = [ rust stdenv.cc ];
|
||||
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
||||
dependencies =
|
||||
builtins.map
|
||||
(dep: dep.override { rust = rust; release = release; verbose = verbose; crateOverrides = crateOverrides; })
|
||||
@ -122,15 +123,16 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
) "" crate.crateBin
|
||||
else "";
|
||||
hasCrateBin = crate ? crateBin;
|
||||
|
||||
build = crate.build or "";
|
||||
workspace_member = crate.workspace_member or ".";
|
||||
crateVersion = crate.version;
|
||||
crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [];
|
||||
crateType =
|
||||
if lib.attrByPath ["procMacro"] false crate then "proc-macro" else
|
||||
if lib.attrByPath ["plugin"] false crate then "dylib" else
|
||||
(crate.type or "lib");
|
||||
if lib.attrByPath ["procMacro"] false crate then ["proc-macro"] else
|
||||
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 []);
|
||||
configurePhase = configureCrate {
|
||||
@ -143,7 +145,7 @@ stdenv.mkDerivation (rec {
|
||||
buildPhase = buildCrate {
|
||||
inherit crateName dependencies
|
||||
crateFeatures libName release libPath crateType
|
||||
metadata crateBin verbose colors
|
||||
metadata crateBin hasCrateBin verbose colors
|
||||
extraRustcOpts;
|
||||
};
|
||||
installPhase = installCrate crateName metadata;
|
||||
|
24
pkgs/build-support/rust/build-rust-crate/helpers.nix
Normal file
24
pkgs/build-support/rust/build-rust-crate/helpers.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{stdenv, lib}:
|
||||
{
|
||||
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
||||
abi = stdenv.hostPlatform.parsed.abi.name;
|
||||
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.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:
|
||||
if feat.${featureName} or false then
|
||||
[ featureName ] ++ features
|
||||
else
|
||||
features
|
||||
) [] (builtins.attrNames feat);
|
||||
include = includedFiles: src: builtins.filterSource (path: type:
|
||||
lib.lists.any (f:
|
||||
let p = toString (src + ("/" + f)); in
|
||||
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
|
||||
) includedFiles
|
||||
) src;
|
||||
exclude = excludedFiles: src: builtins.filterSource (path: type:
|
||||
lib.lists.all (f:
|
||||
!lib.strings.hasPrefix (toString (src + ("/" + f))) path
|
||||
) excludedFiles
|
||||
) src;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
2050
pkgs/build-support/rust/crates-io.nix
Normal file
2050
pkgs/build-support/rust/crates-io.nix
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,76 +6,97 @@ let
|
||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||
in
|
||||
{
|
||||
cairo-rs = attrs: {
|
||||
buildInputs = [ cairo ];
|
||||
};
|
||||
|
||||
cargo = attrs: {
|
||||
buildInputs = [ openssl zlib curl ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation libiconv ];
|
||||
# TODO: buildRustCrate seems to use incorrect default inference
|
||||
crateBin = [ { name = "cargo"; path = "src/bin/cargo.rs"; } ];
|
||||
};
|
||||
|
||||
cargo-vendor = attrs: {
|
||||
buildInputs = [ openssl zlib curl ];
|
||||
# TODO: this defaults to cargo_vendor; needs to be cargo-vendor to
|
||||
# be considered a cargo subcommand.
|
||||
crateBin = [ { name = "cargo-vendor"; path = "src/main.rs"; } ];
|
||||
};
|
||||
|
||||
curl-sys = attrs: {
|
||||
buildInputs = [ pkgconfig zlib curl ];
|
||||
propagatedBuildInputs = [ curl zlib ];
|
||||
extraLinkFlags = ["-L${zlib.out}/lib"];
|
||||
};
|
||||
libgit2-sys = attrs: {
|
||||
LIBGIT2_SYS_USE_PKG_CONFIG = true;
|
||||
buildInputs = [ pkgconfig openssl zlib libgit2 ];
|
||||
};
|
||||
libsqlite3-sys = attrs: {
|
||||
buildInputs = [ pkgconfig sqlite ];
|
||||
};
|
||||
libssh2-sys = attrs: {
|
||||
buildInputs = [ pkgconfig openssl zlib libssh2 ];
|
||||
};
|
||||
openssl = attrs: {
|
||||
buildInputs = [ openssl ];
|
||||
};
|
||||
openssl-sys = attrs: {
|
||||
buildInputs = [ pkgconfig openssl ];
|
||||
};
|
||||
|
||||
dbus = attrs: {
|
||||
buildInputs = [ pkgconfig dbus ];
|
||||
};
|
||||
libdbus-sys = attrs: {
|
||||
buildInputs = [ pkgconfig dbus ];
|
||||
};
|
||||
|
||||
gobject-sys = attrs: {
|
||||
buildInputs = [ dbus-glib ];
|
||||
};
|
||||
|
||||
gio-sys = attrs: {
|
||||
buildInputs = [ dbus-glib ];
|
||||
};
|
||||
|
||||
gdk-pixbuf-sys = attrs: {
|
||||
buildInputs = [ dbus-glib ];
|
||||
};
|
||||
|
||||
gdk-pixbuf = attrs: {
|
||||
buildInputs = [ gdk_pixbuf ];
|
||||
};
|
||||
|
||||
libgit2-sys = attrs: {
|
||||
LIBGIT2_SYS_USE_PKG_CONFIG = true;
|
||||
buildInputs = [ pkgconfig openssl zlib libgit2 ];
|
||||
};
|
||||
|
||||
libsqlite3-sys = attrs: {
|
||||
buildInputs = [ pkgconfig sqlite ];
|
||||
};
|
||||
|
||||
libssh2-sys = attrs: {
|
||||
buildInputs = [ pkgconfig openssl zlib libssh2 ];
|
||||
};
|
||||
|
||||
libdbus-sys = attrs: {
|
||||
buildInputs = [ pkgconfig dbus ];
|
||||
};
|
||||
|
||||
openssl = attrs: {
|
||||
buildInputs = [ openssl ];
|
||||
};
|
||||
|
||||
openssl-sys = attrs: {
|
||||
buildInputs = [ pkgconfig openssl ];
|
||||
};
|
||||
|
||||
pq-sys = attr: {
|
||||
buildInputs = [ pkgconfig postgresql ];
|
||||
};
|
||||
|
||||
rink = attrs: {
|
||||
buildInputs = [ gmp ];
|
||||
crateBin = [ { name = "rink"; path = "src/bin/rink.rs"; } ];
|
||||
};
|
||||
cairo-rs = attrs: {
|
||||
buildInputs = [ cairo ];
|
||||
|
||||
security-framework-sys = attr: {
|
||||
propagatedBuildInputs = [ Security ];
|
||||
};
|
||||
xcb = attrs: {
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
serde_derive = attrs: {
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
||||
};
|
||||
|
||||
thrussh-libsodium = attrs: {
|
||||
buildInputs = [ pkgconfig libsodium ];
|
||||
};
|
||||
pq-sys = attr: {
|
||||
buildInputs = [ pkgconfig postgresql ];
|
||||
};
|
||||
security-framework-sys = attr: {
|
||||
propagatedBuildInputs = [ Security ];
|
||||
|
||||
xcb = attrs: {
|
||||
buildInputs = [ python3 ];
|
||||
};
|
||||
}
|
||||
|
@ -37,9 +37,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
dest=$out/share/fonts/truetype
|
||||
mkdir -p $dest
|
||||
find . -name "*.ttf" -exec cp -v {} $dest \;
|
||||
chmod -x $dest/*.ttf
|
||||
find . -name '*.ttf' -exec install -m 444 -Dt $dest '{}' +
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wireless-regdb-${version}";
|
||||
version = "2018.09.07";
|
||||
version = "2018.10.24";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.kernel.org/pub/software/network/wireless-regdb/${name}.tar.xz";
|
||||
sha256 = "0nnn10pk94qnrdy55pwcr7506bxdsywa88a3shgqxsd3y53q2sx3";
|
||||
sha256 = "05lixkdzy7f3wpan6svh1n9f70rs0kfw6hl6p34sl8bxqxd88ghd";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user