Merge master into haskell-updates
This commit is contained in:
commit
8d865daa72
22
.github/CODEOWNERS
vendored
22
.github/CODEOWNERS
vendored
@ -23,7 +23,7 @@
|
||||
|
||||
# Libraries
|
||||
/lib @edolstra @infinisil
|
||||
/lib/systems @alyssais @ericson2314 @matthewbauer @amjoseph-nixpkgs
|
||||
/lib/systems @alyssais @ericson2314 @amjoseph-nixpkgs
|
||||
/lib/generators.nix @edolstra @Profpatsch
|
||||
/lib/cli.nix @edolstra @Profpatsch
|
||||
/lib/debug.nix @edolstra @Profpatsch
|
||||
@ -36,12 +36,12 @@
|
||||
/default.nix @Ericson2314
|
||||
/pkgs/top-level/default.nix @Ericson2314
|
||||
/pkgs/top-level/impure.nix @Ericson2314
|
||||
/pkgs/top-level/stage.nix @Ericson2314 @matthewbauer
|
||||
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
|
||||
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
|
||||
/pkgs/stdenv/generic @Ericson2314 @matthewbauer @amjoseph-nixpkgs
|
||||
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @matthewbauer @piegamesde
|
||||
/pkgs/stdenv/cross @Ericson2314 @matthewbauer @amjoseph-nixpkgs
|
||||
/pkgs/top-level/stage.nix @Ericson2314
|
||||
/pkgs/top-level/splice.nix @Ericson2314
|
||||
/pkgs/top-level/release-cross.nix @Ericson2314
|
||||
/pkgs/stdenv/generic @Ericson2314 @amjoseph-nixpkgs
|
||||
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @piegamesde
|
||||
/pkgs/stdenv/cross @Ericson2314 @amjoseph-nixpkgs
|
||||
/pkgs/build-support/cc-wrapper @Ericson2314 @amjoseph-nixpkgs
|
||||
/pkgs/build-support/bintools-wrapper @Ericson2314
|
||||
/pkgs/build-support/setup-hooks @Ericson2314
|
||||
@ -147,12 +147,8 @@
|
||||
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
|
||||
|
||||
# C compilers
|
||||
/pkgs/development/compilers/gcc @matthewbauer @amjoseph-nixpkgs
|
||||
/pkgs/development/compilers/llvm @matthewbauer @RaitoBezarius
|
||||
|
||||
# Compatibility stuff
|
||||
/pkgs/top-level/unix-tools.nix @matthewbauer
|
||||
/pkgs/development/tools/xcbuild @matthewbauer
|
||||
/pkgs/development/compilers/gcc @amjoseph-nixpkgs
|
||||
/pkgs/development/compilers/llvm @RaitoBezarius
|
||||
|
||||
# Audio
|
||||
/nixos/modules/services/audio/botamusique.nix @mweinelt
|
||||
|
@ -9,7 +9,7 @@ File sets are easy and safe to use, providing obvious and composable semantics w
|
||||
These sections apply to the entire library.
|
||||
See the [function reference](#sec-functions-library-fileset) for function-specific documentation.
|
||||
|
||||
The file set library is currently very limited but is being expanded to include more functions over time.
|
||||
The file set library is currently somewhat limited but is being expanded to include more functions over time.
|
||||
|
||||
## Implicit coercion from paths to file sets {#sec-fileset-path-coercion}
|
||||
|
||||
|
@ -41,13 +41,21 @@ An attribute set with these values:
|
||||
- `_type` (constant string `"fileset"`):
|
||||
Tag to indicate this value is a file set.
|
||||
|
||||
- `_internalVersion` (constant string equal to the current version):
|
||||
Version of the representation
|
||||
- `_internalVersion` (constant `2`, the current version):
|
||||
Version of the representation.
|
||||
|
||||
- `_internalBase` (path):
|
||||
Any files outside of this path cannot influence the set of files.
|
||||
This is always a directory.
|
||||
|
||||
- `_internalBaseRoot` (path):
|
||||
The filesystem root of `_internalBase`, same as `(lib.path.splitRoot _internalBase).root`.
|
||||
This is here because this needs to be computed anyway, and this computation shouldn't be duplicated.
|
||||
|
||||
- `_internalBaseComponents` (list of strings):
|
||||
The path components of `_internalBase`, same as `lib.path.subpath.components (lib.path.splitRoot _internalBase).subpath`.
|
||||
This is here because this needs to be computed anyway, and this computation shouldn't be duplicated.
|
||||
|
||||
- `_internalTree` ([filesetTree](#filesettree)):
|
||||
A tree representation of all included files under `_internalBase`.
|
||||
|
||||
@ -59,8 +67,8 @@ An attribute set with these values:
|
||||
One of the following:
|
||||
|
||||
- `{ <name> = filesetTree; }`:
|
||||
A directory with a nested `filesetTree` value for every directory entry.
|
||||
Even entries that aren't included are present as `null` because it improves laziness and allows using this as a sort of `builtins.readDir` cache.
|
||||
A directory with a nested `filesetTree` value for directory entries.
|
||||
Entries not included may either be omitted or set to `null`, as necessary to improve efficiency or laziness.
|
||||
|
||||
- `"directory"`:
|
||||
A directory with all its files included recursively, allowing early cutoff for some operations.
|
||||
@ -169,15 +177,9 @@ Arguments:
|
||||
## To update in the future
|
||||
|
||||
Here's a list of places in the library that need to be updated in the future:
|
||||
- > The file set library is currently very limited but is being expanded to include more functions over time.
|
||||
- > The file set library is currently somewhat limited but is being expanded to include more functions over time.
|
||||
|
||||
in [the manual](../../doc/functions/fileset.section.md)
|
||||
- > Currently the only way to construct file sets is using implicit coercion from paths.
|
||||
|
||||
in [the `toSource` reference](./default.nix)
|
||||
- > For now filesets are always paths
|
||||
|
||||
in [the `toSource` implementation](./default.nix), also update the variable name there
|
||||
- Once a tracing function exists, `__noEval` in [internal.nix](./internal.nix) should mention it
|
||||
- If/Once a function to convert `lib.sources` values into file sets exists, the `_coerce` and `toSource` functions should be updated to mention that function in the error when such a value is passed
|
||||
- If/Once a function exists that can optionally include a path depending on whether it exists, the error message for the path not existing in `_coerce` should mention the new function
|
||||
|
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p sta jq bc nix -I nixpkgs=../..
|
||||
# shellcheck disable=SC2016
|
||||
|
||||
# Benchmarks lib.fileset
|
||||
# Run:
|
||||
@ -28,38 +30,6 @@ work="$tmp/work"
|
||||
mkdir "$work"
|
||||
cd "$work"
|
||||
|
||||
# Create a fairly populated tree
|
||||
touch f{0..5}
|
||||
mkdir d{0..5}
|
||||
mkdir e{0..5}
|
||||
touch d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}/d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}/e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/d{0..5}/d{0..5}/f{0..5}
|
||||
|
||||
bench() {
|
||||
NIX_PATH=nixpkgs=$1 NIX_SHOW_STATS=1 NIX_SHOW_STATS_PATH=$tmp/stats.json \
|
||||
nix-instantiate --eval --strict --show-trace >/dev/null \
|
||||
--expr '(import <nixpkgs/lib>).fileset.toSource { root = ./.; fileset = ./.; }'
|
||||
cat "$tmp/stats.json"
|
||||
}
|
||||
|
||||
echo "Running benchmark on index" >&2
|
||||
bench "$nixpkgs" > "$tmp/new.json"
|
||||
(
|
||||
echo "Checking out $compareTo" >&2
|
||||
git -C "$nixpkgs" worktree add --quiet "$tmp/worktree" "$compareTo"
|
||||
trap 'git -C "$nixpkgs" worktree remove "$tmp/worktree"' EXIT
|
||||
echo "Running benchmark on $compareTo" >&2
|
||||
bench "$tmp/worktree" > "$tmp/old.json"
|
||||
)
|
||||
|
||||
declare -a stats=(
|
||||
".envs.elements"
|
||||
".envs.number"
|
||||
@ -77,18 +47,94 @@ declare -a stats=(
|
||||
".values.number"
|
||||
)
|
||||
|
||||
different=0
|
||||
for stat in "${stats[@]}"; do
|
||||
oldValue=$(jq "$stat" "$tmp/old.json")
|
||||
newValue=$(jq "$stat" "$tmp/new.json")
|
||||
if (( oldValue != newValue )); then
|
||||
percent=$(bc <<< "scale=100; result = 100/$oldValue*$newValue; scale=4; result / 1")
|
||||
if (( oldValue < newValue )); then
|
||||
echo -e "Statistic $stat ($newValue) is \e[0;31m$percent% (+$(( newValue - oldValue )))\e[0m of the old value $oldValue" >&2
|
||||
else
|
||||
echo -e "Statistic $stat ($newValue) is \e[0;32m$percent% (-$(( oldValue - newValue )))\e[0m of the old value $oldValue" >&2
|
||||
runs=10
|
||||
|
||||
run() {
|
||||
# Empty the file
|
||||
: > cpuTimes
|
||||
|
||||
for i in $(seq 0 "$runs"); do
|
||||
NIX_PATH=nixpkgs=$1 NIX_SHOW_STATS=1 NIX_SHOW_STATS_PATH=$tmp/stats.json \
|
||||
nix-instantiate --eval --strict --show-trace >/dev/null \
|
||||
--expr 'with import <nixpkgs/lib>; with fileset; '"$2"
|
||||
|
||||
# Only measure the time after the first run, one is warmup
|
||||
if (( i > 0 )); then
|
||||
jq '.cpuTime' "$tmp/stats.json" >> cpuTimes
|
||||
fi
|
||||
(( different++ )) || true
|
||||
fi
|
||||
done
|
||||
echo "$different stats differ between the current tree and $compareTo"
|
||||
done
|
||||
|
||||
# Compute mean and standard deviation
|
||||
read -r mean sd < <(sta --mean --sd --brief <cpuTimes)
|
||||
|
||||
jq --argjson mean "$mean" --argjson sd "$sd" \
|
||||
'.cpuTimeMean = $mean | .cpuTimeSd = $sd' \
|
||||
"$tmp/stats.json"
|
||||
}
|
||||
|
||||
bench() {
|
||||
echo "Benchmarking expression $1" >&2
|
||||
#echo "Running benchmark on index" >&2
|
||||
run "$nixpkgs" "$1" > "$tmp/new.json"
|
||||
(
|
||||
#echo "Checking out $compareTo" >&2
|
||||
git -C "$nixpkgs" worktree add --quiet "$tmp/worktree" "$compareTo"
|
||||
trap 'git -C "$nixpkgs" worktree remove "$tmp/worktree"' EXIT
|
||||
#echo "Running benchmark on $compareTo" >&2
|
||||
run "$tmp/worktree" "$1" > "$tmp/old.json"
|
||||
)
|
||||
|
||||
read -r oldMean oldSd newMean newSd percentageMean percentageSd < \
|
||||
<(jq -rn --slurpfile old "$tmp/old.json" --slurpfile new "$tmp/new.json" \
|
||||
' $old[0].cpuTimeMean as $om
|
||||
| $old[0].cpuTimeSd as $os
|
||||
| $new[0].cpuTimeMean as $nm
|
||||
| $new[0].cpuTimeSd as $ns
|
||||
| (100 / $om * $nm) as $pm
|
||||
# Copied from https://github.com/sharkdp/hyperfine/blob/b38d550b89b1dab85139eada01c91a60798db9cc/src/benchmark/relative_speed.rs#L46-L53
|
||||
| ($pm * pow(pow($ns / $nm; 2) + pow($os / $om; 2); 0.5)) as $ps
|
||||
| [ $om, $os, $nm, $ns, $pm, $ps ]
|
||||
| @sh')
|
||||
|
||||
echo -e "Mean CPU time $newMean (σ = $newSd) for $runs runs is \e[0;33m$percentageMean% (σ = $percentageSd%)\e[0m of the old value $oldMean (σ = $oldSd)" >&2
|
||||
|
||||
different=0
|
||||
for stat in "${stats[@]}"; do
|
||||
oldValue=$(jq "$stat" "$tmp/old.json")
|
||||
newValue=$(jq "$stat" "$tmp/new.json")
|
||||
if (( oldValue != newValue )); then
|
||||
percent=$(bc <<< "scale=100; result = 100/$oldValue*$newValue; scale=4; result / 1")
|
||||
if (( oldValue < newValue )); then
|
||||
echo -e "Statistic $stat ($newValue) is \e[0;31m$percent% (+$(( newValue - oldValue )))\e[0m of the old value $oldValue" >&2
|
||||
else
|
||||
echo -e "Statistic $stat ($newValue) is \e[0;32m$percent% (-$(( oldValue - newValue )))\e[0m of the old value $oldValue" >&2
|
||||
fi
|
||||
(( different++ )) || true
|
||||
fi
|
||||
done
|
||||
echo "$different stats differ between the current tree and $compareTo"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Create a fairly populated tree
|
||||
touch f{0..5}
|
||||
mkdir d{0..5}
|
||||
mkdir e{0..5}
|
||||
touch d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/d{0..5}/f{0..5}
|
||||
mkdir -p d{0..5}/d{0..5}/d{0..5}/d{0..5}
|
||||
mkdir -p e{0..5}/e{0..5}/e{0..5}/e{0..5}
|
||||
touch d{0..5}/d{0..5}/d{0..5}/d{0..5}/f{0..5}
|
||||
|
||||
bench 'toSource { root = ./.; fileset = ./.; }'
|
||||
|
||||
rm -rf -- *
|
||||
|
||||
touch {0..1000}
|
||||
bench 'toSource { root = ./.; fileset = unions (mapAttrsToList (name: value: ./. + "/${name}") (builtins.readDir ./.)); }'
|
||||
rm -rf -- *
|
||||
|
@ -3,15 +3,22 @@ let
|
||||
|
||||
inherit (import ./internal.nix { inherit lib; })
|
||||
_coerce
|
||||
_coerceMany
|
||||
_toSourceFilter
|
||||
_unionMany
|
||||
;
|
||||
|
||||
inherit (builtins)
|
||||
isList
|
||||
isPath
|
||||
pathExists
|
||||
typeOf
|
||||
;
|
||||
|
||||
inherit (lib.lists)
|
||||
imap0
|
||||
;
|
||||
|
||||
inherit (lib.path)
|
||||
hasPrefix
|
||||
splitRoot
|
||||
@ -29,6 +36,10 @@ let
|
||||
cleanSourceWith
|
||||
;
|
||||
|
||||
inherit (lib.trivial)
|
||||
pipe
|
||||
;
|
||||
|
||||
in {
|
||||
|
||||
/*
|
||||
@ -51,16 +62,51 @@ in {
|
||||
} -> SourceLike
|
||||
|
||||
Example:
|
||||
# Import the current directory into the store but only include files under ./src
|
||||
toSource { root = ./.; fileset = ./src; }
|
||||
# Import the current directory into the store
|
||||
# but only include files under ./src
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = ./src;
|
||||
}
|
||||
=> "/nix/store/...-source"
|
||||
|
||||
# The file set coerced from path ./bar could contain files outside the root ./foo, which is not allowed
|
||||
toSource { root = ./foo; fileset = ./bar; }
|
||||
# Import the current directory into the store
|
||||
# but only include ./Makefile and all files under ./src
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = union
|
||||
./Makefile
|
||||
./src;
|
||||
}
|
||||
=> "/nix/store/...-source"
|
||||
|
||||
# Trying to include a file outside the root will fail
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = unions [
|
||||
./Makefile
|
||||
./src
|
||||
../LICENSE
|
||||
];
|
||||
}
|
||||
=> <error>
|
||||
|
||||
# The root needs to point to a directory that contains all the files
|
||||
toSource {
|
||||
root = ../.;
|
||||
fileset = unions [
|
||||
./Makefile
|
||||
./src
|
||||
../LICENSE
|
||||
];
|
||||
}
|
||||
=> "/nix/store/...-source"
|
||||
|
||||
# The root has to be a local filesystem path
|
||||
toSource { root = "/nix/store/...-source"; fileset = ./.; }
|
||||
toSource {
|
||||
root = "/nix/store/...-source";
|
||||
fileset = ./.;
|
||||
}
|
||||
=> <error>
|
||||
*/
|
||||
toSource = {
|
||||
@ -69,7 +115,7 @@ in {
|
||||
Paths in [strings](https://nixos.org/manual/nix/stable/language/values.html#type-string), including Nix store paths, cannot be passed as `root`.
|
||||
`root` has to be a directory.
|
||||
|
||||
<!-- Ignore the indentation here, this is a nixdoc rendering bug that needs to be fixed -->
|
||||
<!-- Ignore the indentation here, this is a nixdoc rendering bug that needs to be fixed: https://github.com/nix-community/nixdoc/issues/75 -->
|
||||
:::{.note}
|
||||
Changing `root` only affects the directory structure of the resulting store path, it does not change which files are added to the store.
|
||||
The only way to change which files get added to the store is by changing the `fileset` attribute.
|
||||
@ -78,25 +124,32 @@ The only way to change which files get added to the store is by changing the `fi
|
||||
root,
|
||||
/*
|
||||
(required) The file set whose files to import into the store.
|
||||
Currently the only way to construct file sets is using [implicit coercion from paths](#sec-fileset-path-coercion).
|
||||
If a directory does not recursively contain any file, it is omitted from the store path contents.
|
||||
File sets can be created using other functions in this library.
|
||||
This argument can also be a path,
|
||||
which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
|
||||
|
||||
<!-- Ignore the indentation here, this is a nixdoc rendering bug that needs to be fixed: https://github.com/nix-community/nixdoc/issues/75 -->
|
||||
:::{.note}
|
||||
If a directory does not recursively contain any file, it is omitted from the store path contents.
|
||||
:::
|
||||
|
||||
*/
|
||||
fileset,
|
||||
}:
|
||||
let
|
||||
# We cannot rename matched attribute arguments, so let's work around it with an extra `let in` statement
|
||||
# For now filesets are always paths
|
||||
filesetPath = fileset;
|
||||
filesetArg = fileset;
|
||||
in
|
||||
let
|
||||
fileset = _coerce "lib.fileset.toSource: `fileset`" filesetPath;
|
||||
fileset = _coerce "lib.fileset.toSource: `fileset`" filesetArg;
|
||||
rootFilesystemRoot = (splitRoot root).root;
|
||||
filesetFilesystemRoot = (splitRoot fileset._internalBase).root;
|
||||
sourceFilter = _toSourceFilter fileset;
|
||||
in
|
||||
if ! isPath root then
|
||||
if isStringLike root then
|
||||
throw ''
|
||||
lib.fileset.toSource: `root` "${toString root}" is a string-like value, but it should be a path instead.
|
||||
lib.fileset.toSource: `root` ("${toString root}") is a string-like value, but it should be a path instead.
|
||||
Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
|
||||
else
|
||||
throw ''
|
||||
@ -105,27 +158,124 @@ The only way to change which files get added to the store is by changing the `fi
|
||||
# See also ../path/README.md
|
||||
else if rootFilesystemRoot != filesetFilesystemRoot then
|
||||
throw ''
|
||||
lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` "${toString root}":
|
||||
lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` ("${toString root}"):
|
||||
`root`: root "${toString rootFilesystemRoot}"
|
||||
`fileset`: root "${toString filesetFilesystemRoot}"
|
||||
Different roots are not supported.''
|
||||
else if ! pathExists root then
|
||||
throw ''
|
||||
lib.fileset.toSource: `root` ${toString root} does not exist.''
|
||||
lib.fileset.toSource: `root` (${toString root}) does not exist.''
|
||||
else if pathType root != "directory" then
|
||||
throw ''
|
||||
lib.fileset.toSource: `root` ${toString root} is a file, but it should be a directory instead. Potential solutions:
|
||||
lib.fileset.toSource: `root` (${toString root}) is a file, but it should be a directory instead. Potential solutions:
|
||||
- If you want to import the file into the store _without_ a containing directory, use string interpolation or `builtins.path` instead of this function.
|
||||
- If you want to import the file into the store _with_ a containing directory, set `root` to the containing directory, such as ${toString (dirOf root)}, and set `fileset` to the file path.''
|
||||
else if ! hasPrefix root fileset._internalBase then
|
||||
throw ''
|
||||
lib.fileset.toSource: `fileset` could contain files in ${toString fileset._internalBase}, which is not under the `root` ${toString root}. Potential solutions:
|
||||
lib.fileset.toSource: `fileset` could contain files in ${toString fileset._internalBase}, which is not under the `root` (${toString root}). Potential solutions:
|
||||
- Set `root` to ${toString fileset._internalBase} or any directory higher up. This changes the layout of the resulting store path.
|
||||
- Set `fileset` to a file set that cannot contain files outside the `root` ${toString root}. This could change the files included in the result.''
|
||||
- Set `fileset` to a file set that cannot contain files outside the `root` (${toString root}). This could change the files included in the result.''
|
||||
else
|
||||
builtins.seq sourceFilter
|
||||
cleanSourceWith {
|
||||
name = "source";
|
||||
src = root;
|
||||
filter = _toSourceFilter fileset;
|
||||
filter = sourceFilter;
|
||||
};
|
||||
|
||||
/*
|
||||
The file set containing all files that are in either of two given file sets.
|
||||
This is the same as [`unions`](#function-library-lib.fileset.unions),
|
||||
but takes just two file sets instead of a list.
|
||||
See also [Union (set theory)](https://en.wikipedia.org/wiki/Union_(set_theory)).
|
||||
|
||||
The given file sets are evaluated as lazily as possible,
|
||||
with the first argument being evaluated first if needed.
|
||||
|
||||
Type:
|
||||
union :: FileSet -> FileSet -> FileSet
|
||||
|
||||
Example:
|
||||
# Create a file set containing the file `Makefile`
|
||||
# and all files recursively in the `src` directory
|
||||
union ./Makefile ./src
|
||||
|
||||
# Create a file set containing the file `Makefile`
|
||||
# and the LICENSE file from the parent directory
|
||||
union ./Makefile ../LICENSE
|
||||
*/
|
||||
union =
|
||||
# The first file set.
|
||||
# This argument can also be a path,
|
||||
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
|
||||
fileset1:
|
||||
# The second file set.
|
||||
# This argument can also be a path,
|
||||
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
|
||||
fileset2:
|
||||
_unionMany
|
||||
(_coerceMany "lib.fileset.union" [
|
||||
{
|
||||
context = "first argument";
|
||||
value = fileset1;
|
||||
}
|
||||
{
|
||||
context = "second argument";
|
||||
value = fileset2;
|
||||
}
|
||||
]);
|
||||
|
||||
/*
|
||||
The file set containing all files that are in any of the given file sets.
|
||||
This is the same as [`union`](#function-library-lib.fileset.unions),
|
||||
but takes a list of file sets instead of just two.
|
||||
See also [Union (set theory)](https://en.wikipedia.org/wiki/Union_(set_theory)).
|
||||
|
||||
The given file sets are evaluated as lazily as possible,
|
||||
with earlier elements being evaluated first if needed.
|
||||
|
||||
Type:
|
||||
unions :: [ FileSet ] -> FileSet
|
||||
|
||||
Example:
|
||||
# Create a file set containing selected files
|
||||
unions [
|
||||
# Include the single file `Makefile` in the current directory
|
||||
# This errors if the file doesn't exist
|
||||
./Makefile
|
||||
|
||||
# Recursively include all files in the `src/code` directory
|
||||
# If this directory is empty this has no effect
|
||||
./src/code
|
||||
|
||||
# Include the files `run.sh` and `unit.c` from the `tests` directory
|
||||
./tests/run.sh
|
||||
./tests/unit.c
|
||||
|
||||
# Include the `LICENSE` file from the parent directory
|
||||
../LICENSE
|
||||
]
|
||||
*/
|
||||
unions =
|
||||
# A list of file sets.
|
||||
# Must contain at least 1 element.
|
||||
# The elements can also be paths,
|
||||
# which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
|
||||
filesets:
|
||||
if ! isList filesets then
|
||||
throw "lib.fileset.unions: Expected argument to be a list, but got a ${typeOf filesets}."
|
||||
else if filesets == [ ] then
|
||||
# TODO: This could be supported, but requires an extra internal representation for the empty file set, which would be special for not having a base path.
|
||||
throw "lib.fileset.unions: Expected argument to be a list with at least one element, but it contains no elements."
|
||||
else
|
||||
pipe filesets [
|
||||
# Annotate the elements with context, used by _coerceMany for better errors
|
||||
(imap0 (i: el: {
|
||||
context = "element ${toString i}";
|
||||
value = el;
|
||||
}))
|
||||
(_coerceMany "lib.fileset.unions")
|
||||
_unionMany
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ let
|
||||
inherit (lib.attrsets)
|
||||
attrValues
|
||||
mapAttrs
|
||||
setAttrByPath
|
||||
zipAttrsWith
|
||||
;
|
||||
|
||||
inherit (lib.filesystem)
|
||||
@ -22,8 +24,16 @@ let
|
||||
|
||||
inherit (lib.lists)
|
||||
all
|
||||
commonPrefix
|
||||
drop
|
||||
elemAt
|
||||
filter
|
||||
findFirstIndex
|
||||
foldl'
|
||||
head
|
||||
length
|
||||
sublist
|
||||
tail
|
||||
;
|
||||
|
||||
inherit (lib.path)
|
||||
@ -33,6 +43,7 @@ let
|
||||
|
||||
inherit (lib.path.subpath)
|
||||
components
|
||||
join
|
||||
;
|
||||
|
||||
inherit (lib.strings)
|
||||
@ -50,28 +61,61 @@ in
|
||||
rec {
|
||||
|
||||
# If you change the internal representation, make sure to:
|
||||
# - Update this version
|
||||
# - Adjust _coerce to also accept and coerce older versions
|
||||
# - Increment this version
|
||||
# - Add an additional migration function below
|
||||
# - Update the description of the internal representation in ./README.md
|
||||
_currentVersion = 0;
|
||||
_currentVersion = 2;
|
||||
|
||||
# Migrations between versions. The 0th element converts from v0 to v1, and so on
|
||||
migrations = [
|
||||
# Convert v0 into v1: Add the _internalBase{Root,Components} attributes
|
||||
(
|
||||
filesetV0:
|
||||
let
|
||||
parts = splitRoot filesetV0._internalBase;
|
||||
in
|
||||
filesetV0 // {
|
||||
_internalVersion = 1;
|
||||
_internalBaseRoot = parts.root;
|
||||
_internalBaseComponents = components parts.subpath;
|
||||
}
|
||||
)
|
||||
|
||||
# Convert v1 into v2: filesetTree's can now also omit attributes to signal paths not being included
|
||||
(
|
||||
filesetV1:
|
||||
# This change is backwards compatible (but not forwards compatible, so we still need a new version)
|
||||
filesetV1 // {
|
||||
_internalVersion = 2;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
# Create a fileset, see ./README.md#fileset
|
||||
# Type: path -> filesetTree -> fileset
|
||||
_create = base: tree: {
|
||||
_type = "fileset";
|
||||
_create = base: tree:
|
||||
let
|
||||
# Decompose the base into its components
|
||||
# See ../path/README.md for why we're not just using `toString`
|
||||
parts = splitRoot base;
|
||||
in
|
||||
{
|
||||
_type = "fileset";
|
||||
|
||||
_internalVersion = _currentVersion;
|
||||
_internalBase = base;
|
||||
_internalTree = tree;
|
||||
_internalVersion = _currentVersion;
|
||||
_internalBase = base;
|
||||
_internalBaseRoot = parts.root;
|
||||
_internalBaseComponents = components parts.subpath;
|
||||
_internalTree = tree;
|
||||
|
||||
# Double __ to make it be evaluated and ordered first
|
||||
__noEval = throw ''
|
||||
lib.fileset: Directly evaluating a file set is not supported. Use `lib.fileset.toSource` to turn it into a usable source instead.'';
|
||||
};
|
||||
# Double __ to make it be evaluated and ordered first
|
||||
__noEval = throw ''
|
||||
lib.fileset: Directly evaluating a file set is not supported. Use `lib.fileset.toSource` to turn it into a usable source instead.'';
|
||||
};
|
||||
|
||||
# Coerce a value to a fileset, erroring when the value cannot be coerced.
|
||||
# The string gives the context for error messages.
|
||||
# Type: String -> Path -> fileset
|
||||
# Type: String -> (fileset | Path) -> fileset
|
||||
_coerce = context: value:
|
||||
if value._type or "" == "fileset" then
|
||||
if value._internalVersion > _currentVersion then
|
||||
@ -80,22 +124,53 @@ rec {
|
||||
- Internal version of the file set: ${toString value._internalVersion}
|
||||
- Internal version of the library: ${toString _currentVersion}
|
||||
Make sure to update your Nixpkgs to have a newer version of `lib.fileset`.''
|
||||
else if value._internalVersion < _currentVersion then
|
||||
let
|
||||
# Get all the migration functions necessary to convert from the old to the current version
|
||||
migrationsToApply = sublist value._internalVersion (_currentVersion - value._internalVersion) migrations;
|
||||
in
|
||||
foldl' (value: migration: migration value) value migrationsToApply
|
||||
else
|
||||
value
|
||||
else if ! isPath value then
|
||||
if isStringLike value then
|
||||
throw ''
|
||||
${context} "${toString value}" is a string-like value, but it should be a path instead.
|
||||
${context} ("${toString value}") is a string-like value, but it should be a path instead.
|
||||
Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
|
||||
else
|
||||
throw ''
|
||||
${context} is of type ${typeOf value}, but it should be a path instead.''
|
||||
else if ! pathExists value then
|
||||
throw ''
|
||||
${context} ${toString value} does not exist.''
|
||||
${context} (${toString value}) does not exist.''
|
||||
else
|
||||
_singleton value;
|
||||
|
||||
# Coerce many values to filesets, erroring when any value cannot be coerced,
|
||||
# or if the filesystem root of the values doesn't match.
|
||||
# Type: String -> [ { context :: String, value :: fileset | Path } ] -> [ fileset ]
|
||||
_coerceMany = functionContext: list:
|
||||
let
|
||||
filesets = map ({ context, value }:
|
||||
_coerce "${functionContext}: ${context}" value
|
||||
) list;
|
||||
|
||||
firstBaseRoot = (head filesets)._internalBaseRoot;
|
||||
|
||||
# Finds the first element with a filesystem root different than the first element, if any
|
||||
differentIndex = findFirstIndex (fileset:
|
||||
firstBaseRoot != fileset._internalBaseRoot
|
||||
) null filesets;
|
||||
in
|
||||
if differentIndex != null then
|
||||
throw ''
|
||||
${functionContext}: Filesystem roots are not the same:
|
||||
${(head list).context}: root "${toString firstBaseRoot}"
|
||||
${(elemAt list differentIndex).context}: root "${toString (elemAt filesets differentIndex)._internalBaseRoot}"
|
||||
Different roots are not supported.''
|
||||
else
|
||||
filesets;
|
||||
|
||||
# Create a file set from a path.
|
||||
# Type: Path -> fileset
|
||||
_singleton = path:
|
||||
@ -109,50 +184,23 @@ rec {
|
||||
# - _internalBase: ./.
|
||||
# - _internalTree: {
|
||||
# "default.nix" = <type>;
|
||||
# # Other directory entries
|
||||
# <name> = null;
|
||||
# }
|
||||
# See ./README.md#single-files
|
||||
_create (dirOf path)
|
||||
(_nestTree
|
||||
(dirOf path)
|
||||
[ (baseNameOf path) ]
|
||||
type
|
||||
);
|
||||
{
|
||||
${baseNameOf path} = type;
|
||||
};
|
||||
|
||||
/*
|
||||
Nest a filesetTree under some extra components, while filling out all the other directory entries that aren't included with null
|
||||
|
||||
_nestTree ./. [ "foo" "bar" ] tree == {
|
||||
foo = {
|
||||
bar = tree;
|
||||
<other-entries> = null;
|
||||
}
|
||||
<other-entries> = null;
|
||||
}
|
||||
|
||||
Type: Path -> [ String ] -> filesetTree -> filesetTree
|
||||
*/
|
||||
_nestTree = targetBase: extraComponents: tree:
|
||||
let
|
||||
recurse = index: focusPath:
|
||||
if index == length extraComponents then
|
||||
tree
|
||||
else
|
||||
mapAttrs (_: _: null) (readDir focusPath)
|
||||
// {
|
||||
${elemAt extraComponents index} = recurse (index + 1) (append focusPath (elemAt extraComponents index));
|
||||
};
|
||||
in
|
||||
recurse 0 targetBase;
|
||||
|
||||
# Expand "directory" filesetTree representation to the equivalent { <name> = filesetTree; }
|
||||
# Expand a directory representation to an equivalent one in attribute set form.
|
||||
# All directory entries are included in the result.
|
||||
# Type: Path -> filesetTree -> { <name> = filesetTree; }
|
||||
_directoryEntries = path: value:
|
||||
if isAttrs value then
|
||||
value
|
||||
if value == "directory" then
|
||||
readDir path
|
||||
else
|
||||
readDir path;
|
||||
# Set all entries not present to null
|
||||
mapAttrs (name: value: null) (readDir path)
|
||||
// value;
|
||||
|
||||
/*
|
||||
Simplify a filesetTree recursively:
|
||||
@ -193,17 +241,13 @@ rec {
|
||||
# which has the effect that they aren't included in the result
|
||||
tree = _simplifyTree fileset._internalBase fileset._internalTree;
|
||||
|
||||
# Decompose the base into its components
|
||||
# See ../path/README.md for why we're not just using `toString`
|
||||
baseComponents = components (splitRoot fileset._internalBase).subpath;
|
||||
|
||||
# The base path as a string with a single trailing slash
|
||||
baseString =
|
||||
if baseComponents == [] then
|
||||
if fileset._internalBaseComponents == [] then
|
||||
# Need to handle the filesystem root specially
|
||||
"/"
|
||||
else
|
||||
"/" + concatStringsSep "/" baseComponents + "/";
|
||||
"/" + concatStringsSep "/" fileset._internalBaseComponents + "/";
|
||||
|
||||
baseLength = stringLength baseString;
|
||||
|
||||
@ -266,9 +310,73 @@ rec {
|
||||
in
|
||||
# Special case because the code below assumes that the _internalBase is always included in the result
|
||||
# which shouldn't be done when we have no files at all in the base
|
||||
# This also forces the tree before returning the filter, leads to earlier error messages
|
||||
if tree == null then
|
||||
empty
|
||||
else
|
||||
nonEmpty;
|
||||
|
||||
# Computes the union of a list of filesets.
|
||||
# The filesets must already be coerced and validated to be in the same filesystem root
|
||||
# Type: [ Fileset ] -> Fileset
|
||||
_unionMany = filesets:
|
||||
let
|
||||
first = head filesets;
|
||||
|
||||
# To be able to union filesetTree's together, they need to have the same base path.
|
||||
# Base paths can be unioned by taking their common prefix,
|
||||
# e.g. such that `union /foo/bar /foo/baz` has the base path `/foo`
|
||||
|
||||
# A list of path components common to all base paths.
|
||||
# Note that commonPrefix can only be fully evaluated,
|
||||
# so this cannot cause a stack overflow due to a build-up of unevaluated thunks.
|
||||
commonBaseComponents = foldl'
|
||||
(components: el: commonPrefix components el._internalBaseComponents)
|
||||
first._internalBaseComponents
|
||||
# We could also not do the `tail` here to avoid a list allocation,
|
||||
# but then we'd have to pay for a potentially expensive
|
||||
# but unnecessary `commonPrefix` call
|
||||
(tail filesets);
|
||||
|
||||
# The common base path assembled from a filesystem root and the common components
|
||||
commonBase = append first._internalBaseRoot (join commonBaseComponents);
|
||||
|
||||
# A list of filesetTree's that all have the same base path
|
||||
# This is achieved by nesting the trees into the components they have over the common base path
|
||||
# E.g. `union /foo/bar /foo/baz` has the base path /foo
|
||||
# So the tree under `/foo/bar` gets nested under `{ bar = ...; ... }`,
|
||||
# while the tree under `/foo/baz` gets nested under `{ baz = ...; ... }`
|
||||
# Therefore allowing combined operations over them.
|
||||
trees = map (fileset:
|
||||
setAttrByPath
|
||||
(drop (length commonBaseComponents) fileset._internalBaseComponents)
|
||||
fileset._internalTree
|
||||
) filesets;
|
||||
|
||||
# Folds all trees together into a single one using _unionTree
|
||||
# We do not use a fold here because it would cause a thunk build-up
|
||||
# which could cause a stack overflow for a large number of trees
|
||||
resultTree = _unionTrees trees;
|
||||
in
|
||||
_create commonBase resultTree;
|
||||
|
||||
# The union of multiple filesetTree's with the same base path.
|
||||
# Later elements are only evaluated if necessary.
|
||||
# Type: [ filesetTree ] -> filesetTree
|
||||
_unionTrees = trees:
|
||||
let
|
||||
stringIndex = findFirstIndex isString null trees;
|
||||
withoutNull = filter (tree: tree != null) trees;
|
||||
in
|
||||
if stringIndex != null then
|
||||
# If there's a string, it's always a fully included tree (dir or file),
|
||||
# no need to look at other elements
|
||||
elemAt trees stringIndex
|
||||
else if withoutNull == [ ] then
|
||||
# If all trees are null, then the resulting tree is also null
|
||||
null
|
||||
else
|
||||
# The non-null elements have to be attribute sets representing partial trees
|
||||
# We need to recurse into those
|
||||
zipAttrsWith (name: _unionTrees) withoutNull;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2016
|
||||
|
||||
# Tests lib.fileset
|
||||
# Run:
|
||||
@ -50,27 +51,37 @@ with lib;
|
||||
with internal;
|
||||
with lib.fileset;'
|
||||
|
||||
# Check that a nix expression evaluates successfully (strictly, coercing to json, read-write-mode).
|
||||
# The expression has `lib.fileset` in scope.
|
||||
# If a second argument is provided, the result is checked against it as a regex.
|
||||
# Otherwise, the result is output.
|
||||
# Usage: expectSuccess NIX [REGEX]
|
||||
expectSuccess() {
|
||||
local expr=$1
|
||||
if [[ "$#" -gt 1 ]]; then
|
||||
local expectedResultRegex=$2
|
||||
# Check that two nix expression successfully evaluate to the same value.
|
||||
# The expressions have `lib.fileset` in scope.
|
||||
# Usage: expectEqual NIX NIX
|
||||
expectEqual() {
|
||||
local actualExpr=$1
|
||||
local expectedExpr=$2
|
||||
if ! actualResult=$(nix-instantiate --eval --strict --show-trace \
|
||||
--expr "$prefixExpression ($actualExpr)"); then
|
||||
die "$actualExpr failed to evaluate, but it was expected to succeed"
|
||||
fi
|
||||
if ! expectedResult=$(nix-instantiate --eval --strict --show-trace \
|
||||
--expr "$prefixExpression ($expectedExpr)"); then
|
||||
die "$expectedExpr failed to evaluate, but it was expected to succeed"
|
||||
fi
|
||||
|
||||
if [[ "$actualResult" != "$expectedResult" ]]; then
|
||||
die "$actualExpr should have evaluated to $expectedExpr:\n$expectedResult\n\nbut it evaluated to\n$actualResult"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check that a nix expression evaluates successfully to a store path and returns it (without quotes).
|
||||
# The expression has `lib.fileset` in scope.
|
||||
# Usage: expectStorePath NIX
|
||||
expectStorePath() {
|
||||
local expr=$1
|
||||
if ! result=$(nix-instantiate --eval --strict --json --read-write-mode --show-trace \
|
||||
--expr "$prefixExpression $expr"); then
|
||||
--expr "$prefixExpression ($expr)"); then
|
||||
die "$expr failed to evaluate, but it was expected to succeed"
|
||||
fi
|
||||
if [[ -v expectedResultRegex ]]; then
|
||||
if [[ ! "$result" =~ $expectedResultRegex ]]; then
|
||||
die "$expr should have evaluated to this regex pattern:\n\n$expectedResultRegex\n\nbut this was the actual result:\n\n$result"
|
||||
fi
|
||||
else
|
||||
echo "$result"
|
||||
fi
|
||||
# This is safe because we assume to get back a store path in a string
|
||||
crudeUnquoteJSON <<< "$result"
|
||||
}
|
||||
|
||||
# Check that a nix expression fails to evaluate (strictly, coercing to json, read-write-mode).
|
||||
@ -114,18 +125,19 @@ checkFileset() (
|
||||
local fileset=$1
|
||||
|
||||
# Process the tree into separate arrays for included paths, excluded paths and excluded files.
|
||||
# Also create all the paths in the local directory
|
||||
local -a included=()
|
||||
local -a excluded=()
|
||||
local -a excludedFiles=()
|
||||
# Track which paths need to be created
|
||||
local -a dirsToCreate=()
|
||||
local -a filesToCreate=()
|
||||
for p in "${!tree[@]}"; do
|
||||
# If keys end with a `/` we treat them as directories, otherwise files
|
||||
if [[ "$p" =~ /$ ]]; then
|
||||
mkdir -p "$p"
|
||||
dirsToCreate+=("$p")
|
||||
isFile=
|
||||
else
|
||||
mkdir -p "$(dirname "$p")"
|
||||
touch "$p"
|
||||
filesToCreate+=("$p")
|
||||
isFile=1
|
||||
fi
|
||||
case "${tree[$p]}" in
|
||||
@ -143,6 +155,19 @@ checkFileset() (
|
||||
esac
|
||||
done
|
||||
|
||||
# Create all the necessary paths.
|
||||
# This is done with only a fixed number of processes,
|
||||
# in order to not be too slow
|
||||
# Though this does mean we're a bit limited with how many files can be created
|
||||
if (( ${#dirsToCreate[@]} != 0 )); then
|
||||
mkdir -p "${dirsToCreate[@]}"
|
||||
fi
|
||||
if (( ${#filesToCreate[@]} != 0 )); then
|
||||
readarray -d '' -t parentsToCreate < <(dirname -z "${filesToCreate[@]}")
|
||||
mkdir -p "${parentsToCreate[@]}"
|
||||
touch "${filesToCreate[@]}"
|
||||
fi
|
||||
|
||||
# Start inotifywait in the background to monitor all excluded files (if any)
|
||||
if [[ -n "$canMonitorFiles" ]] && (( "${#excludedFiles[@]}" != 0 )); then
|
||||
coproc watcher {
|
||||
@ -154,6 +179,7 @@ checkFileset() (
|
||||
}
|
||||
# This will trigger when this subshell exits, no matter if successful or not
|
||||
# After exiting the subshell, the parent shell will continue executing
|
||||
# shellcheck disable=SC2154
|
||||
trap 'kill "${watcher_PID}"' exit
|
||||
|
||||
# Synchronously wait until inotifywait is ready
|
||||
@ -164,8 +190,7 @@ checkFileset() (
|
||||
|
||||
# Call toSource with the fileset, triggering open events for all files that are added to the store
|
||||
expression="toSource { root = ./.; fileset = $fileset; }"
|
||||
# crudeUnquoteJSON is safe because we get back a store path in a string
|
||||
storePath=$(expectSuccess "$expression" | crudeUnquoteJSON)
|
||||
storePath=$(expectStorePath "$expression")
|
||||
|
||||
# Remove all files immediately after, triggering delete_self events for all of them
|
||||
rm -rf -- *
|
||||
@ -211,7 +236,7 @@ checkFileset() (
|
||||
#### Error messages #####
|
||||
|
||||
# Absolute paths in strings cannot be passed as `root`
|
||||
expectFailure 'toSource { root = "/nix/store/foobar"; fileset = ./.; }' 'lib.fileset.toSource: `root` "/nix/store/foobar" is a string-like value, but it should be a path instead.
|
||||
expectFailure 'toSource { root = "/nix/store/foobar"; fileset = ./.; }' 'lib.fileset.toSource: `root` \("/nix/store/foobar"\) is a string-like value, but it should be a path instead.
|
||||
\s*Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.'
|
||||
|
||||
# Only paths are accepted as `root`
|
||||
@ -221,56 +246,65 @@ expectFailure 'toSource { root = 10; fileset = ./.; }' 'lib.fileset.toSource: `r
|
||||
mkdir -p {foo,bar}/mock-root
|
||||
expectFailure 'with ((import <nixpkgs/lib>).extend (import <nixpkgs/lib/fileset/mock-splitRoot.nix>)).fileset;
|
||||
toSource { root = ./foo/mock-root; fileset = ./bar/mock-root; }
|
||||
' 'lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` "'"$work"'/foo/mock-root":
|
||||
' 'lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` \("'"$work"'/foo/mock-root"\):
|
||||
\s*`root`: root "'"$work"'/foo/mock-root"
|
||||
\s*`fileset`: root "'"$work"'/bar/mock-root"
|
||||
\s*Different roots are not supported.'
|
||||
rm -rf *
|
||||
|
||||
# `root` needs to exist
|
||||
expectFailure 'toSource { root = ./a; fileset = ./.; }' 'lib.fileset.toSource: `root` '"$work"'/a does not exist.'
|
||||
expectFailure 'toSource { root = ./a; fileset = ./.; }' 'lib.fileset.toSource: `root` \('"$work"'/a\) does not exist.'
|
||||
|
||||
# `root` needs to be a file
|
||||
touch a
|
||||
expectFailure 'toSource { root = ./a; fileset = ./a; }' 'lib.fileset.toSource: `root` '"$work"'/a is a file, but it should be a directory instead. Potential solutions:
|
||||
expectFailure 'toSource { root = ./a; fileset = ./a; }' 'lib.fileset.toSource: `root` \('"$work"'/a\) is a file, but it should be a directory instead. Potential solutions:
|
||||
\s*- If you want to import the file into the store _without_ a containing directory, use string interpolation or `builtins.path` instead of this function.
|
||||
\s*- If you want to import the file into the store _with_ a containing directory, set `root` to the containing directory, such as '"$work"', and set `fileset` to the file path.'
|
||||
rm -rf *
|
||||
|
||||
# The fileset argument should be evaluated, even if the directory is empty
|
||||
expectFailure 'toSource { root = ./.; fileset = abort "This should be evaluated"; }' 'evaluation aborted with the following error message: '\''This should be evaluated'\'
|
||||
|
||||
# Only paths under `root` should be able to influence the result
|
||||
mkdir a
|
||||
expectFailure 'toSource { root = ./a; fileset = ./.; }' 'lib.fileset.toSource: `fileset` could contain files in '"$work"', which is not under the `root` '"$work"'/a. Potential solutions:
|
||||
expectFailure 'toSource { root = ./a; fileset = ./.; }' 'lib.fileset.toSource: `fileset` could contain files in '"$work"', which is not under the `root` \('"$work"'/a\). Potential solutions:
|
||||
\s*- Set `root` to '"$work"' or any directory higher up. This changes the layout of the resulting store path.
|
||||
\s*- Set `fileset` to a file set that cannot contain files outside the `root` '"$work"'/a. This could change the files included in the result.'
|
||||
\s*- Set `fileset` to a file set that cannot contain files outside the `root` \('"$work"'/a\). This could change the files included in the result.'
|
||||
rm -rf *
|
||||
|
||||
# Path coercion only works for paths
|
||||
expectFailure 'toSource { root = ./.; fileset = 10; }' 'lib.fileset.toSource: `fileset` is of type int, but it should be a path instead.'
|
||||
expectFailure 'toSource { root = ./.; fileset = "/some/path"; }' 'lib.fileset.toSource: `fileset` "/some/path" is a string-like value, but it should be a path instead.
|
||||
expectFailure 'toSource { root = ./.; fileset = "/some/path"; }' 'lib.fileset.toSource: `fileset` \("/some/path"\) is a string-like value, but it should be a path instead.
|
||||
\s*Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.'
|
||||
|
||||
# Path coercion errors for non-existent paths
|
||||
expectFailure 'toSource { root = ./.; fileset = ./a; }' 'lib.fileset.toSource: `fileset` '"$work"'/a does not exist.'
|
||||
expectFailure 'toSource { root = ./.; fileset = ./a; }' 'lib.fileset.toSource: `fileset` \('"$work"'/a\) does not exist.'
|
||||
|
||||
# File sets cannot be evaluated directly
|
||||
expectFailure '_create ./. null' 'lib.fileset: Directly evaluating a file set is not supported. Use `lib.fileset.toSource` to turn it into a usable source instead.'
|
||||
expectFailure 'union ./. ./.' 'lib.fileset: Directly evaluating a file set is not supported. Use `lib.fileset.toSource` to turn it into a usable source instead.'
|
||||
|
||||
# Past versions of the internal representation are supported
|
||||
expectEqual '_coerce "<tests>: value" { _type = "fileset"; _internalVersion = 0; _internalBase = ./.; }' \
|
||||
'{ _internalBase = ./.; _internalBaseComponents = path.subpath.components (path.splitRoot ./.).subpath; _internalBaseRoot = /.; _internalVersion = 2; _type = "fileset"; }'
|
||||
expectEqual '_coerce "<tests>: value" { _type = "fileset"; _internalVersion = 1; }' \
|
||||
'{ _type = "fileset"; _internalVersion = 2; }'
|
||||
|
||||
# Future versions of the internal representation are unsupported
|
||||
expectFailure '_coerce "<tests>: value" { _type = "fileset"; _internalVersion = 1; }' '<tests>: value is a file set created from a future version of the file set library with a different internal representation:
|
||||
\s*- Internal version of the file set: 1
|
||||
\s*- Internal version of the library: 0
|
||||
expectFailure '_coerce "<tests>: value" { _type = "fileset"; _internalVersion = 3; }' '<tests>: value is a file set created from a future version of the file set library with a different internal representation:
|
||||
\s*- Internal version of the file set: 3
|
||||
\s*- Internal version of the library: 2
|
||||
\s*Make sure to update your Nixpkgs to have a newer version of `lib.fileset`.'
|
||||
|
||||
# _create followed by _coerce should give the inputs back without any validation
|
||||
expectSuccess '{
|
||||
inherit (_coerce "<test>" (_create "base" "tree"))
|
||||
expectEqual '{
|
||||
inherit (_coerce "<test>" (_create ./. "directory"))
|
||||
_internalVersion _internalBase _internalTree;
|
||||
}' '\{"_internalBase":"base","_internalTree":"tree","_internalVersion":0\}'
|
||||
}' '{ _internalBase = ./.; _internalTree = "directory"; _internalVersion = 2; }'
|
||||
|
||||
#### Resulting store path ####
|
||||
|
||||
# The store path name should be "source"
|
||||
expectSuccess 'toSource { root = ./.; fileset = ./.; }' '"'"${NIX_STORE_DIR:-/nix/store}"'/.*-source"'
|
||||
expectEqual 'toSource { root = ./.; fileset = ./.; }' 'sources.cleanSourceWith { name = "source"; src = ./.; }'
|
||||
|
||||
# We should be able to import an empty directory and end up with an empty result
|
||||
tree=(
|
||||
@ -341,9 +375,104 @@ checkFileset './c'
|
||||
|
||||
# Test the source filter for the somewhat special case of files in the filesystem root
|
||||
# We can't easily test this with the above functions because we can't write to the filesystem root and we don't want to make any assumptions which files are there in the sandbox
|
||||
expectSuccess '_toSourceFilter (_create /. null) "/foo" ""' 'false'
|
||||
expectSuccess '_toSourceFilter (_create /. { foo = "regular"; }) "/foo" ""' 'true'
|
||||
expectSuccess '_toSourceFilter (_create /. { foo = null; }) "/foo" ""' 'false'
|
||||
expectEqual '_toSourceFilter (_create /. null) "/foo" ""' 'false'
|
||||
expectEqual '_toSourceFilter (_create /. { foo = "regular"; }) "/foo" ""' 'true'
|
||||
expectEqual '_toSourceFilter (_create /. { foo = null; }) "/foo" ""' 'false'
|
||||
|
||||
|
||||
## lib.fileset.union, lib.fileset.unions
|
||||
|
||||
|
||||
# Different filesystem roots in root and fileset are not supported
|
||||
mkdir -p {foo,bar}/mock-root
|
||||
expectFailure 'with ((import <nixpkgs/lib>).extend (import <nixpkgs/lib/fileset/mock-splitRoot.nix>)).fileset;
|
||||
toSource { root = ./.; fileset = union ./foo/mock-root ./bar/mock-root; }
|
||||
' 'lib.fileset.union: Filesystem roots are not the same:
|
||||
\s*first argument: root "'"$work"'/foo/mock-root"
|
||||
\s*second argument: root "'"$work"'/bar/mock-root"
|
||||
\s*Different roots are not supported.'
|
||||
|
||||
expectFailure 'with ((import <nixpkgs/lib>).extend (import <nixpkgs/lib/fileset/mock-splitRoot.nix>)).fileset;
|
||||
toSource { root = ./.; fileset = unions [ ./foo/mock-root ./bar/mock-root ]; }
|
||||
' 'lib.fileset.unions: Filesystem roots are not the same:
|
||||
\s*element 0: root "'"$work"'/foo/mock-root"
|
||||
\s*element 1: root "'"$work"'/bar/mock-root"
|
||||
\s*Different roots are not supported.'
|
||||
rm -rf *
|
||||
|
||||
# Coercion errors show the correct context
|
||||
expectFailure 'toSource { root = ./.; fileset = union ./a ./.; }' 'lib.fileset.union: first argument \('"$work"'/a\) does not exist.'
|
||||
expectFailure 'toSource { root = ./.; fileset = union ./. ./b; }' 'lib.fileset.union: second argument \('"$work"'/b\) does not exist.'
|
||||
expectFailure 'toSource { root = ./.; fileset = unions [ ./a ./. ]; }' 'lib.fileset.unions: element 0 \('"$work"'/a\) does not exist.'
|
||||
expectFailure 'toSource { root = ./.; fileset = unions [ ./. ./b ]; }' 'lib.fileset.unions: element 1 \('"$work"'/b\) does not exist.'
|
||||
|
||||
# unions needs a list with at least 1 element
|
||||
expectFailure 'toSource { root = ./.; fileset = unions null; }' 'lib.fileset.unions: Expected argument to be a list, but got a null.'
|
||||
expectFailure 'toSource { root = ./.; fileset = unions [ ]; }' 'lib.fileset.unions: Expected argument to be a list with at least one element, but it contains no elements.'
|
||||
|
||||
# The tree of later arguments should not be evaluated if a former argument already includes all files
|
||||
tree=()
|
||||
checkFileset 'union ./. (_create ./. (abort "This should not be used!"))'
|
||||
checkFileset 'unions [ ./. (_create ./. (abort "This should not be used!")) ]'
|
||||
|
||||
# union doesn't include files that weren't specified
|
||||
tree=(
|
||||
[x]=1
|
||||
[y]=1
|
||||
[z]=0
|
||||
)
|
||||
checkFileset 'union ./x ./y'
|
||||
checkFileset 'unions [ ./x ./y ]'
|
||||
|
||||
# Also for directories
|
||||
tree=(
|
||||
[x/a]=1
|
||||
[x/b]=1
|
||||
[y/a]=1
|
||||
[y/b]=1
|
||||
[z/a]=0
|
||||
[z/b]=0
|
||||
)
|
||||
checkFileset 'union ./x ./y'
|
||||
checkFileset 'unions [ ./x ./y ]'
|
||||
|
||||
# And for very specific paths
|
||||
tree=(
|
||||
[x/a]=1
|
||||
[x/b]=0
|
||||
[y/a]=0
|
||||
[y/b]=1
|
||||
[z/a]=0
|
||||
[z/b]=0
|
||||
)
|
||||
checkFileset 'union ./x/a ./y/b'
|
||||
checkFileset 'unions [ ./x/a ./y/b ]'
|
||||
|
||||
# unions or chained union's can include more paths
|
||||
tree=(
|
||||
[x/a]=1
|
||||
[x/b]=1
|
||||
[y/a]=1
|
||||
[y/b]=0
|
||||
[z/a]=0
|
||||
[z/b]=1
|
||||
)
|
||||
checkFileset 'unions [ ./x/a ./x/b ./y/a ./z/b ]'
|
||||
checkFileset 'union (union ./x/a ./x/b) (union ./y/a ./z/b)'
|
||||
checkFileset 'union (union (union ./x/a ./x/b) ./y/a) ./z/b'
|
||||
|
||||
# unions should not stack overflow, even if many elements are passed
|
||||
tree=()
|
||||
for i in $(seq 1000); do
|
||||
tree[$i/a]=1
|
||||
tree[$i/b]=0
|
||||
done
|
||||
(
|
||||
# Locally limit the maximum stack size to 100 * 1024 bytes
|
||||
# If unions was implemented recursively, this would stack overflow
|
||||
ulimit -s 100
|
||||
checkFileset 'unions (mapAttrsToList (name: _: ./. + "/${name}/a") (builtins.readDir ./.))'
|
||||
)
|
||||
|
||||
# TODO: Once we have combinators and a property testing library, derive property tests from https://en.wikipedia.org/wiki/Algebra_of_sets
|
||||
|
||||
|
@ -610,7 +610,7 @@ in mkLicense lset) ({
|
||||
};
|
||||
|
||||
inria-icesl = {
|
||||
fullName = "INRIA Non-Commercial License Agreement for IceSL";
|
||||
fullName = "End User License Agreement for IceSL Software";
|
||||
url = "https://icesl.loria.fr/assets/pdf/EULA_IceSL_binary.pdf";
|
||||
free = false;
|
||||
};
|
||||
@ -856,6 +856,11 @@ in mkLicense lset) ({
|
||||
free = false;
|
||||
};
|
||||
|
||||
ocamlLgplLinkingException = {
|
||||
spdxId = "OCaml-LGPL-linking-exception";
|
||||
fullName = "OCaml LGPL Linking Exception";
|
||||
};
|
||||
|
||||
ocamlpro_nc = {
|
||||
fullName = "OCamlPro Non Commercial license version 1";
|
||||
url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-2.2.0/OCamlPro-Non-Commercial-License.pdf";
|
||||
|
@ -211,6 +211,16 @@
|
||||
fingerprint = "7B59 F09E 0FE5 BC34 F032 1FB4 5270 1DE5 F5F5 1125";
|
||||
}];
|
||||
};
|
||||
_9glenda = {
|
||||
email = "plan9git@proton.me";
|
||||
matrix = "@9front:matrix.org";
|
||||
github = "9glenda";
|
||||
githubId = 69043370;
|
||||
name = "9glenda";
|
||||
keys = [{
|
||||
fingerprint = "DBF4 E6D0 90B8 BEA4 4BFE 1F1C 3442 4321 39B5 0691";
|
||||
}];
|
||||
};
|
||||
a1russell = {
|
||||
email = "adamlr6+pub@gmail.com";
|
||||
github = "a1russell";
|
||||
@ -18489,6 +18499,16 @@
|
||||
githubId = 7121530;
|
||||
name = "Wolf Honoré";
|
||||
};
|
||||
wigust = {
|
||||
name = "Oleg Pykhalov";
|
||||
email = "go.wigust@gmail.com";
|
||||
github = "wigust";
|
||||
githubId = 7709598;
|
||||
keys = [{
|
||||
# primary: "C955 CC5D C048 7FB1 7966 40A9 199A F6A3 67E9 4ABB"
|
||||
fingerprint = "7238 7123 8EAC EB63 4548 5857 167F 8EA5 001A FA9C";
|
||||
}];
|
||||
};
|
||||
wildsebastian = {
|
||||
name = "Sebastian Wild";
|
||||
email = "sebastian@wild-siena.com";
|
||||
|
@ -217,6 +217,7 @@
|
||||
order, or relying on `mkBefore` and `mkAfter`, but may impact users calling
|
||||
`mkOrder n` with n ≤ 400.
|
||||
|
||||
- `networking.networkmanager.firewallBackend` was removed as NixOS is now using iptables-nftables-compat even when using iptables, therefore Networkmanager now uses the nftables backend unconditionally.
|
||||
|
||||
## Other Notable Changes {#sec-release-23.11-notable-changes}
|
||||
|
||||
|
23
nixos/modules/hardware/glasgow.nix
Normal file
23
nixos/modules/hardware/glasgow.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.hardware.glasgow;
|
||||
|
||||
in
|
||||
{
|
||||
options.hardware.glasgow = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Enables Glasgow udev rules and ensures 'plugdev' group exists.
|
||||
This is a prerequisite to using Glasgow without being root.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.udev.packages = [ pkgs.glasgow ];
|
||||
users.groups.plugdev = { };
|
||||
};
|
||||
}
|
@ -61,6 +61,7 @@
|
||||
./hardware/flipperzero.nix
|
||||
./hardware/flirc.nix
|
||||
./hardware/gkraken.nix
|
||||
./hardware/glasgow.nix
|
||||
./hardware/gpgsmartcards.nix
|
||||
./hardware/hackrf.nix
|
||||
./hardware/i2c.nix
|
||||
|
@ -15,26 +15,26 @@ let
|
||||
usePostgresql && (!(args ? host) || (elem args.host [ "localhost" "127.0.0.1" "::1" ]));
|
||||
hasWorkers = cfg.workers != { };
|
||||
|
||||
listenerSupportsResource = resource: listener:
|
||||
lib.any ({ names, ... }: builtins.elem resource names) listener.resources;
|
||||
|
||||
clientListener = findFirst
|
||||
(listenerSupportsResource "client")
|
||||
null
|
||||
(cfg.settings.listeners
|
||||
++ concatMap ({ worker_listeners, ... }: worker_listeners) (attrValues cfg.workers));
|
||||
|
||||
registerNewMatrixUser =
|
||||
let
|
||||
isIpv6 = x: lib.length (lib.splitString ":" x) > 1;
|
||||
listener =
|
||||
lib.findFirst (
|
||||
listener: lib.any (
|
||||
resource: lib.any (
|
||||
name: name == "client"
|
||||
) resource.names
|
||||
) listener.resources
|
||||
) (lib.last cfg.settings.listeners) cfg.settings.listeners;
|
||||
# FIXME: Handle cases with missing client listener properly,
|
||||
# don't rely on lib.last, this will not work.
|
||||
isIpv6 = hasInfix ":";
|
||||
|
||||
# add a tail, so that without any bind_addresses we still have a useable address
|
||||
bindAddress = head (listener.bind_addresses ++ [ "127.0.0.1" ]);
|
||||
listenerProtocol = if listener.tls
|
||||
bindAddress = head (clientListener.bind_addresses ++ [ "127.0.0.1" ]);
|
||||
listenerProtocol = if clientListener.tls
|
||||
then "https"
|
||||
else "http";
|
||||
in
|
||||
assert assertMsg (clientListener != null) "No client listener found in synapse or one of its workers";
|
||||
pkgs.writeShellScriptBin "matrix-synapse-register_new_matrix_user" ''
|
||||
exec ${cfg.package}/bin/register_new_matrix_user \
|
||||
$@ \
|
||||
@ -44,7 +44,7 @@ let
|
||||
"[${bindAddress}]"
|
||||
else
|
||||
"${bindAddress}"
|
||||
}:${builtins.toString listener.port}/"
|
||||
}:${builtins.toString clientListener.port}/"
|
||||
'';
|
||||
|
||||
defaultExtras = [
|
||||
@ -937,6 +937,13 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = clientListener != null;
|
||||
message = ''
|
||||
At least one listener which serves the `client` resource via HTTP is required
|
||||
by synapse in `services.matrix-synapse.settings.listeners` or in one of the workers!
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = hasLocalPostgresDB -> config.services.postgresql.enable;
|
||||
message = ''
|
||||
@ -969,13 +976,13 @@ in {
|
||||
(
|
||||
listener:
|
||||
listener.port == main.port
|
||||
&& (lib.any (resource: builtins.elem "replication" resource.names) listener.resources)
|
||||
&& listenerSupportsResource "replication" listener
|
||||
&& (lib.any (bind: bind == main.host || bind == "0.0.0.0" || bind == "::") listener.bind_addresses)
|
||||
)
|
||||
null
|
||||
cfg.settings.listeners;
|
||||
in
|
||||
hasWorkers -> (listener != null);
|
||||
hasWorkers -> (cfg.settings.instance_map ? main && listener != null);
|
||||
message = ''
|
||||
Workers for matrix-synapse require setting `services.matrix-synapse.settings.instance_map.main`
|
||||
to any listener configured in `services.matrix-synapse.settings.listeners` with a `"replication"`
|
||||
|
@ -21,7 +21,7 @@ let
|
||||
throw
|
||||
"${logPrefix}: configuration file must not reside within /tmp - it won't be visible to the systemd service."
|
||||
else
|
||||
true;
|
||||
file;
|
||||
checkConfig = file:
|
||||
pkgs.runCommand "checked-blackbox-exporter.conf" {
|
||||
preferLocalBuild = true;
|
||||
|
@ -30,13 +30,11 @@ let
|
||||
configFile = pkgs.writeText "NetworkManager.conf" (lib.concatStringsSep "\n" [
|
||||
(mkSection "main" {
|
||||
plugins = "keyfile";
|
||||
dhcp = cfg.dhcp;
|
||||
dns = cfg.dns;
|
||||
inherit (cfg) dhcp dns;
|
||||
# If resolvconf is disabled that means that resolv.conf is managed by some other module.
|
||||
rc-manager =
|
||||
if config.networking.resolvconf.enable then "resolvconf"
|
||||
else "unmanaged";
|
||||
firewall-backend = cfg.firewallBackend;
|
||||
})
|
||||
(mkSection "keyfile" {
|
||||
unmanaged-devices =
|
||||
@ -233,15 +231,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
firewallBackend = mkOption {
|
||||
type = types.enum [ "iptables" "nftables" "none" ];
|
||||
default = "iptables";
|
||||
description = lib.mdDoc ''
|
||||
Which firewall backend should be used for configuring masquerading with shared mode.
|
||||
If set to none, NetworkManager doesn't manage the configuration at all.
|
||||
'';
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ];
|
||||
default = "WARN";
|
||||
@ -340,20 +329,20 @@ in
|
||||
default = [ ];
|
||||
example = literalExpression ''
|
||||
[ {
|
||||
source = pkgs.writeText "upHook" '''
|
||||
source = pkgs.writeText "upHook" '''
|
||||
if [ "$2" != "up" ]; then
|
||||
logger "exit: event $2 != up"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$2" != "up" ]; then
|
||||
logger "exit: event $2 != up"
|
||||
exit
|
||||
fi
|
||||
|
||||
# coreutils and iproute are in PATH too
|
||||
logger "Device $DEVICE_IFACE coming up"
|
||||
''';
|
||||
type = "basic";
|
||||
} ]'';
|
||||
# coreutils and iproute are in PATH too
|
||||
logger "Device $DEVICE_IFACE coming up"
|
||||
''';
|
||||
type = "basic";
|
||||
} ]
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
A list of scripts which will be executed in response to network events.
|
||||
A list of scripts which will be executed in response to network events.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -413,6 +402,9 @@ in
|
||||
them via the DNS server in your network, or use environment.etc
|
||||
to add a file into /etc/NetworkManager/dnsmasq.d reconfiguring hostsdir.
|
||||
'')
|
||||
(mkRemovedOptionModule [ "networking" "networkmanager" "firewallBackend" ] ''
|
||||
This option was removed as NixOS is now using iptables-nftables-compat even when using iptables, therefore Networkmanager now uses the nftables backend unconditionally.
|
||||
'')
|
||||
];
|
||||
|
||||
|
||||
|
@ -248,7 +248,6 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
boot.blacklistedKernelModules = [ "ip_tables" ];
|
||||
environment.systemPackages = [ pkgs.nftables ];
|
||||
networking.networkmanager.firewallBackend = mkDefault "nftables";
|
||||
# versionOlder for backportability, remove afterwards
|
||||
networking.nftables.flushRuleset = mkDefault (versionOlder config.system.stateVersion "23.11" || (cfg.rulesetFile != null || cfg.ruleset != ""));
|
||||
systemd.services.nftables = {
|
||||
|
@ -97,6 +97,19 @@ in
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
banner = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
example = ''
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Optional message to display on the login screen.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = settingsFormat.type;
|
||||
default = { };
|
||||
@ -238,6 +251,11 @@ in
|
||||
sleep-inactive-ac-timeout = lib.gvariant.mkInt32 0;
|
||||
sleep-inactive-battery-timeout = lib.gvariant.mkInt32 0;
|
||||
};
|
||||
}] ++ lib.optionals (cfg.gdm.banner != null) [{
|
||||
settings."org/gnome/login-screen" = {
|
||||
banner-message-enable = true;
|
||||
banner-message-text = cfg.gdm.banner;
|
||||
};
|
||||
}] ++ [ "${gdm}/share/gdm/greeter-dconf-defaults" ];
|
||||
|
||||
# Use AutomaticLogin if delay is zero, because it's immediate.
|
||||
|
@ -39,7 +39,7 @@ in
|
||||
# Allow root logins only using SSH keys
|
||||
# and disable password authentication in general
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PermitRootLogin = "prohibit-password";
|
||||
services.openssh.settings.PermitRootLogin = mkDefault "prohibit-password";
|
||||
services.openssh.settings.PasswordAuthentication = mkDefault false;
|
||||
|
||||
# enable OS Login. This also requires setting enable-oslogin=TRUE metadata on
|
||||
|
@ -1,8 +1,8 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, autoreconfHook
|
||||
, SDL2
|
||||
, SDL2_ttf
|
||||
, SDL2_image
|
||||
@ -14,13 +14,13 @@
|
||||
, dejavu_fonts
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mpd-touch-screen-gui";
|
||||
version = "unstable-2022-12-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "muesli4";
|
||||
repo = pname;
|
||||
repo = "mpd-touch-screen-gui";
|
||||
rev = "156eaebede89da2b83a98d8f9dfa46af12282fb4";
|
||||
sha256 = "sha256-vr/St4BghrndjUQ0nZI/uJq+F/MjEj6ulc4DYwQ/pgU=";
|
||||
};
|
||||
@ -60,4 +60,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -46,14 +46,14 @@ let
|
||||
Carbon
|
||||
;
|
||||
} else portaudio;
|
||||
in stdenv'.mkDerivation rec {
|
||||
in stdenv'.mkDerivation (finalAttrs: {
|
||||
pname = "musescore";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "musescore";
|
||||
repo = "MuseScore";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-jXievVIA0tqLdKLy6oPaOHPIbDoFstveEQBri9M0Aoo=";
|
||||
};
|
||||
patches = [
|
||||
@ -168,4 +168,4 @@ in stdenv'.mkDerivation rec {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
mainProgram = "mscore";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, openjdk, glib, wrapGAppsHook, zstd }:
|
||||
{ lib, stdenv, fetchurl, openjdk, glib, dpkg, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bluej";
|
||||
@ -12,21 +12,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-sOT86opMa9ytxJlfURIsD06HiP+j+oz3lQ0DqmLV1wE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ zstd wrapGAppsHook ];
|
||||
nativeBuildInputs = [ dpkg wrapGAppsHook ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
preUnpack = ''
|
||||
unpackCmdHooks+=(_tryDebData)
|
||||
_tryDebData() {
|
||||
if ! [[ "$1" =~ \.deb$ ]]; then return 1; fi
|
||||
ar xf $src
|
||||
if ! [[ -e data.tar.zst ]]; then return 1; fi
|
||||
unpackFile data.tar.zst
|
||||
}
|
||||
'';
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
installPhase = ''
|
||||
@ -35,6 +23,10 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out
|
||||
cp -r usr/* $out
|
||||
|
||||
rm -r $out/share/bluej/jdk
|
||||
rm -r $out/share/bluej/javafx
|
||||
rm -r $out/share/bluej/javafx-*.jar
|
||||
|
||||
makeWrapper ${openjdk}/bin/java $out/bin/bluej \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "-Dawt.useSystemAAFontSettings=on -Xmx512M \
|
||||
@ -49,6 +41,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://www.bluej.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl2ClasspathPlus;
|
||||
mainProgram = pname;
|
||||
maintainers = with maintainers; [ chvp ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
@ -1,31 +1,41 @@
|
||||
{ lib, stdenv, fetchurl, makeWrapper, jdk }:
|
||||
{ lib, stdenv, fetchurl, openjdk, glib, dpkg, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "greenfoot";
|
||||
version = "3.7.1";
|
||||
version = "3.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
# We use the deb here. First instinct might be to go for the "generic" JAR
|
||||
# download, but that is actually a graphical installer that is much harder
|
||||
# to unpack than the deb.
|
||||
url = "https://www.greenfoot.org/download/files/Greenfoot-linux-${builtins.replaceStrings ["."] [""] version}.deb";
|
||||
sha256 = "sha256-wGgKDsA/2luw+Nzs9dWb/HRHMx/0S0CFfoI53OCzxug=";
|
||||
sha256 = "sha256-HDXmgLHS18VZVV+hCA0RgIrKRftOlV7t+fvE0pAHGjk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ dpkg wrapGAppsHook ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
unpackPhase = ''
|
||||
ar xf $src
|
||||
tar xf data.tar.xz
|
||||
'';
|
||||
dontWrapGApps = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r usr/* $out
|
||||
rm -r $out/share/greenfoot/jdk
|
||||
rm -r $out/share/greenfoot/javafx
|
||||
|
||||
makeWrapper ${jdk}/bin/java $out/bin/greenfoot \
|
||||
--add-flags "-Djavafx.embed.singleThread=true -Dawt.useSystemAAFontSettings=on -Xmx512M -cp \"$out/share/greenfoot/bluej.jar\" bluej.Boot -greenfoot=true -bluej.compiler.showunchecked=false -greenfoot.scenarios=$out/share/doc/Greenfoot/scenarios -greenfoot.url.javadoc=file://$out/share/doc/Greenfoot/API"
|
||||
rm -r $out/share/greenfoot/jdk
|
||||
rm -r $out/share/greenfoot/javafx-*.jar
|
||||
|
||||
makeWrapper ${openjdk}/bin/java $out/bin/greenfoot \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "-Dawt.useSystemAAFontSettings=on -Xmx512M \
|
||||
--add-opens javafx.graphics/com.sun.glass.ui=ALL-UNNAMED \
|
||||
-cp $out/share/greenfoot/boot.jar bluej.Boot \
|
||||
-greenfoot=true -bluej.compiler.showunchecked=false \
|
||||
-greenfoot.scenarios=$out/share/doc/Greenfoot/scenarios \
|
||||
-greenfoot.url.javadoc=file://$out/share/doc/Greenfoot/API"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@ -33,7 +43,8 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://www.greenfoot.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl2ClasspathPlus;
|
||||
mainProgram = pname;
|
||||
maintainers = [ maintainers.chvp ];
|
||||
platforms = platforms.unix;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -1428,7 +1428,7 @@ self: super: {
|
||||
hexokinase = buildGoModule {
|
||||
name = "hexokinase";
|
||||
src = old.src + "/hexokinase";
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
};
|
||||
in
|
||||
''
|
||||
|
@ -15,11 +15,11 @@ let
|
||||
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||
|
||||
sha256 = {
|
||||
x86_64-linux = "152vr796sa1gq62zp3grcr3ywg4b4z233cvwm3s2jhi2nzra26vq";
|
||||
x86_64-darwin = "0zk4nf8zyj6vq7yqnidjqgidrj1nq7rri9y2d4aay44kanm3v03f";
|
||||
aarch64-linux = "0bprcnd93h13x5d2hzfgpa9yyda3x0zi3w0rfwhi2rbyzlr7vzhf";
|
||||
aarch64-darwin = "0rwdknqdhgf3fby1i0gz6hha1vnxfk2dwrpn75g0ra21m11b5b4g";
|
||||
armv7l-linux = "0ck2bxhy3k239ici3y2xsc8kwa8bsfn8ywh1p4lh2dkc91liisnq";
|
||||
x86_64-linux = "1xzmfvkzqfxblahi2pc54fr7i6rynqm76p4wpbfzxrrh5a3xjwn3";
|
||||
x86_64-darwin = "0lp6yqwqwfngl98nba8f77yypb44cfn7kcjhbc93s8kqd57m97zj";
|
||||
aarch64-linux = "1hpwjdbfc8l4a7ln50s6h68abcb6djcc5y0h686s9k5v2axm7f3v";
|
||||
aarch64-darwin = "0cbms9p8g2gjx9wmm78fzlscw62qasjv30al8v39bda3k694wnh5";
|
||||
armv7l-linux = "0hvaray6b36j8s0fvffnkbsw7kf2rn2z4y8q4wlnqx3hfyalcvcn";
|
||||
}.${system} or throwSystem;
|
||||
|
||||
sourceRoot = lib.optionalString (!stdenv.isDarwin) ".";
|
||||
@ -29,7 +29,7 @@ in
|
||||
|
||||
# Please backport all compatible updates to the stable release.
|
||||
# This is important for the extension ecosystem.
|
||||
version = "1.82.1.23255";
|
||||
version = "1.82.2.23257";
|
||||
pname = "vscodium";
|
||||
|
||||
executableName = "codium";
|
||||
|
@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
|
||||
routers.
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "dynamips";
|
||||
maintainers = with maintainers; [ primeos ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, gtk3
|
||||
, gtkspell3
|
||||
, isocodes
|
||||
, goocanvas2
|
||||
, wrapGAppsHook
|
||||
, intltool
|
||||
, itstool
|
||||
, libxml2
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, goocanvas2
|
||||
, gtkspell3
|
||||
, isocodes
|
||||
, gnome
|
||||
, python3
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, tesseract4
|
||||
, extraOcrEngines ? [] # other supported engines are: ocrad gocr cuneiform
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ocrfeeder";
|
||||
version = "0.8.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
url = "mirror://gnome/sources/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-sD0qWUndguJzTw0uy0FIqupFf4OX6dTFvcd+Mz+8Su0=";
|
||||
};
|
||||
|
||||
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
|
||||
] ++ extraOcrEngines);
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix PATH : "${enginesPath}")
|
||||
gappsWrapperArgs+=(--prefix PATH : "${finalAttrs.enginesPath}")
|
||||
gappsWrapperArgs+=(--set ISO_CODES_DIR "${isocodes}/share/xml/iso-codes")
|
||||
'';
|
||||
|
||||
@ -70,4 +70,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ buildFHSEnv
|
||||
, symlinkJoin
|
||||
, bottles-unwrapped
|
||||
, gst_all_1
|
||||
, extraPkgs ? pkgs: [ ]
|
||||
, extraLibraries ? pkgs: [ ]
|
||||
}:
|
||||
@ -37,6 +36,14 @@ let fhsEnv = {
|
||||
libXv
|
||||
libXxf86vm
|
||||
];
|
||||
gstreamerDeps = pkgs: with pkgs.gst_all_1; [
|
||||
gstreamer
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
gst-plugins-ugly
|
||||
gst-plugins-bad
|
||||
gst-libav
|
||||
];
|
||||
in
|
||||
pkgs: with pkgs; [
|
||||
# https://wiki.winehq.org/Building_Wine
|
||||
@ -49,12 +56,6 @@ let fhsEnv = {
|
||||
gnutls
|
||||
libglvnd
|
||||
gsm
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-ugly
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-libav
|
||||
libgphoto2
|
||||
libjpeg_turbo
|
||||
libkrb5
|
||||
@ -91,11 +92,8 @@ let fhsEnv = {
|
||||
p11-kit
|
||||
zlib # Freetype
|
||||
] ++ xorgDeps pkgs
|
||||
++ gstreamerDeps pkgs
|
||||
++ extraLibraries pkgs;
|
||||
|
||||
profile = ''
|
||||
export GST_PLUGIN_PATH=/usr/lib32/gstreamer-1.0:/usr/lib64/gstreamer-1.0
|
||||
'';
|
||||
};
|
||||
in
|
||||
symlinkJoin {
|
||||
|
@ -21,7 +21,7 @@ buildGoModule rec {
|
||||
installShellCompletion scripts/cheat.{bash,fish,zsh}
|
||||
'';
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -11,7 +11,7 @@ buildGoModule rec {
|
||||
sha256 = "sha256-NAw1uoBL/FnNLJ86L9aBCOY65aJn1DDGK0Cd0IO2kr0=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
|
@ -16,7 +16,7 @@ buildGoModule rec {
|
||||
#
|
||||
# Ref <https://github.com/NixOS/nixpkgs/pull/87383#issuecomment-633204382>
|
||||
# and <https://github.com/NixOS/nixpkgs/blob/d4226e3a4b5fcf988027147164e86665d382bbfa/pkgs/development/go-modules/generic/default.nix#L18>
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -5,16 +5,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "hyprland-autoname-workspaces";
|
||||
version = "1.1.10";
|
||||
version = "1.1.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hyprland-community";
|
||||
repo = "hyprland-autoname-workspaces";
|
||||
rev = version;
|
||||
hash = "sha256-I0ELCexJxZgbTLzO4GtvOtaIghzVND8kgOFmlQ0oca8=";
|
||||
hash = "sha256-x9MXp2MZtrnVI3W+6xo34uUHuRnpVeXS+3vbyti1p24=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-MmWYsYRxrcEtL+efK1yCzq5b+PsrsrG1flSXn2kGdYs=";
|
||||
cargoHash = "sha256-mSUtFZvq5+rumefJ6I9C6YzRzu64oJ/bTwaa+rrFlL4=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatically rename workspaces with icons of started applications";
|
||||
|
@ -12,7 +12,7 @@ buildGoModule rec {
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "nwg-panel";
|
||||
version = "0.9.12";
|
||||
version = "0.9.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nwg-piotr";
|
||||
repo = "nwg-panel";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lCo58v2UGolFagci2xHcieTUvqNc1KKNj3Z92oG5WPI=";
|
||||
hash = "sha256-dP/FbMrjPextwedQeLJHM6f/a+EuZ+hQSLrH/rF2XOg=";
|
||||
};
|
||||
|
||||
# No tests
|
||||
|
@ -3,12 +3,12 @@
|
||||
let
|
||||
gouiJS = fetchurl {
|
||||
url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js";
|
||||
sha256 = "0xbkdpd900gnmzj8p0x38dn4sv170pdvgzcvzsq70s80p6ykkh6g";
|
||||
hash = "sha256-z8A5vbkAaXCw/pv9t9sFJ2xNbEOjg4vkr/YBkNptc3U=";
|
||||
};
|
||||
|
||||
publisherJS = fetchurl {
|
||||
url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js";
|
||||
sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
|
||||
hash = "sha256-4iKMkOEKPCo6Xrq0L5IglVZpB9wyLymCgRYz3cE9DSY=";
|
||||
};
|
||||
|
||||
packages = [
|
||||
@ -19,7 +19,8 @@ let
|
||||
"perkeep.org/cmd/pk-mount"
|
||||
];
|
||||
|
||||
in buildGoModule rec {
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "perkeep";
|
||||
version = "0.11";
|
||||
|
||||
@ -27,10 +28,10 @@ in buildGoModule rec {
|
||||
owner = "perkeep";
|
||||
repo = "perkeep";
|
||||
rev = version;
|
||||
sha256 = "07j5gplk4kcrbazyg4m4bwggzlz5gk89h90r14jvfcpms7v5nrll";
|
||||
hash = "sha256-lGZb9tH1MrclCRkkmNB85dP/Hl+kkue/WplNMul9RR4=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1af9a6r9qfrak0n5xyv9z8n7gn7xw2sdjn4s9bwwidkrdm81iq6b";
|
||||
vendorHash = "sha256-y+AYUG15tsj5SppY2bTg/dh3LPpp+14smCo7nLJRyak=";
|
||||
deleteVendor = true; # Vendor is out of sync with go.mod
|
||||
|
||||
buildPhase = ''
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, darwin, libiconv, alsa-lib, stdenv }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, darwin, alsa-lib, stdenv }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "sampler";
|
||||
@ -8,18 +8,18 @@ buildGoModule rec {
|
||||
owner = "sqshq";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1lanighxhnn28dfzils7i55zgxbw2abd6y723mq7x9wg1aa2bd0z";
|
||||
hash = "sha256-H7QllAqPp35wHeJ405YSfPX3S4lH0/hdQ8Ja2OGLVtE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix build with go 1.17
|
||||
(fetchpatch {
|
||||
url = "https://github.com/sqshq/sampler/commit/97a4a0ebe396a780d62f50f112a99b27044e832b.patch";
|
||||
sha256 = "1czns7jc85mzdf1mg874jimls8x32l35x3lysxfgfah7cvvwznbk";
|
||||
hash = "sha256-c9nP92YHKvdc156OXgYVoyNNa5TkoFeDa78WxOTR9rM=";
|
||||
})
|
||||
];
|
||||
|
||||
vendorSha256 = "02cfzqadpsk2vkzsp7ciji9wisjza0yp35pw42q44navhbzcb4ji";
|
||||
vendorHash = "sha256-UZLF/oJbWUKwIPyWcT1QX+rIU5SRnav/3GLq2xT+jgk=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -11,7 +11,7 @@ buildGoModule rec {
|
||||
sha256 = "0v3j7rw917wnmp4lyjscqzk4qf4azfiz70ynbq3wl4gwp1m783vv";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
nativeBuildInputs = [ git ];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -10,27 +10,14 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "snagboot";
|
||||
version = "1.1";
|
||||
version = "1.2";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bootlin";
|
||||
repo = "snagboot";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-MU6LzjH6s2MS7T3u1OUeJ5ZmWgL0otA/q0ylwTNH4fA=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
ignoredVersions = ".(rc|beta).*";
|
||||
};
|
||||
|
||||
tests.version = testers.testVersion {
|
||||
package = snagboot;
|
||||
command = "snagrecover --version";
|
||||
version = "v${version}";
|
||||
};
|
||||
hash = "sha256-OuHY5+2puZAERtwmXduUW5Wjus6KeQLJLcGcl48umLA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -69,6 +56,19 @@ python3.pkgs.buildPythonApplication rec {
|
||||
# There are no tests
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
ignoredVersions = ".(rc|beta).*";
|
||||
};
|
||||
|
||||
tests.version = testers.testVersion {
|
||||
package = snagboot;
|
||||
command = "snagrecover --version";
|
||||
version = "v${version}";
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/bootlin/snagboot";
|
||||
description = "Generic recovery and reflashing tool for embedded platforms";
|
||||
|
@ -11,6 +11,7 @@
|
||||
, qtutilities
|
||||
, qtforkawesome
|
||||
, boost
|
||||
, wrapQtAppsHook
|
||||
, cmake
|
||||
, kio
|
||||
, plasma-framework
|
||||
@ -29,14 +30,14 @@ https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */
|
||||
, autostartExecPath ? "syncthingtray"
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "1.4.6";
|
||||
pname = "syncthingtray";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Martchus";
|
||||
repo = "syncthingtray";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-/HAqO0eVFt4YLGeTbZSZcH2pOojvykukAGTBHZTfKLQ=";
|
||||
};
|
||||
|
||||
@ -54,6 +55,7 @@ mkDerivation rec {
|
||||
;
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
cmake
|
||||
qttools
|
||||
]
|
||||
@ -64,7 +66,7 @@ mkDerivation rec {
|
||||
# Don't test on Darwin because output is .app
|
||||
doInstallCheck = !stdenv.isDarwin;
|
||||
installCheckPhase = ''
|
||||
$out/bin/syncthingtray --help | grep ${version}
|
||||
$out/bin/syncthingtray --help | grep ${finalAttrs.version}
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
@ -85,4 +87,4 @@ mkDerivation rec {
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||
owner = "jmhobbs";
|
||||
repo = "terminal-parrot";
|
||||
rev = version;
|
||||
sha256 = "1b4vr4s1zpkpf5kc1r2kdlp3hf88qp1f7h05g8kd62zf4sfbj722";
|
||||
hash = "sha256-Qhy5nCbuC9MmegXA48LFCDk4Lm1T5MBmcXfeHzTJm6w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1qalnhhq3fmyzj0hkzc5gk9wbypr558mz3ik5msw7fid68k2i48c";
|
||||
vendorHash = "sha256-DJEoJjItusN1LTOOX1Ep+frF03yF/QmB/L66gSG0VOE=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||
owner = "timewarrior-synchronize";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "GaDcnPJBcDJ3AQaHzifDgdl0QT4GSbAOIqp4RrAcO3M=";
|
||||
hash = "sha256-GaDcnPJBcDJ3AQaHzifDgdl0QT4GSbAOIqp4RrAcO3M=";
|
||||
};
|
||||
|
||||
vendorSha256 = "iROqiRWkHG6N6kivUmgmu6sg14JDdG4f98BdR7CL1gs=";
|
||||
vendorHash = "sha256-iROqiRWkHG6N6kivUmgmu6sg14JDdG4f98BdR7CL1gs=";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/timewarrior-synchronize/timew-sync-server";
|
||||
|
@ -12,7 +12,7 @@ buildGoModule rec {
|
||||
};
|
||||
|
||||
# Upstream has a `./vendor` directory with all deps which we rely upon.
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||
|
||||
|
@ -11,7 +11,7 @@ buildGoModule rec {
|
||||
sha256 = "sha256-GGBW6rpwv1bVbLTD//cU8jNbq/27Ls0su7DymCJTSmY=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple GTD-style todo list for the command line";
|
||||
|
@ -14,7 +14,7 @@ buildGoModule rec {
|
||||
hash = "sha256-hNZqGTV17rFSKLhZzNqH2E4SSb6Jhk7YQ4TN0HnE+9g=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Inspect the plaintext payload inside of proxied TLS connections";
|
||||
|
@ -15,7 +15,7 @@ buildGoModule rec {
|
||||
sha256 = "0gi39jmnzqrgj146yw8lcmgmvzx7ii1dgw4iqig7kx8c0jiqi600";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
@ -12,7 +12,7 @@ buildGoModule rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
{
|
||||
stable = import ./browser.nix {
|
||||
channel = "stable";
|
||||
version = "116.0.1938.76";
|
||||
version = "117.0.2045.35";
|
||||
revision = "1";
|
||||
sha256 = "sha256-zSnNgnpsxR2sRgoG+Vi2K3caaVUPLiJJ9d+EjjIzu7Y=";
|
||||
sha256 = "sha256-2am+TLZC024mpxOk6GLB0TZY+Kfnm/CyH8sMBLod1Js=";
|
||||
};
|
||||
beta = import ./browser.nix {
|
||||
channel = "beta";
|
||||
version = "117.0.2045.21";
|
||||
version = "117.0.2045.31";
|
||||
revision = "1";
|
||||
sha256 = "sha256-vsZy9WGlT4Yqf/tHmsgZV8Pj7D0nmhmziKYGrRj7Bi0=";
|
||||
sha256 = "sha256-Nee99jE6kswYfmZlMjv4EV4HDz1l+9YhhWHonhe2uUM=";
|
||||
};
|
||||
dev = import ./browser.nix {
|
||||
channel = "dev";
|
||||
version = "118.0.2060.1";
|
||||
version = "118.0.2088.9";
|
||||
revision = "1";
|
||||
sha256 = "sha256-OKjCmULPjYuoumqAqivyCFzHSR1IOutEIWTqXtDgMhM=";
|
||||
sha256 = "sha256-JNIccQrdLpiEItgt4Lh0eZQgnXE+5Lx3vGDjzm5sKWM=";
|
||||
};
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
wrapProgram $out/bin/dnsname --prefix PATH : ${lib.makeBinPath [ dnsmasq ]}
|
||||
'';
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
subPackages = [ "plugins/meta/dnsname" ];
|
||||
|
||||
doCheck = false; # NOTE: requires root privileges
|
||||
|
@ -21,16 +21,17 @@ if [ ! "$OLD_VERSION" = "$LATEST_VERSION" ]; then
|
||||
setKV version ${LATEST_VERSION}
|
||||
setKV sha256 ${SHA256}
|
||||
setKV manifestsSha256 ${SPEC_SHA256}
|
||||
setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # The same as lib.fakeSha256
|
||||
setKV vendorHash "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" # The same as lib.fakeHash
|
||||
|
||||
set +e
|
||||
VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd $NIXPKGS_PATH 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
VENDOR_HASH=$(nix-build --no-out-link -A fluxcd $NIXPKGS_PATH 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
VENDOR_HASH=$(nix hash to-sri --type sha256 $VENDOR_HASH)
|
||||
set -e
|
||||
|
||||
if [ -n "${VENDOR_SHA256:-}" ]; then
|
||||
setKV vendorSha256 ${VENDOR_SHA256}
|
||||
if [ -n "${VENDOR_HASH:-}" ]; then
|
||||
setKV vendorHash ${VENDOR_HASH}
|
||||
else
|
||||
echo "Update failed. VENDOR_SHA256 is empty."
|
||||
echo "Update failed. VENDOR_HASH is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -117,7 +117,7 @@ let
|
||||
k3sCNIPlugins = buildGoModule rec {
|
||||
pname = "k3s-cni-plugins";
|
||||
version = k3sCNIVersion;
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
@ -210,7 +210,7 @@ let
|
||||
rev = "v${containerdVersion}";
|
||||
sha256 = containerdSha256;
|
||||
};
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
buildInputs = [ btrfs-progs ];
|
||||
subPackages = [ "cmd/containerd" "cmd/containerd-shim-runc-v2" ];
|
||||
ldflags = versionldflags;
|
||||
|
@ -116,7 +116,7 @@ let
|
||||
k3sCNIPlugins = buildGoModule rec {
|
||||
pname = "k3s-cni-plugins";
|
||||
version = k3sCNIVersion;
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
@ -208,7 +208,7 @@ let
|
||||
rev = "v${containerdVersion}";
|
||||
sha256 = containerdSha256;
|
||||
};
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
buildInputs = [ btrfs-progs ];
|
||||
subPackages = [ "cmd/containerd" "cmd/containerd-shim-runc-v2" ];
|
||||
ldflags = versionldflags;
|
||||
|
@ -129,7 +129,7 @@ let
|
||||
k3sCNIPlugins = buildGoModule rec {
|
||||
pname = "k3s-cni-plugins";
|
||||
version = k3sCNIVersion;
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
@ -226,7 +226,7 @@ let
|
||||
rev = "v${containerdVersion}";
|
||||
sha256 = containerdSha256;
|
||||
};
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
buildInputs = [ btrfs-progs ];
|
||||
subPackages = [ "cmd/containerd-shim-runc-v2" ];
|
||||
ldflags = versionldflags;
|
||||
|
@ -11,7 +11,7 @@ buildGoModule rec {
|
||||
sha256 = "sha256-alU1c1ppn4cQi582kcA/PIAJJt73i3uG02cQvSYij1A=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "This plugin evicts the given pod and is useful for testing pod disruption budget rules";
|
||||
|
@ -17,17 +17,17 @@ setKV () {
|
||||
|
||||
setKV version ${VERSION}
|
||||
setKV sha256 ${SHA256}
|
||||
setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # Necessary to force clean build.
|
||||
setKV vendorHash "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=" # Necessary to force clean build.
|
||||
|
||||
cd ../../../../../
|
||||
set +e
|
||||
VENDOR_SHA256=$(nix-build --no-out-link -A linkerd_edge 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
VENDOR_HASH=$(nix-build --no-out-link -A linkerd_edge 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
set -e
|
||||
cd - > /dev/null
|
||||
|
||||
if [ -n "${VENDOR_SHA256:-}" ]; then
|
||||
setKV vendorSha256 ${VENDOR_SHA256}
|
||||
if [ -n "${VENDOR_HASH:-}" ]; then
|
||||
setKV vendorHash ${VENDOR_HASH}
|
||||
else
|
||||
echo "Update failed. VENDOR_SHA256 is empty."
|
||||
echo "Update failed. VENDOR_HASH is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -17,17 +17,17 @@ setKV () {
|
||||
|
||||
setKV version ${VERSION}
|
||||
setKV sha256 ${SHA256}
|
||||
setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # Necessary to force clean build.
|
||||
setKV vendorHash "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=" # Necessary to force clean build.
|
||||
|
||||
cd ../../../../../
|
||||
set +e
|
||||
VENDOR_SHA256=$(nix-build --no-out-link -A linkerd 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
VENDOR_HASH=$(nix-build --no-out-link -A linkerd 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
set -e
|
||||
cd - > /dev/null
|
||||
|
||||
if [ -n "${VENDOR_SHA256:-}" ]; then
|
||||
setKV vendorSha256 ${VENDOR_SHA256}
|
||||
if [ -n "${VENDOR_HASH:-}" ]; then
|
||||
setKV vendorHash ${VENDOR_HASH}
|
||||
else
|
||||
echo "Update failed. VENDOR_SHA256 is empty."
|
||||
echo "Update failed. VENDOR_HASH is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -10,10 +10,10 @@ buildGoModule rec {
|
||||
|
||||
owner = "kubernetes";
|
||||
repo = "test-infra";
|
||||
sha256 = "0mc3ynmbf3kidibdy8k3v3xjlvmxl8w7zm1z2m0skmhd0y4bpmk4";
|
||||
hash = "sha256-ZNa7iAcN1qlBFT/UfziivW4q+9hjIt9WbHEOt6r1g1U=";
|
||||
};
|
||||
|
||||
vendorSha256 = "16fdc5r28andm8my4fxj0f1yygx6j2mvn92i6xdfhbcra0lvr4ql";
|
||||
vendorHash = "sha256-FJO8KVCZLehaN1Eku6uQpj/vgwOyO+Irqs0qJHJhzZk=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "dnscontrol";
|
||||
version = "4.4.0";
|
||||
version = "4.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StackExchange";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-OxZH8dUl7PEzcan9Jl1rwPpP0+pj4jzLydEQfxxWM+o=";
|
||||
sha256 = "sha256-+4TQAtqM1ruhv3W1SBHAd1WVJKa7dvGLHlxVqazc+uk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-3aGdn6Gp+N/a+o9dl4h0oIOnYhtu4oZuBF6X/HKjQOI=";
|
||||
|
@ -10,12 +10,12 @@
|
||||
, glibcLocales
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "castget";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://savannah.nongnu.org/download/castget/castget-${version}.tar.bz2";
|
||||
url = "http://savannah.nongnu.org/download/castget/castget-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-Q4tffsfjGkXtN1ZjD+RH9CAVrNpT7AkgL0hihya16HU=";
|
||||
};
|
||||
|
||||
@ -51,4 +51,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -20,12 +20,12 @@
|
||||
, pipewire
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gnome-network-displays";
|
||||
version = "0.90.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
url = "mirror://gnome/sources/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-2SBVQK4fJeK8Y2UrrL0g5vQIerDdGE1nhFc6ke4oIpI=";
|
||||
};
|
||||
|
||||
@ -77,4 +77,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -12,25 +12,25 @@ in {
|
||||
|
||||
guiStable = mkGui {
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
|
||||
version = "2.2.43";
|
||||
hash = "sha256-+2dcyWnTJqGaH9yhknYc9/0gnj3qh80eAy6uxG7+fFM=";
|
||||
};
|
||||
|
||||
guiPreview = mkGui {
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
|
||||
version = "2.2.43";
|
||||
hash = "sha256-+2dcyWnTJqGaH9yhknYc9/0gnj3qh80eAy6uxG7+fFM=";
|
||||
};
|
||||
|
||||
serverStable = mkServer {
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
|
||||
version = "2.2.43";
|
||||
hash = "sha256-xWt2qzeqBtt86Wv3dYl4GXkfjr+7WAKn5HdDeUzOQd8=";
|
||||
};
|
||||
|
||||
serverPreview = mkServer {
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
|
||||
version = "2.2.43";
|
||||
hash = "sha256-xWt2qzeqBtt86Wv3dYl4GXkfjr+7WAKn5HdDeUzOQd8=";
|
||||
};
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, qt5
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
@ -21,7 +22,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
pythonRelaxDepsHook
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
@ -33,21 +33,29 @@ python3.pkgs.buildPythonApplication rec {
|
||||
setuptools
|
||||
sip_4 (pyqt5.override { withWebSockets = true; })
|
||||
truststore
|
||||
] ++ lib.optionals (pythonOlder "3.9") [
|
||||
importlib-resources
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"jsonschema"
|
||||
"sentry-sdk"
|
||||
];
|
||||
|
||||
doCheck = false; # Failing
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapQtApp "$out/bin/gns3"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical Network Simulator 3 GUI (${channel} release)";
|
||||
longDescription = ''
|
||||
|
@ -7,6 +7,7 @@
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, pkgsStatic
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication {
|
||||
@ -25,14 +26,6 @@ python3.pkgs.buildPythonApplication {
|
||||
cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"jsonschema"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
aiofiles
|
||||
aiohttp
|
||||
@ -43,6 +36,7 @@ python3.pkgs.buildPythonApplication {
|
||||
jinja2
|
||||
jsonschema
|
||||
multidict
|
||||
platformdirs
|
||||
prompt-toolkit
|
||||
psutil
|
||||
py-cpuinfo
|
||||
@ -53,13 +47,31 @@ python3.pkgs.buildPythonApplication {
|
||||
zipstream
|
||||
];
|
||||
|
||||
# Requires network access
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
rm $out/bin/gns3loopback # For Windows only
|
||||
postInstall = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||
rm $out/bin/gns3loopback
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# Otherwise tests will fail to create directory
|
||||
# Permission denied: '/homeless-shelter'
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
pytest-aiohttp
|
||||
pytest-rerunfailures
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
# fails on ofborg because of lack of cpu vendor information
|
||||
"--deselect=tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id"
|
||||
# Rerun failed tests up to three times (flaky tests)
|
||||
"--reruns 3"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical Network Simulator 3 server (${channel} release)";
|
||||
longDescription = ''
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ callPackage }: builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; })) {
|
||||
signal-desktop = {
|
||||
dir = "Signal";
|
||||
version = "6.30.2";
|
||||
hash = "sha256-qz3eO+pTLK0J+XjAccrZIJdyoU1zyYyrnpQKeLRZvc8=";
|
||||
version = "6.31.0";
|
||||
hash = "sha256-JYufuFbIYUR3F+MHGZjmDtwTHPDhWLTkjCDDz+8hDrQ=";
|
||||
};
|
||||
signal-desktop-beta = {
|
||||
dir = "Signal Beta";
|
||||
version = "6.31.0-beta.1";
|
||||
hash = "sha256-j3DY+FY7kVVGvVuVZw/JxIpwxtgBttSyWcRaa9MCSjE=";
|
||||
version = "6.32.0-beta.1";
|
||||
hash = "sha256-7G4vjnEQnYOIVwXmBt1yZULvDaWXWTDgZCLWCZUq2Gs=";
|
||||
};
|
||||
}
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
(if stdenv.isDarwin then darwin.apple_sdk_11_0.llvmPackages_14.stdenv else stdenv).mkDerivation rec {
|
||||
pname = "signalbackup-tools";
|
||||
version = "20230919";
|
||||
version = "20230921";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bepaald";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-/Nz+T3ePjabETFrN8fq+JI5g18UEQmmqiJ0XAMR+gzM=";
|
||||
hash = "sha256-wxJPz6zm/mZEW7/p5Aac2PQRf3mmXj84k2hz2RzuNbw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -10,7 +10,7 @@ buildGoModule rec {
|
||||
rev = "v${version}";
|
||||
sha256 = "1fbq7bdhy70hlkklppimgdjamnk0v059pg73xm9ax1f4616ki1m6";
|
||||
};
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Slack client for your terminal";
|
||||
|
@ -13,16 +13,16 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "webcord";
|
||||
version = "4.4.0";
|
||||
version = "4.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SpacingBat3";
|
||||
repo = "WebCord";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Kiw3pebjH9Pz5oi6Gbjxrjd/kvozapLNqfWLVuTXF/I=";
|
||||
hash = "sha256-g9UJANYs5IlKAeRc27oNOfdD3uD3nrG5Ecp+AbbsXLE=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-CPGfhV8VXbpX9UB5oQhI+IwFWPgYq2dGnSuyByMNGg4=";
|
||||
npmDepsHash = "sha256-SSlSLZs97LDtL7OyfCtEGZjDVfsn5KKUgRNyL8J5M5g=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
|
@ -14,7 +14,7 @@ let
|
||||
inherit pname version;
|
||||
inherit (kubo-migrator-unwrapped) src;
|
||||
sourceRoot = "${kubo-migrator-unwrapped.src.name}/${pname}";
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
# Fix build on Go 1.17 and later: panic: qtls.ClientHelloInfo doesn't match
|
||||
# See https://github.com/ipfs/fs-repo-migrations/pull/163
|
||||
postPatch = lib.optionalString (lib.elem pname [ "fs-repo-10-to-11" "fs-repo-11-to-12" ]) ''
|
||||
|
@ -27,7 +27,7 @@ buildGoModule rec {
|
||||
|
||||
passthru.tests.kubo = nixosTests.kubo;
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
outputs = [ "out" "systemd_unit" "systemd_unit_hardened" ];
|
||||
|
||||
|
@ -15,10 +15,10 @@ buildGoModule rec {
|
||||
owner = "jonhoo";
|
||||
repo = "hasmail";
|
||||
rev = "eb52536d26815383bfe5990cd5ace8bb9d036c8d";
|
||||
sha256 = "1p6kwa5xk1mb1fkkxz1b5rcyp5kb4zc8nfif1gk6fab6wbdj9ia1";
|
||||
hash = "sha256-QcUk2+JmKWfmCy46i9gna5brWS4r/D6nC6uG2Yvi09w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "129hvr8qh5mxj6mzg7793p5jsi4jmsm96f63j7r8wn544yq8sqci";
|
||||
vendorHash = "sha256-kWGNsCekWI7ykcM4k6qukkQtyx3pnPerkb0WiFHeMIk=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ lib, stdenv, fetchFromGitHub, openssl, lua, pcre2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "imapfilter";
|
||||
version = "2.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lefcha";
|
||||
repo = "imapfilter";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-nHKZ3skRbDhKWocaw5mbaRnZC37FxFIVd08iFgrEA0s=";
|
||||
};
|
||||
makeFlags = [
|
||||
@ -24,4 +24,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -8,7 +8,7 @@
|
||||
, glib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mswatch";
|
||||
# Stable release won't compile successfully
|
||||
version = "unstable-2018-11-21";
|
||||
@ -35,4 +35,4 @@ stdenv.mkDerivation {
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,6 +1,5 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, mullvad
|
||||
}:
|
||||
buildGoModule {
|
||||
@ -13,7 +12,7 @@ buildGoModule {
|
||||
|
||||
sourceRoot = "${mullvad.src.name}/wireguard/libwg";
|
||||
|
||||
vendorSha256 = "QNde5BqkSuqp3VJQOhn7aG6XknRDZQ62PE3WGhEJ5LU=";
|
||||
vendorHash = "sha256-QNde5BqkSuqp3VJQOhn7aG6XknRDZQ62PE3WGhEJ5LU=";
|
||||
|
||||
# XXX: hack to make the ar archive go to the correct place
|
||||
# This is necessary because passing `-o ...` to `ldflags` does not work
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "twingate";
|
||||
version = "2023.227.93197";
|
||||
version = "2023.250.97595";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://binaries.twingate.com/client/linux/DEB/x86_64/${version}/twingate-amd64.deb";
|
||||
hash = "sha256-YV56U+RXpTOJvyufVKtTY1c460//ZJcifq2XroTQLXU=";
|
||||
hash = "sha256-JTkyJLbcAEcmftPKejMnxwIY+ICkaFar2fahKeXk3fs=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||
owner = "INFURA";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0j5mj9gwwvgx7r1svlg14dpcqlj8mhwlf7sampkkih6bv92qfzcd";
|
||||
hash = "sha256-jX2HRdrLwDjnrUofRzmsSFLMbiPh0a1DPv1tzl+StUg=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1d12jcd8crxcgp5m8ga691wivim4cg8cbz4pzgxp0jhzg9jplpbv";
|
||||
vendorHash = "sha256-e116ZXofSnD7+5f8xdBjpMYdeUhGPVTLfaxnhhqTIrQ=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Benchmark multiple API endpoints against each other";
|
||||
|
@ -8,14 +8,14 @@ buildGoModule rec {
|
||||
owner = "nonoo";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1ycy8avq5s7zspfi0d9klqcwwkpmcaz742cigd7pmcnbbhspcicp";
|
||||
hash = "sha256-l0V2NVzLsnpPe5EJcr5i9U7OGaYzNRDd1f/ogrdCnvk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-CnZTUP2JBbhG8VUHbVX+vicfQJC9Y8endlwQHdmzMus=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pulseaudio ];
|
||||
|
||||
vendorSha256 = "1srjngcis42wfskwfqxxj101y9xyzrans1smy53bh1c9zm856xha";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nonoo/kappanhang";
|
||||
description = "Remote control for Icom radio transceivers";
|
||||
|
@ -41,7 +41,7 @@ let
|
||||
);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "uhd";
|
||||
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
|
||||
# and xxx.yyy.zzz. Hrmpf... style keeps changing
|
||||
@ -52,14 +52,15 @@ stdenv.mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "EttusResearch";
|
||||
repo = "uhd";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-khVOHlvacZc4EMg4m55rxEqPvLY1xURpAfOW905/3jg=";
|
||||
};
|
||||
# Firmware images are downloaded (pre-built) from the respective release on Github
|
||||
uhdImagesSrc = fetchurl {
|
||||
url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
|
||||
url = "https://github.com/EttusResearch/uhd/releases/download/v${finalAttrs.version}/uhd-images_${finalAttrs.version}.tar.xz";
|
||||
sha256 = "V8ldW8bvYWbrDAvpWpHcMeLf9YvF8PIruDAyNK/bru4=";
|
||||
};
|
||||
# TODO: Add passthru.updateScript that will update both of the above hashes...
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_LIBUHD=ON"
|
||||
@ -105,7 +106,7 @@ stdenv.mkDerivation rec {
|
||||
# pythonEnv for runtime as well. The utilities' runtime dependencies are
|
||||
# handled at the environment
|
||||
++ optionals (enableExamples) [ ncurses ncurses.dev ]
|
||||
++ optionals (enablePythonApi || enableUtils) [ pythonEnv ]
|
||||
++ optionals (enablePythonApi || enableUtils) [ finalAttrs.pythonEnv ]
|
||||
++ optionals (enableDpdk) [ dpdk ]
|
||||
;
|
||||
|
||||
@ -128,7 +129,7 @@ stdenv.mkDerivation rec {
|
||||
# UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
|
||||
installFirmware = ''
|
||||
mkdir -p "$out/share/uhd/images"
|
||||
tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images"
|
||||
tar --strip-components=1 -xvf "${finalAttrs.uhdImagesSrc}" -C "$out/share/uhd/images"
|
||||
'';
|
||||
|
||||
# -DENABLE_TESTS=ON installs the tests, we don't need them in the output
|
||||
@ -157,4 +158,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ bjornfor fpletz tomberek doronbehar ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -55,7 +55,7 @@ let
|
||||
"8.16.1".sha256 = "sha256-n7830+zfZeyYHEOGdUo57bH6bb2/SZs8zv8xJhV+iAc=";
|
||||
"8.17.0".sha256 = "sha256-TGwm7S6+vkeZ8cidvp8pkiAd9tk008jvvPvYgfEOXhM=";
|
||||
"8.17.1".sha256 = "sha256-x+RwkbxMg9aR0L3WSCtpIz8jwA5cJA4tXAtHMZb20y4=";
|
||||
"8.18+rc1".sha256 = "sha256-TmV0lzfzhpSnBoVyfTfVFUyBrXpUWSnyN1Le7b8IPTs=";
|
||||
"8.18.0".sha256 = "sha256-WhiBs4nzPHQ0R24xAdM49kmxSCPOxiOVMA1iiMYunz4=";
|
||||
};
|
||||
releaseRev = v: "V${v}";
|
||||
fetched = import ../../../../build-support/coq/meta-fetch/default.nix
|
||||
|
@ -18,12 +18,12 @@ let
|
||||
searchPath = lib.makeBinPath
|
||||
(lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "maxima";
|
||||
version = "5.46.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
url = "mirror://sourceforge/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-c5Dwa0jaZckDPosvYpuXi5AFZFSlQCLbfecOIiWqiwc=";
|
||||
};
|
||||
|
||||
@ -52,11 +52,11 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
# Move emacs modules and documentation into the right place.
|
||||
mkdir -p $out/share/emacs $out/share/doc
|
||||
ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
|
||||
ln -s ../maxima/${version}/doc $out/share/doc/maxima
|
||||
ln -s ../maxima/${finalAttrs.version}/emacs $out/share/emacs/site-lisp
|
||||
ln -s ../maxima/${finalAttrs.version}/doc $out/share/doc/maxima
|
||||
''
|
||||
+ (lib.optionalString (lisp-compiler.pname == "ecl") ''
|
||||
cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
|
||||
cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${finalAttrs.version}/binary-ecl/"
|
||||
'')
|
||||
;
|
||||
|
||||
@ -115,4 +115,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ lib, stdenv, fetchFromGitHub, intltool, autoreconfHook, pkg-config, libqalculate, gtk3, curl, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "qalculate-gtk";
|
||||
version = "4.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qalculate";
|
||||
repo = "qalculate-gtk";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-GYy3Ot2vjXpCp89Rib3Ua0XeVGOOTejKcaqNZvPmxm0=";
|
||||
};
|
||||
|
||||
@ -24,4 +24,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "qalculate-qt";
|
||||
version = "4.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qalculate";
|
||||
repo = "qalculate-qt";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-7VlaoiY+HgHCMZCegUdy2wpgfx3fKaViMtkdNRleHaA=";
|
||||
};
|
||||
|
||||
@ -33,4 +33,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -10,14 +10,14 @@
|
||||
, glib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs:{
|
||||
pname = "wxmaxima";
|
||||
version = "23.02.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wxMaxima-developers";
|
||||
repo = "wxmaxima";
|
||||
rev = "Version-${version}";
|
||||
rev = "Version-${finalAttrs.version}";
|
||||
sha256 = "sha256-Lrj/oJNmKlCkNbnCGY2TewCospwajKdWgmKkreHzEIU=";
|
||||
};
|
||||
|
||||
@ -51,4 +51,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -43,7 +43,7 @@
|
||||
, extraBuildInputs ? []
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
# LAMMPS has weird versioning converted to ISO 8601 format
|
||||
version = "2Aug2023";
|
||||
pname = "lammps";
|
||||
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "lammps";
|
||||
repo = "lammps";
|
||||
rev = "stable_${version}";
|
||||
rev = "stable_${finalAttrs.version}";
|
||||
hash = "sha256-6T4YAa4iN3pJpODGPW+faR16xxyYYdkHLavtiPUbZ4o=";
|
||||
};
|
||||
preConfigure = ''
|
||||
@ -117,4 +117,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ maintainers.costrouc maintainers.doronbehar ];
|
||||
mainProgram = "lmp";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -102,6 +102,8 @@ stdenv.mkDerivation {
|
||||
hash = "sha256-jn/S0xjxZPnkGYpTRIpL3dKxGe7+Z+EmOGHiE0UkQqg=";
|
||||
};
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
@ -96,14 +96,14 @@ let
|
||||
in
|
||||
lib.withFeatureAs (commaSepList != "") featureName commaSepList
|
||||
;
|
||||
in stdenv.mkDerivation rec {
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mlterm";
|
||||
version = "3.9.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arakiken";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
repo = "mlterm";
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-gfs5cdwUUwSBWwJJSaxrQGWJvLkI27RMlk5QvDALEDg=";
|
||||
};
|
||||
|
||||
@ -217,4 +217,4 @@ in stdenv.mkDerivation rec {
|
||||
platforms = platforms.all;
|
||||
mainProgram = desktopBinary;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -39,14 +39,14 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "forgejo";
|
||||
version = "1.20.4-0";
|
||||
version = "1.20.4-1";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "forgejo";
|
||||
repo = "forgejo";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-guKU3VG1Wyhr5p6w0asL/CopQ5b7HiNi26Tw8WCEpwE=";
|
||||
hash = "sha256-Fxlj+ckw1LSgiQDex3ZizHakIKd52U6JcdTurJj8YWg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-dgtZjsLBwblhdge3BvdbK/mN/TeZKps9K5dJbqomtjo=";
|
||||
|
@ -20,7 +20,7 @@ in buildGoModule {
|
||||
owner = "gg-scm";
|
||||
repo = "gg";
|
||||
rev = "v${version}";
|
||||
sha256 = "e628aeddb94d2470de860df09ef65499f8c5493fb336bf3df8502842ee02487f";
|
||||
hash = "sha256-5iiu3blNJHDehg3wnvZUmfjFST+zNr89+FAoQu4CSH8=";
|
||||
};
|
||||
postPatch = ''
|
||||
substituteInPlace cmd/gg/editor_unix.go \
|
||||
@ -33,7 +33,7 @@ in buildGoModule {
|
||||
"-X" "main.buildCommit=${commit}"
|
||||
];
|
||||
|
||||
vendorSha256 = "214dc073dad7b323ea449acf24c5b578d573432eeaa1506cf5761a2d7f5ce405";
|
||||
vendorHash = "sha256-IU3Ac9rXsyPqRJrPJMW1eNVzQy7qoVBs9XYaLX9c5AU=";
|
||||
|
||||
nativeBuildInputs = [ pandoc installShellFiles makeWrapper ];
|
||||
nativeCheckInputs = [ bash coreutils git ];
|
||||
|
@ -14,7 +14,7 @@ buildGoModule rec {
|
||||
sha256 = "sha256-HD5OK8HjnLDbyC/TmVI2HfBRIUCyyHTbA3JvKoeXV5E=";
|
||||
};
|
||||
|
||||
vendorSha256 = null; #vendorSha256 = "";
|
||||
vendorHash = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Reconnaissance tool for GitHub code search";
|
||||
|
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||
owner = "apenwarr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0p1n29k2a2rpznwxlwzkmx38ic6g041k9vx7msvick7cydn417fx";
|
||||
hash = "sha256-3Z1AbPPsTBa3rqfvNAMBz7CIRq/zc9q5/TcLJWYSNlw=";
|
||||
};
|
||||
|
||||
vendorSha256 = "0m64grnmhjvfsw7a56474s894sgd24rvcp5kamhzzyc4q556hqny";
|
||||
vendorHash = "sha256-3mJoSsGE+f9hVbNctjMR7WmSkCaHmKIO125LWG1+xFQ=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -16,7 +16,7 @@ buildGoModule rec {
|
||||
hash = "sha256-kLkH/nNidd1QNPKvo7fxZwMhTgd4AVB8Ofw0Wo0z6c0=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = gitls;
|
||||
|
@ -13,10 +13,10 @@ buildGoModule rec {
|
||||
owner = "uetchy";
|
||||
repo = "gst";
|
||||
rev = "v${version}";
|
||||
sha256 = "07cixz5wlzzb4cwcrncg2mz502wlhd3awql5js1glw9f6qfwc5in";
|
||||
hash = "sha256-NhbGHTYucfqCloVirkaDlAtQfhWP2cw4I+t/ysvvkR0=";
|
||||
};
|
||||
|
||||
vendorSha256 = "0k5xl55vzpl64gwsgaff92jismpx6y7l2ia0kx7gamd1vklf0qwh";
|
||||
vendorHash = "sha256-kGPg6NyhVfVOn0BFQY83/VYdpUjOqaf5I4bev0uhvUw=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ buildVersion, x64sha256, dev ? false }:
|
||||
{ buildVersion, aarch64sha256, x64sha256, dev ? false }:
|
||||
|
||||
{ fetchurl, lib, stdenv, xorg, glib, libGL, glibcLocales, gtk3, cairo, pango, libredirect, makeWrapper, wrapGAppsHook
|
||||
, pkexecPath ? "/run/wrappers/bin/pkexec"
|
||||
@ -8,14 +8,23 @@
|
||||
let
|
||||
pnameBase = "sublime-merge";
|
||||
packageAttribute = "sublime-merge${lib.optionalString dev "-dev"}";
|
||||
binaries = [ "sublime_merge" "crash_reporter" "git-credential-sublime" "ssh-askpass-sublime" ];
|
||||
binaries = [ "sublime_merge" crashHandlerBinary "git-credential-sublime" "ssh-askpass-sublime" ];
|
||||
primaryBinary = "sublime_merge";
|
||||
primaryBinaryAliases = [ "smerge" ];
|
||||
crashHandlerBinary = if lib.versionAtLeast buildVersion "2086" then "crash_handler" else "crash_reporter";
|
||||
downloadUrl = arch: "https://download.sublimetext.com/sublime_merge_build_${buildVersion}_${arch}.tar.xz";
|
||||
versionUrl = "https://www.sublimemerge.com/${if dev then "dev" else "download"}";
|
||||
versionFile = builtins.toString ./default.nix;
|
||||
|
||||
libPath = lib.makeLibraryPath [ xorg.libX11 glib gtk3 cairo pango curl ];
|
||||
neededLibraries = [
|
||||
xorg.libX11
|
||||
glib
|
||||
gtk3
|
||||
cairo
|
||||
pango
|
||||
curl
|
||||
];
|
||||
|
||||
redirects = [ "/usr/bin/pkexec=${pkexecPath}" "/bin/true=${coreutils}/bin/true" ];
|
||||
in let
|
||||
binaryPackage = stdenv.mkDerivation rec {
|
||||
@ -35,7 +44,7 @@ in let
|
||||
for binary in ${ builtins.concatStringsSep " " binaries }; do
|
||||
patchelf \
|
||||
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath ${libPath}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
|
||||
--set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
|
||||
$binary
|
||||
done
|
||||
|
||||
@ -76,6 +85,10 @@ in let
|
||||
|
||||
passthru = {
|
||||
sources = {
|
||||
"aarch64-linux" = fetchurl {
|
||||
url = downloadUrl "arm64";
|
||||
sha256 = aarch64sha256;
|
||||
};
|
||||
"x86_64-linux" = fetchurl {
|
||||
url = downloadUrl "x64";
|
||||
sha256 = x64sha256;
|
||||
@ -109,7 +122,7 @@ in stdenv.mkDerivation (rec {
|
||||
passthru = {
|
||||
updateScript =
|
||||
let
|
||||
script = writeShellScript "${pnameBase}-update-script" ''
|
||||
script = writeShellScript "${packageAttribute}-update-script" ''
|
||||
set -o errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep ]}
|
||||
|
||||
@ -137,6 +150,6 @@ in stdenv.mkDerivation (rec {
|
||||
maintainers = with maintainers; [ zookatron ];
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
||||
};
|
||||
})
|
||||
|
@ -4,13 +4,15 @@ let
|
||||
common = opts: callPackage (import ./common.nix opts);
|
||||
in {
|
||||
sublime-merge = common {
|
||||
buildVersion = "2083";
|
||||
x64sha256 = "bWHbP8j228jUDr1XDLRciq7hcET6o6Udr/lLODXRudc=";
|
||||
buildVersion = "2091";
|
||||
aarch64sha256 = "dkPKuuzQQtL3eZlaAPeL7e2p5PCxroFRSp6Rw5wHODc=";
|
||||
x64sha256 = "T5g6gHgl9xGytEOsh3VuB08IrbDvMu24o/1edCGmfd4=";
|
||||
} {};
|
||||
|
||||
sublime-merge-dev = common {
|
||||
buildVersion = "2085";
|
||||
x64sha256 = "40yI6EtP2l22aPP50an3ycvdEcAqJphhGhYYoOPyHw0=";
|
||||
buildVersion = "2090";
|
||||
aarch64sha256 = "96nJn+7bVoLM6D14pFujlj3JOQL5PwdU1+SWzEjoYhU=";
|
||||
x64sha256 = "bu51gsu0XxZBF8/HncPttcKiIRpC7qsKTgR9cktKOnI=";
|
||||
dev = true;
|
||||
} {};
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ lib.recurseIntoAttrs
|
||||
inhibit-gnome = callPackage ./inhibit-gnome.nix { };
|
||||
mpris = callPackage ./mpris.nix { };
|
||||
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
|
||||
mpv-webm = callPackage ./mpv-webm.nix { };
|
||||
mpvacious = callPackage ./mpvacious.nix { };
|
||||
quality-menu = callPackage ./quality-menu.nix { };
|
||||
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
|
||||
|
36
pkgs/applications/video/mpv/scripts/mpv-webm.nix
Normal file
36
pkgs/applications/video/mpv/scripts/mpv-webm.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, luaPackages
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "mpv-webm";
|
||||
version = "unstable-2023-02-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ekisu";
|
||||
repo = "mpv-webm";
|
||||
rev = "a18375932e39e9b2a40d9c7ab52ea367b41e2558";
|
||||
hash = "sha256-aetkQ1gU/6Yys5FJS/N06ED9tCSvL6BAgUGdNmNmpbU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ luaPackages.moonscript ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/mpv/scripts
|
||||
install -m 644 build/webm.lua $out/share/mpv/scripts/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.scriptName = "webm.lua";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple WebM maker for mpv, with no external dependencies";
|
||||
homepage = "https://github.com/ekisu/mpv-webm";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "prism";
|
||||
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||
owner = "muesli";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0q7q7aj3fm45bnx6hgl9c1ll8na16x6p7qapr0c4a6dhxwd7n511";
|
||||
hash = "sha256-IRR7Gu+wGUUYyFfhc003QVlEaWCJPmi6XYVUN6Q6+GA=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1mkd1s9zgzy9agy2rjjk8wfdga7nzv9cmwgiarfi4xrqzj4mbaxq";
|
||||
vendorHash = "sha256-uKtVifw4dxJdVvHxytL+9qjXHEdTyiz8U8n/95MObdY=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "An RTMP stream recaster/splitter";
|
||||
|
@ -16,21 +16,21 @@
|
||||
, ffmpeg-full
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "video-trimmer";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "YaLTeR";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
repo = "video-trimmer";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-nr0PAvp4wlswQBNN2LLyYQMpk3IIleHf3+978XhUGGQ=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
inherit (finalAttrs) src;
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}";
|
||||
hash = "sha256-YFbLMpQbHUtxRrBVarcoIeDsvc26NWc1YhMeCaLgJAc=";
|
||||
};
|
||||
|
||||
@ -74,4 +74,4 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -21,7 +21,7 @@ buildGoModule rec{
|
||||
leaveDotGit = true;
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -39,18 +39,18 @@
|
||||
, withX ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "open-vm-tools";
|
||||
version = "12.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmware";
|
||||
repo = "open-vm-tools";
|
||||
rev = "stable-${version}";
|
||||
rev = "stable-${finalAttrs.version}";
|
||||
hash = "sha256-YVpWomLED5sBKXKdJtuDjb7/aKB2flVIm2ED3xSsccE=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/open-vm-tools";
|
||||
sourceRoot = "${finalAttrs.src.name}/open-vm-tools";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@ -137,7 +137,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/vmware/open-vm-tools";
|
||||
changelog = "https://github.com/vmware/open-vm-tools/releases/tag/stable-${version}";
|
||||
changelog = "https://github.com/vmware/open-vm-tools/releases/tag/stable-${finalAttrs.version}";
|
||||
description = "Set of tools for VMWare guests to improve host-guest interaction";
|
||||
longDescription = ''
|
||||
A set of services and modules that enable several features in VMware products for
|
||||
@ -147,4 +147,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ joamaki kjeremy ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -17,7 +17,7 @@ buildGoModule rec {
|
||||
sha256 = "0in8kyi4jprvbm3zsl3risbjj8b0ma62yl3rq8rcvcgypx0mn7d4";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
vendorHash = null;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "composer-phar";
|
||||
version = "2.6.2";
|
||||
version = "2.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/composer/composer/releases/download/${finalAttrs.version}/composer.phar";
|
||||
hash = "sha256-iMhNSlP88cJ9Z2Lh1da3DVfG3J0uIxT9Cdv4a/YeGu8=";
|
||||
hash = "sha256-5Yo5DKwN9FzPWj2VrpT6I57e2LeQf6LI91LwIDBPybE=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
@ -379,21 +379,21 @@ rec {
|
||||
};
|
||||
|
||||
# Create a C binary
|
||||
writeCBin = name: code:
|
||||
runCommandCC name
|
||||
writeCBin = pname: code:
|
||||
runCommandCC pname
|
||||
{
|
||||
inherit name code;
|
||||
inherit pname code;
|
||||
executable = true;
|
||||
passAsFile = ["code"];
|
||||
# Pointless to do this on a remote machine.
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
meta = {
|
||||
mainProgram = name;
|
||||
mainProgram = pname;
|
||||
};
|
||||
}
|
||||
''
|
||||
n=$out/bin/$name
|
||||
n=$out/bin/${pname}
|
||||
mkdir -p "$(dirname "$n")"
|
||||
mv "$codePath" code.c
|
||||
$CC -x c code.c -o "$n"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user