Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-09-21 12:01:19 +00:00 committed by GitHub
commit 4c610adf95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
117 changed files with 1663 additions and 673 deletions

22
.github/CODEOWNERS vendored
View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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 -- *

View File

@ -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
];
}

View File

@ -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;
}

View File

@ -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

View File

@ -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";

View File

@ -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;

View File

@ -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;
};
}
})

View File

@ -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";
};
}
})

View File

@ -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;
};
}
})

View File

@ -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 {

View File

@ -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";

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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=";
};
}

View File

@ -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 = ''

View File

@ -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 = ''

View File

@ -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 ];
};
}
})

View File

@ -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 ];
};
}
})

View File

@ -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 ];
};
}
})

View File

@ -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

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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";
};
}
})

View File

@ -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;
};
}
})

View File

@ -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;
};
}
})

View File

@ -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"

View File

@ -0,0 +1,35 @@
{ lib
, stdenv
, fetchurl
}:
stdenv.mkDerivation (finalAttrs: {
pname = "binsort";
version = "0.4-1";
src = fetchurl {
url = "http://neoscientists.org/~tmueller/binsort/download/binsort-${finalAttrs.version}.tar.gz";
hash = "sha256-l9T0LlDslxCgZYf8NrbsRly7bREOTGwptLteeg3TNRg=";
};
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp binsort $out/bin/
runHook postInstall
'';
meta = with lib; {
description = "Sort files by binary similarity";
homepage = "http://neoscientists.org/~tmueller/binsort/";
license = licenses.bsd3;
maintainers = with maintainers; [ numinit ];
platforms = platforms.unix;
};
})

View File

@ -0,0 +1,37 @@
{ lib
, stdenvNoCC
, fetchurl
, undmg
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "rectangle-pro";
version = "3.0.9";
src = fetchurl {
url = "https://rectangleapp.com/pro/downloads/Rectangle%20Pro%20${finalAttrs.version}.dmg";
hash = "sha256-wD8yi2Pbgrn1fW/xrocepDcpzSMsQH5yjB/Jv90PuGQ=";
};
sourceRoot = ".";
nativeBuildInputs = [ undmg ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r *.app $out/Applications
runHook postInstall
'';
meta = with lib; {
description = "Move and resize windows in macOS using keyboard shortcuts or snap areas";
homepage = "https://rectangleapp.com/pro";
license = licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ emilytrau Enzime ];
platforms = platforms.darwin;
};
})

View File

@ -37,7 +37,7 @@ let
) selectedFontsShas;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
inherit version;
inherit srcs;
pname = "nerdfonts";
@ -69,4 +69,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
};
}
})

View File

@ -1,13 +1,13 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, glib, gnome, gettext, jq, intltool }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "gnome-shell-extension-EasyScreenCast";
version = "1.7.0";
src = fetchFromGitHub {
owner = "EasyScreenCast";
repo = "EasyScreenCast";
rev = version;
rev = finalAttrs.version;
hash = "sha256-+cH/gczCdxoSrLp5nD82Spo8bSGyRnUUut3Xkmr9f3o=";
};
@ -34,4 +34,4 @@ stdenv.mkDerivation rec {
platforms = platforms.linux;
broken = true;
};
}
})

View File

@ -5,31 +5,34 @@
, ocamlPackages
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "heptagon";
version = "1.05.00";
src = fetchFromGitLab {
domain = "gitlab.inria.fr";
owner = "synchrone";
repo = pname;
rev = "v${version}";
sha256 = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE=";
repo = "heptagon";
rev = "v${finalAttrs.version}";
hash = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE=";
};
nativeBuildInputs = [
strictDeps = true;
nativeBuildInputs = with ocamlPackages; [
camlp4
findlib
makeWrapper
menhir
ocaml
ocamlbuild
];
buildInputs = with ocamlPackages; [
ocaml
findlib
menhir
camlp4
lablgtk
menhirLib
ocamlgraph
camlp4
ocamlbuild
lablgtk
];
# the heptagon library in lib/heptagon is not executable
@ -48,5 +51,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
maintainers = with maintainers; [ wegank ];
mainProgram = "heptc";
platforms = platforms.unix;
};
}
})

View File

@ -7,11 +7,13 @@ mkCoqDerivation {
domain = "gitlab.inria.fr";
inherit version;
defaultVersion = with lib.versions; lib.switch coq.coq-version [
{ case = range "8.14" "8.18"; out = "4.1.3"; }
{ case = range "8.14" "8.17"; out = "4.1.1"; }
{ case = range "8.14" "8.16"; out = "4.1.0"; }
{ case = range "8.7" "8.15"; out = "3.4.3"; }
{ case = range "8.5" "8.8"; out = "2.6.1"; }
] null;
release."4.1.3".sha256 = "sha256-os3cI885xNpxI+1p5rb8fSNnxKr7SFxqh83+3AM3t4I=";
release."4.1.1".sha256 = "sha256-FbClxlV0ZaxITe7s9SlNbpeMNDJli+Dfh2TMrjaMtHo=";
release."4.1.0".sha256 = "sha256:09rak9cha7q11yfqracbcq75mhmir84331h1218xcawza48rbjik";
release."3.4.3".sha256 = "sha256-YTdWlEmFJjCcHkl47jSOgrGqdXoApJY4u618ofCaCZE=";

View File

@ -5,6 +5,7 @@
owner = "fbesson";
domain = "gitlab.inria.fr";
release."8.18.0".sha256 = "sha256-4mDDnKTeYrf27uRMkydQxO7j2tfgTFXOREW474d40eo=";
release."8.17.0".sha256 = "sha256-fgdnKchNT1Hyrq14gU8KWYnlSfg3qlsSw5A4+RoA26w=";
release."8.16.0".sha256 = "sha256-4zAUYGlw/pBcLPv2GroIduIlvbfi1+Vy+TdY8KLCqO4=";
release."8.15.0".sha256 = "sha256:10qpv4nx1p0wm9sas47yzsg9z22dhvizszfa21yff08a8fr0igya";
@ -12,6 +13,7 @@
release."8.13+no".sha256 = "sha256-gXoxtLcHPoyjJkt7WqvzfCMCQlh6kL2KtCGe3N6RC/A=";
inherit version;
defaultVersion = with lib.versions; lib.switch coq.coq-version [
{ case = isEq "8.18"; out = "8.18.0"; }
{ case = isEq "8.17"; out = "8.17.0"; }
{ case = isEq "8.16"; out = "8.16.0"; }
{ case = isEq "8.15"; out = "8.15.0"; }
@ -33,4 +35,7 @@
}).overrideAttrs (o: lib.optionalAttrs
(o.version == "dev" || lib.versionAtLeast o.version "8.16") {
propagatedBuildInputs = [ coq.ocamlPackages.findlib ];
} // lib.optionalAttrs
(o.version == "dev" || lib.versionAtLeast o.version "8.18") {
nativeBuildInputs = with coq.ocamlPackages; [ ocaml findlib dune_3 ];
})

View File

@ -1,9 +1,6 @@
{ stdenv
, pkgs
, lib
# Note: either stdenv.mkDerivation or, for octaveFull, the qt-5 mkDerivation
# with wrapQtAppsHook (comes from libsForQt5.callPackage)
, mkDerivation
, fetchurl
, gfortran
, ncurses
@ -27,26 +24,25 @@
, curl
, rapidjson
, blas, lapack
# These two should use the same lapack and blas as the above
, qrupdate, arpack, suitesparse ? null
# These 3 should use the same lapack and blas as the above, see code prepending
, qrupdate, arpack, suitesparse
# If set to true, the above 5 deps are overridden to use the blas and lapack
# with 64 bit indexes support. If all are not compatible, the build will fail.
, use64BitIdx ? false
, libwebp
, gl2ps
, ghostscript ? null
, hdf5 ? null
, glpk ? null
, gnuplot ? null
, ghostscript
, hdf5
, glpk
, gnuplot
# - Include support for GNU readline:
, enableReadline ? true
, readline ? null
, readline
# - Build Java interface:
, enableJava ? true
, jdk ? null
, python ? null
, overridePlatforms ? null
, sundials ? null
, jdk
, python3
, sundials
# - Packages required for building extra packages.
, newScope
, callPackage
@ -54,17 +50,13 @@
, makeWrapper
# - Build Octave Qt GUI:
, enableQt ? false
, qtbase ? null
, qtsvg ? null
, qtscript ? null
, qscintilla ? null
, qttools ? null
, qt5
, qscintilla
, libiconv
, darwin
}:
let
# Not always evaluated
blas' = if use64BitIdx then
blas.override {
@ -90,7 +82,7 @@ let
blas = blas';
lapack = lapack';
};
# Not always suitesparse is required at all
# We keep the option to not enable suitesparse support by putting it null
suitesparse' = if suitesparse != null then
suitesparse.override {
blas = blas';
@ -99,24 +91,14 @@ let
else
null
;
octavePackages = import ../../../top-level/octave-packages.nix {
inherit pkgs;
inherit lib stdenv fetchurl newScope;
octave = self;
};
wrapOctave = callPackage ./wrap-octave.nix {
octave = self;
inherit (pkgs) makeSetupHook makeWrapper;
};
self = mkDerivation rec {
# To avoid confusion later in passthru
allPkgs = pkgs;
in stdenv.mkDerivation (finalAttrs: {
version = "8.3.0";
pname = "octave";
src = fetchurl {
url = "mirror://gnu/octave/${pname}-${version}.tar.gz";
url = "mirror://gnu/octave/octave-${finalAttrs.version}.tar.gz";
sha256 = "sha256-K0gRHLZ7MSgX5dHz4XH1utFRK7Bn4WdLnEspKBiVuXo=";
};
@ -142,41 +124,35 @@ let
arpack'
libwebp
gl2ps
]
++ lib.optionals enableQt [
qtbase
qtsvg
ghostscript
hdf5
glpk
suitesparse'
sundials
gnuplot
python3
] ++ lib.optionals enableQt [
qt5.qtbase
qt5.qtsvg
qscintilla
]
++ lib.optionals (ghostscript != null) [ ghostscript ]
++ lib.optionals (hdf5 != null) [ hdf5 ]
++ lib.optionals (glpk != null) [ glpk ]
++ lib.optionals (suitesparse != null) [ suitesparse' ]
++ lib.optionals (enableJava) [ jdk ]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals (gnuplot != null) [ gnuplot ]
++ lib.optionals (python != null) [ python ]
++ lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ]
++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals (enableJava) [
jdk
] ++ lib.optionals (!stdenv.isDarwin) [
libGL libGLU libX11
] ++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.Accelerate
darwin.apple_sdk.frameworks.Cocoa
]
;
];
nativeBuildInputs = [
pkg-config
gfortran
# Listed here as well because it's outputs are split
fftw
fftwSinglePrec
texinfo
]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals enableQt [
qtscript
qttools
]
;
] ++ lib.optionals enableQt [
qt5.wrapQtAppsHook
qt5.qtscript
qt5.qttools
];
doCheck = !stdenv.isDarwin;
@ -202,30 +178,39 @@ let
# Keep a copy of the octave tests detailed results in the output
# derivation, because someone may care
postInstall = ''
cp test/fntests.log $out/share/octave/${pname}-${version}-fntests.log || true
cp test/fntests.log $out/share/octave/octave-${finalAttrs.version}-fntests.log || true
'';
passthru = rec {
sitePath = "share/octave/${version}/site";
sitePath = "share/octave/${finalAttrs.version}/site";
octPkgsPath = "share/octave/octave_packages";
blas = blas';
lapack = lapack';
qrupdate = qrupdate';
arpack = arpack';
suitesparse = suitesparse';
octavePackages = import ../../../top-level/octave-packages.nix {
pkgs = allPkgs;
inherit lib stdenv fetchurl newScope;
octave = finalAttrs.finalPackage;
};
wrapOctave = callPackage ./wrap-octave.nix {
octave = finalAttrs.finalPackage;
inherit (allPkgs) makeSetupHook makeWrapper;
};
inherit fftw fftwSinglePrec;
inherit portaudio;
inherit jdk;
inherit python;
python = python3;
inherit enableQt enableReadline enableJava;
buildEnv = callPackage ./build-env.nix {
octave = self;
octave = finalAttrs.finalPackage;
inherit octavePackages wrapOctave;
inherit (octavePackages) computeRequiredOctavePackages;
};
withPackages = import ./with-packages.nix { inherit buildEnv octavePackages; };
pkgs = octavePackages;
interpreter = "${self}/bin/octave";
interpreter = "${finalAttrs.finalPackage}/bin/octave";
};
meta = {
@ -233,10 +218,5 @@ let
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ raskin doronbehar ];
description = "Scientific Programming Language";
platforms = if overridePlatforms == null then
(lib.platforms.linux ++ lib.platforms.darwin)
else overridePlatforms;
};
};
in self
})

View File

@ -12,14 +12,14 @@
, python3
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "comedilib";
version = "0.12.0";
src = fetchFromGitHub {
owner = "Linux-Comedi";
repo = "comedilib";
rev = "r${lib.replaceStrings [ "." ] [ "_" ] version}";
rev = "r${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
sha256 = "0kfs2dw62vjz8j7fgsxq6ky8r8kca726gyklbm6kljvgfh47lyfw";
};
@ -53,4 +53,4 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.doronbehar ];
platforms = platforms.linux;
};
}
})

View File

@ -6,14 +6,14 @@
, iconv
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "cpp-utilities";
version = "5.24.0";
src = fetchFromGitHub {
owner = "Martchus";
repo = pname;
rev = "v${version}";
repo = "cpp-utilities";
rev = "v${finalAttrs.version}";
sha256 = "sha256-krskfuoCRxYcAIDqrae4+yEABXXZ9Nv0BjBVwSMjC7g=";
};
@ -41,4 +41,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux ++ platforms.darwin;
};
}
})

View File

@ -1,20 +1,21 @@
{ mkDerivation
{ stdenv
, lib
, fetchurl
, cmake
, extra-cmake-modules
, pkg-config
, wrapQtAppsHook
, extra-cmake-modules
, kcoreaddons
, kpeople
, kcontacts
}:
mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "kpeoplevcard";
version = "0.1";
src = fetchurl {
url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz";
url = "https://download.kde.org/stable/${finalAttrs.pname}/${finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
sha256 = "1hv3fq5k0pps1wdvq9r1zjnr0nxf8qc3vwsnzh9jpvdy79ddzrcd";
};
@ -25,8 +26,9 @@ mkDerivation rec {
];
nativeBuildInputs = [
pkg-config
cmake
pkg-config
wrapQtAppsHook
extra-cmake-modules
];
@ -36,5 +38,5 @@ mkDerivation rec {
license = with licenses; [ lgpl2 ];
maintainers = with maintainers; [ doronbehar ];
};
}
})

View File

@ -6,7 +6,7 @@
, pkg-config
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "liberio";
version = "unstable-2019-12-11";
@ -35,4 +35,4 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.doronbehar ];
platforms = platforms.all;
};
}
})

View File

@ -1,28 +1,55 @@
{ lib, stdenv, fetchFromGitHub
, mpfr, gnuplot
{ lib
, stdenv
, fetchFromGitHub
, intltool
, pkg-config
, doxygen
, autoreconfHook
, buildPackages
, curl
, gettext
, libiconv
, readline
, libxml2, curl
, intltool, libiconv, icu, gettext
, pkg-config, doxygen, autoreconfHook, buildPackages
, libxml2
, mpfr
, icu
, gnuplot
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libqalculate";
version = "4.8.0";
src = fetchFromGitHub {
owner = "qalculate";
repo = "libqalculate";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-wONqqd8Ds10SvkUrj7Ps6BfqUNPE6hCnQrKDTEglVEQ=";
};
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = [ intltool pkg-config autoreconfHook doxygen ];
buildInputs = [ curl gettext libiconv readline ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
propagatedBuildInputs = [ libxml2 mpfr icu ];
nativeBuildInputs = [
intltool
pkg-config
autoreconfHook
doxygen
];
depsBuildBuild = [
buildPackages.stdenv.cc
];
buildInputs = [
curl
gettext
libiconv
readline
];
propagatedBuildInputs = [
libxml2
mpfr
icu
];
enableParallelBuilding = true;
preConfigure = ''
@ -52,4 +79,4 @@ stdenv.mkDerivation rec {
mainProgram = "qalc";
platforms = platforms.all;
};
}
})

View File

@ -9,13 +9,13 @@
, SDL2_image
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libwtk-sdl2";
version = "unstable-2023-02-28";
src = fetchFromGitHub {
owner = "muesli4";
repo = pname;
repo = "libwtk-sdl2";
rev = "0504f8342c8c97d0c8b43d33751427c564ad8d44";
sha256 = "sha256-NAjsDQ4/hklYRfa85uleOr50tmc6UJVo2xiDnEbmIxk=";
};
@ -48,4 +48,4 @@ stdenv.mkDerivation rec {
*/
platforms = platforms.linux;
};
}
})

View File

@ -100,8 +100,8 @@ let
in
{
ogre_14 = common {
version = "14.0.1";
hash = "sha256-jtUm0jy0GsxkGlFdODGodPsuSaQgiE77BORnA6SFViU=";
version = "14.1.0";
hash = "sha256-CPyXqlUb69uLCsoomjFUbBj7bzPyI01m2yinFuoX5nE=";
};
ogre_13 = common {

View File

@ -1,29 +1,31 @@
{ mkDerivation
{ stdenv
, lib
, fetchurl
, cmake
, extra-cmake-modules
, pkg-config
, extra-cmake-modules
, wrapQtAppsHook
, pulseaudio
}:
mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "pulseaudio-qt";
version = "1.3.0";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${pname}-${lib.versions.majorMinor version}.tar.xz";
url = "mirror://kde/stable/${finalAttrs.pname}/${finalAttrs.pname}-${lib.versions.majorMinor finalAttrs.version}.tar.xz";
sha256 = "1i4yb0v1mmhih8c2i61hybg6q60qys3pc5wbjb7a0vwl1mihgsxw";
};
buildInputs = [
pulseaudio
nativeBuildInputs = [
cmake
pkg-config
extra-cmake-modules
wrapQtAppsHook
];
nativeBuildInputs = [
pkg-config
cmake
extra-cmake-modules
buildInputs = [
pulseaudio
];
meta = with lib; {
@ -32,4 +34,4 @@ mkDerivation rec {
license = with licenses; [ lgpl2 ];
maintainers = with maintainers; [ doronbehar ];
};
}
})

View File

@ -1,21 +1,21 @@
{ stdenv
, lib
, fetchFromGitHub
, gfortran
, blas
, cmake
, lapack
, which
, gfortran
, blas
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "qrupdate";
version = "1.1.5";
src = fetchFromGitHub {
owner = "mpimd-csc";
repo = "qrupdate-ng";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-dHxLPrN00wwozagY2JyfZkD3sKUD2+BcnbjNgZepzFg=";
};
@ -49,4 +49,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.unix;
};
}
})

View File

@ -1,12 +1,12 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, qttools
, perl
, cpp-utilities
, qtutilities
, qttools
, qtbase
, cmake
, perl
}:
let
@ -16,28 +16,29 @@ let
rev = "1.2.0";
sha256 = "sha256-zG6/0dWjU7/y/oDZuSEv+54Mchng64LVyV8bluskYzc=";
};
in stdenv.mkDerivation rec {
in stdenv.mkDerivation (finalAttrs: {
pname = "qtforkawesome";
version = "0.1.0";
src = fetchFromGitHub {
owner = "Martchus";
repo = pname;
rev = "v${version}";
repo = "qtforkawesome";
rev = "v${finalAttrs.version}";
sha256 = "sha256-9e2TCg3itYtHZSvzCoaiIZmgsCMIoebh6C/XWtKz/2Q=";
};
buildInputs = [
qtbase
cpp-utilities
qtutilities
];
nativeBuildInputs = [
cmake
qttools
perl
perl.pkgs.YAML
];
buildInputs = [
qtbase
cpp-utilities
qtutilities
];
cmakeFlags = [
# Current freetype used by NixOS users doesn't support the `.woff2` font
# format, so we use ttf. See
@ -55,5 +56,5 @@ in stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux ++ platforms.darwin;
};
}
})

View File

@ -1,27 +1,35 @@
{ stdenv
, lib
, fetchFromGitHub
, cpp-utilities
, qttools
, qtbase
, cmake
, qttools
, cpp-utilities
, qtbase
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "qtutilities";
version = "6.13.1";
src = fetchFromGitHub {
owner = "Martchus";
repo = pname;
rev = "v${version}";
repo = "qtutilities";
rev = "v${finalAttrs.version}";
hash = "sha256-ic1Xnle1fGZ5elf0yH0BF+3spAmIo9kP62WhXLmBVNc=";
};
buildInputs = [ qtbase cpp-utilities ];
nativeBuildInputs = [ cmake qttools ];
nativeBuildInputs = [
cmake
qttools
];
buildInputs = [
qtbase
cpp-utilities
];
cmakeFlags = ["-DBUILD_SHARED_LIBS=ON"];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
];
dontWrapQtApps = true;
@ -32,4 +40,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux ++ platforms.darwin;
};
}
})

View File

@ -6,11 +6,11 @@
}:
let
suitesparseVersion = "7.1.0";
suitesparseVersion = "7.2.0";
in
stdenv.mkDerivation {
pname = "mongoose";
version = "3.0.5";
version = "3.2.1";
outputs = [ "bin" "out" "dev" ];
@ -18,7 +18,7 @@ stdenv.mkDerivation {
owner = "DrTimothyAldenDavis";
repo = "SuiteSparse";
rev = "v${suitesparseVersion}";
hash = "sha256-UizybioU1J01PLBpu+PfnSzWScGTvMuJN5j9PjuZRwE=";
hash = "sha256-Ss1R3P1fyRwlGQxJchydV36xLEMAGJabMMiQiKykKrc=";
};
nativeBuildInputs = [

View File

@ -1,18 +1,29 @@
{ lib, stdenv, fetchFromGitHub, cmake, sqlite, gtest }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, sqlite
, gtest
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "sqlitecpp";
version = "3.3.1";
src = fetchFromGitHub {
owner = "SRombauts";
repo = pname;
rev = version;
repo = "sqlitecpp";
rev = finalAttrs.version;
sha256 = "sha256-8l1JRaE7w9vJ4bCSLGAk9zwYHDFeKkBi9pE5fUJfLRc=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ sqlite gtest ];
nativeBuildInputs = [
cmake
];
buildInputs = [
sqlite
gtest
];
doCheck = true;
cmakeFlags = [
@ -27,4 +38,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = [ maintainers.jbedo maintainers.doronbehar ];
};
}
})

View File

@ -4,14 +4,14 @@
, cmake
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "tweeny";
version = "3.2.0";
src = fetchFromGitHub {
owner = "mobius3";
repo = "tweeny";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-VmvOMK+FjYZXKH9kPUT2L7pmJMPSr5eXptCcoGWK+qo=";
};
@ -28,4 +28,4 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.doronbehar ];
platforms = with platforms; darwin ++ linux;
};
}
})

View File

@ -8,7 +8,7 @@
, fetchpatch
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "volk";
# Version 2.5.1 seems to cause a build issue for aarch64-darwin, see:
# https://github.com/NixOS/nixpkgs/pull/160152#issuecomment-1043380478A
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "gnuradio";
repo = pname;
rev = "v${version}";
repo = "volk";
rev = "v${finalAttrs.version}";
sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc=";
fetchSubmodules = true;
};
@ -57,4 +57,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.all;
};
}
})

View File

@ -8,14 +8,14 @@
, removeReferencesTo
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "volk";
version = "3.0.0";
src = fetchFromGitHub {
owner = "gnuradio";
repo = pname;
rev = "v${version}";
repo = "volk";
rev = "v${finalAttrs.version}";
hash = "sha256-kI4IuO6TLplo5lLAGIPWQWtePcjIEWB9XaJDA6WlqSg=";
fetchSubmodules = true;
};
@ -55,4 +55,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.all;
};
}
})

View File

@ -2,14 +2,13 @@
buildDunePackage rec {
pname = "lustre-v6";
version = "6.107.3";
version = "6.107.4";
minimalOCamlVersion = "4.12";
duneVersion = "3";
src = fetchurl {
url = "https://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/lustre-v6.v${version}.tgz";
hash = "sha256-z3cljDyxtotCGUIdYEzYu7fQd04RC3hhWpROcMh6Zng=";
hash = "sha256-baT5ZJtg5oFoJ5eHb3ISsmY6G31UG10KlNXC+ta+M1c=";
};
propagatedBuildInputs = [

View File

@ -0,0 +1,64 @@
From d734d03862d7dcc776bd2fa3ba662cdd5879b32e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 12 Jul 2023 17:55:27 +0200
Subject: [PATCH] Adapt to perl 5.37.1
Perl 5.37.1 removed a deprecated sv_nv() macro and SDL fails to build
with Perl 5.38.0:
lib/SDLx/Controller/Interface.xs:60:26: error: implicit declaration of function 'sv_nv'
60 | out->dv_x = sv_nv(temp);
| ^~~~~
Users are advised to use SvNVx() macro instead. SvNVx() seems to have been
available all the time (it predates a commit from 1993-10-07).
This patch does that.
https://github.com/PerlGameDev/SDL/issues/303
---
src/SDLx/Controller/Interface.xs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/SDLx/Controller/Interface.xs b/src/SDLx/Controller/Interface.xs
index 3dc202b7..d326c885 100644
--- a/src/SDLx/Controller/Interface.xs
+++ b/src/SDLx/Controller/Interface.xs
@@ -57,15 +57,15 @@ void evaluate(SDLx_Interface *obj, SDLx_Derivative *out, SDLx_State *initial, fl
SV *temp;
temp = av_pop(accel);
- out->dv_x = sv_nv(temp);
+ out->dv_x = SvNVx(temp);
SvREFCNT_dec(temp);
temp = av_pop(accel);
- out->dv_y = sv_nv(temp);
+ out->dv_y = SvNVx(temp);
SvREFCNT_dec(temp);
temp = av_pop(accel);
- out->dang_v = sv_nv(temp);
+ out->dang_v = SvNVx(temp);
SvREFCNT_dec(temp);
SvREFCNT_dec((SV *)accel);
@@ -90,15 +90,15 @@ void evaluate_dt(SDLx_Interface *obj, SDLx_Derivative *out, SDLx_State *initial,
SV *temp;
temp = av_pop(accel);
- out->dv_x = sv_nv(temp);
+ out->dv_x = SvNVx(temp);
SvREFCNT_dec(temp);
temp = av_pop(accel);
- out->dv_y = sv_nv(temp);
+ out->dv_y = SvNVx(temp);
SvREFCNT_dec(temp);
temp = av_pop(accel);
- out->dang_v = sv_nv(temp);
+ out->dang_v = SvNVx(temp);
SvREFCNT_dec(temp);
SvREFCNT_dec((SV *)accel);

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "adafruit-platformdetect";
version = "3.52.1";
version = "3.52.3";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -15,7 +15,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "Adafruit-PlatformDetect";
inherit version;
hash = "sha256-iAz+cGFUZWJIHNEzQyGjJkwVj9GOK8onHTO8t3bs13g=";
hash = "sha256-5JEnsTvY4PgAuaoIyTHriJVJUPAHMYETgqbhAuAPJcI=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, attrs
, boto3
, cryptography
, setuptools
, wrapt
, mock
, pytest
, pytest-mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "aws-encryption-sdk";
version = "3.1.1";
src = fetchPypi {
inherit pname version;
hash = "sha256-jV+/AY/GjWscrL5N0Df9gFKWx3Nqn+RX62hNBT9/lWM=";
};
propagatedBuildInputs = [
attrs
boto3
cryptography
setuptools
wrapt
];
doCheck = true;
nativeCheckInputs = [
mock
pytest
pytest-mock
pytestCheckHook
];
disabledTestPaths = [
# requires networking
"examples"
"test/integration"
];
meta = with lib; {
homepage = "https://aws-encryption-sdk-python.readthedocs.io/";
changelog = "https://github.com/aws/aws-encryption-sdk-python/blob/v${version}/CHANGELOG.rst";
description = "Fully compliant, native Python implementation of the AWS Encryption SDK.";
license = licenses.apsl20;
maintainers = with maintainers; [ anthonyroussel ];
};
}

View File

@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "base64io";
version = "1.0.3";
src = fetchPypi {
inherit pname version;
hash = "sha256-JPLQ/nZcNTOeGy0zqpX5E3sbdltZQWT60QFsFYJ6cHM=";
};
nativeCheckInputs = [
mock
pytestCheckHook
];
meta = with lib; {
homepage = "https://base64io-python.readthedocs.io/";
changelog = "https://github.com/aws/base64io-python/blob/${version}/CHANGELOG.rst";
description = "Python stream implementation for base64 encoding/decoding";
license = licenses.apsl20;
maintainers = with maintainers; [ anthonyroussel ];
};
}

View File

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "botocore-stubs";
version = "1.31.50";
version = "1.31.52";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -17,7 +17,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "botocore_stubs";
inherit version;
hash = "sha256-sLqNn6YnyOBse3bFyRzQseUpBCgF2rhsprR2dBYiUds=";
hash = "sha256-L6m3jHozWpTZGAeXc9wxmHht50FYYYfYR6hxC5wzcAk=";
};
nativeBuildInputs = [

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "certipy-ad";
version = "4.8.0";
version = "4.8.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "ly4k";
repo = "Certipy";
rev = "refs/tags/${version}";
hash = "sha256-CyTwaCYhxUqvycZBKSzTWLKmKvebCNyE4vqTUnaX1V0=";
hash = "sha256-HgRUpltkai68tDkanXIOEdrJ4DJYDcbNk0op0enUAXU=";
};
postPatch = ''

View File

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "dbus-fast";
version = "2.7.0";
version = "2.9.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-o75N/msocSYBe3tTLYGJbqMnbiQb/t3nfJIDDr6kPxM=";
hash = "sha256-0+uWnm0gygDL4sc2b+3dekgZfgAQZKfmJRMSDgyeMjk=";
};
# The project can build both an optimized cython version and an unoptimized

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "dvc-data";
version = "2.16.1";
version = "2.16.3";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "iterative";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-hnKOSo/RUzGnj7JbdKOGogVN925LZQiL3uvy5+dQfPw=";
hash = "sha256-cuUxVDc//O0FjPyBgXh8gBkCHSqfHELtTLT4VAu4HSA=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "google-cloud-language";
version = "2.11.0";
version = "2.11.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-ldI19QPZBOiFQRfpKO82rJMMJIJfy4QAw/NoqQj9vhQ=";
hash = "sha256-XxhECfBAwMcwV8JhbmvS6G5FrrZGGA0ZwYnfSqPQLbo=";
};
propagatedBuildInputs = [

View File

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "google-cloud-redis";
version = "2.13.1";
version = "2.13.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-UtT1z5zMzc7+Xhqcx5u77IS8GC8KaNOpYstZ8BlrFGc=";
hash = "sha256-XEhXMDVdlnI9ZK5jfxsiZPNbV8MB7A7yxtMLLwbcoU4=";
};
propagatedBuildInputs = [

View File

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "google-cloud-resource-manager";
version = "1.10.3";
version = "1.10.4";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-+A786jbxDFqBiJr+k5EJJuOXi0sc7rgvVjovyGMHLRQ=";
hash = "sha256-RWsl3do9TNJ0iKcnNrvDrwTXE64v42VcAbZqM50o1nk=";
};
propagatedBuildInputs = [

View File

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "google-cloud-secret-manager";
version = "2.16.3";
version = "2.16.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-bKtcvxkno0xYbkr5BDfuo9RP9LQbmoLshvz/CaWsJuo=";
hash = "sha256-Nx3HL5FFrzI+ioE8jlA4DmrEvWpdvNQtzzFi2PN+UIA=";
};
propagatedBuildInputs = [

View File

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "google-cloud-videointelligence";
version = "2.11.3";
version = "2.11.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-qWpj8ATCcGj0WyJ6ZidfimqMPs0Gu1gfkvppiX1bF5c=";
hash = "sha256-B6zimaY/Wz1EQTdWNIU7Vc6PkMYsaiT4pH6wVBSfb5k=";
};
propagatedBuildInputs = [

View File

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "google-cloud-websecurityscanner";
version = "1.12.2";
version = "1.12.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-C2WQmyQjoe2t6RZ8HtnNkzN3V8FuYQwgtlhCOwaHNt8=";
hash = "sha256-zu4e4MTpc24p5ZWeRfVQwX0brciaz80FDGbxy6UppEA=";
};
propagatedBuildInputs = [

View File

@ -16,16 +16,16 @@
buildPythonPackage rec {
pname = "ismartgate";
version = "5.0.0";
version = "5.0.1";
format = "setuptools";
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bdraco";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-o2yzMxrF0WB6MbeL1Tuf0Sq4wS4FDIWZZx1x2rvwLmY=";
hash = "sha256-mfiHoli0ldw/E1SrtOBpDO8ZTC0wTeaoSZ2nPnx5EaQ=";
};
postPatch = ''

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "json-schema-for-humans";
version = "0.45.1";
version = "0.45.2";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "coveooss";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-9dX9+YwJdJpgU3cZkxk7+CgdRFgcVhrvU0amO8zHZhs=";
hash = "sha256-DmUQ06UabLcB67PyfRC/gmSkEY/V8kuZ/T/ZW1D11vA=";
};
nativeBuildInputs = [

View File

@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "meshtastic";
version = "2.2.5";
version = "2.2.6";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "meshtastic";
repo = "Meshtastic-python";
rev = "refs/tags/${version}";
hash = "sha256-qRSJN1tWMECQU/jbC2UzhEZAVQwvm7hTIr3cqvFO4TM=";
hash = "sha256-JnheGeiLJMI0zsb+jiuMxjXg/3rDbMyA2XVtl1ujiso=";
};
propagatedBuildInputs = [

View File

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "mypy-boto3-s3";
version = "1.28.36";
version = "1.28.52";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-RNo3X9TXWxxczCbc075IKUxwYURe/W2Q6/ykP/67s+Q=";
hash = "sha256-F5y3VCzF72VvEyOtUesjevy6d9Hl7QfSGgE/427/uLI=";
};
nativeBuildInputs = [

View File

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "pyngrok";
version = "6.1.2";
version = "7.0.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-9fT2fnntBQ7y+c52tuqHM7iVAqoLgwAs6izmuZRUNiI=";
hash = "sha256-YOE9t/W4LsZqBFMbJRbyB6oQqrqW02iecqQYR6yZfV8=";
};
propagatedBuildInputs = [

View File

@ -24,7 +24,7 @@
buildPythonPackage rec {
pname = "python-benedict";
version = "0.32.0";
version = "0.32.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -33,7 +33,7 @@ buildPythonPackage rec {
owner = "fabiocaccamo";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-4fBV7sInw/jrKt7CmG7riMTmpLyrsyvWZGRY6s3YbHw=";
hash = "sha256-q9EIOMmUcttL1ohxQD+SkZTxKv8PwdN29+ez2xB7rvM=";
};
nativeBuildInputs = [

View File

@ -8,14 +8,14 @@ assert !useUnrar -> libarchive != null;
buildPythonPackage rec {
pname = "rarfile";
version = "4.0";
version = "4.1";
disabled = isPy27;
src = fetchFromGitHub {
owner = "markokr";
repo = "rarfile";
rev = "v${version}";
sha256 = "0gpriqkvcb6bsccvq8b099xjv5fkjs0d7g4636d5jphy417jxk5m";
sha256 = "sha256-9PT4/KgkdFhTjZIia2xiSM5VnaZ4040Ww7bG9Nr3XDU=";
};
nativeCheckInputs = [ pytestCheckHook nose glibcLocales ];

View File

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "s3fs";
version = "2023.9.0";
version = "2023.9.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-NQV9TVlyLKuf6RyaMBR+Plvd/FXsFP3od2xRIXnII90=";
hash = "sha256-QuGCHtlMFgfISIU9HXFevNJcEzgLb1EMLLSYx+Wz5nQ=";
};
postPatch = ''

View File

@ -0,0 +1,25 @@
From 02266a00ce0eb6a089e7efe07816da1aa5152fc9 Mon Sep 17 00:00:00 2001
From: Maksim Terpilovskii <maximtrp@gmail.com>
Date: Sun, 31 Jul 2022 12:25:14 +0300
Subject: [PATCH] increased abs tolerance for wilcoxon test
---
tests/test_posthocs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_posthocs.py b/tests/test_posthocs.py
index 956d808..8cc65e4 100644
--- a/tests/test_posthocs.py
+++ b/tests/test_posthocs.py
@@ -471,7 +471,7 @@ class TestPosthocs(unittest.TestCase):
[2.857818e-06, 1.230888e-05, 1]])
results = sp.posthoc_wilcoxon(self.df.sort_index(), val_col = 'pulse', group_col = 'kind')
- self.assertTrue(np.allclose(results, r_results))
+ self.assertTrue(np.allclose(results, r_results, atol=1e-4))
def test_posthoc_scheffe(self):
--
2.36.1

View File

@ -0,0 +1,34 @@
From 5416ffba3ab01aebab3909400b5a9e847022898e Mon Sep 17 00:00:00 2001
From: Maksim Terpilovskii <maximtrp@gmail.com>
Date: Thu, 16 Mar 2023 00:20:02 +0300
Subject: [PATCH] Update test_posthocs.py
---
tests/test_posthocs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_posthocs.py b/tests/test_posthocs.py
index 8cc65e4..42ca5f3 100644
--- a/tests/test_posthocs.py
+++ b/tests/test_posthocs.py
@@ -71,7 +71,7 @@ class TestPosthocs(unittest.TestCase):
a = splt.sign_plot(x, flat=True, labels=False)
with self.assertRaises(ValueError):
splt.sign_plot(x.astype(float), flat=True, labels=False)
- self.assertTrue(isinstance(a, ma._subplots.Axes))
+ self.assertTrue(isinstance(a, ma._axes.Axes))
def test_sign_plot_nonflat(self):
@@ -85,7 +85,7 @@ class TestPosthocs(unittest.TestCase):
with self.assertRaises(ValueError):
splt.sign_plot(x.astype(np.int64), labels=False)
- self.assertTrue(isinstance(a, ma._subplots.Axes) and isinstance(cbar, mpl.colorbar.ColorbarBase))
+ self.assertTrue(isinstance(a, ma._axes.Axes) and isinstance(cbar, mpl.colorbar.ColorbarBase))
# Outliers tests
def test_outliers_iqr(self):
--
2.36.1

View File

@ -0,0 +1,65 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, matplotlib
, numpy
, pandas
, scipy
, seaborn
, statsmodels
, pytestCheckHook
, seaborn-data
}:
buildPythonPackage rec {
pname = "scikit-posthocs";
version = "0.7.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "maximtrp";
repo = "scikit-posthocs";
rev = "v${version}";
hash = "sha256-IkvAc684AWEK427OGAa4qVy6leWmd3b8Dnhd5bYAt5I=";
};
patches = [
# Fixed on master: https://github.com/maximtrp/scikit-posthocs/commit/02266a00ce0eb6a089e7efe07816da1aa5152fc9
./0001-increased-abs-tolerance-for-wilcoxon-test.patch
# Fixed on master: https://github.com/maximtrp/scikit-posthocs/commit/5416ffba3ab01aebab3909400b5a9e847022898e
./0002-Update-test_posthocs.py.patch
];
nativeBuildInputs = [
setuptools
wheel
];
propagatedBuildInputs = [
matplotlib
numpy
pandas
scipy
seaborn
statsmodels
];
preCheck = ''
# tests require to write to home directory
export SEABORN_DATA=${seaborn-data.exercise}
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "scikit_posthocs" ];
meta = with lib; {
description = "Multiple Pairwise Comparisons (Post Hoc) Tests in Python";
homepage = "https://github.com/maximtrp/scikit-posthocs";
changelog = "https://github.com/maximtrp/scikit-posthocs/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ mbalatsko ];
};
}

View File

@ -109,6 +109,8 @@ buildPythonPackage rec {
"test_peek_one_element"
"test_peek_lifo"
"test_callback_kwargs"
# Test fails on Hydra
"test_start_requests_laziness"
] ++ lib.optionals stdenv.isDarwin [
"test_xmliter_encoding"
"test_download"

View File

@ -21,7 +21,7 @@
buildPythonPackage rec {
pname = "slackclient";
version = "3.21.3";
version = "3.22.0";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -30,7 +30,7 @@ buildPythonPackage rec {
owner = "slackapi";
repo = "python-slack-sdk";
rev = "refs/tags/v${version}";
hash = "sha256-begpT/DaDqOi8HZE10FCuIIv18KSU/i5G/Z5DXKUT7Y=";
hash = "sha256-PRJgOAC1IJjQb1c4FAbpV8bxOPL9PTbAxNXo2MABRzc=";
};
propagatedBuildInputs = [

View File

@ -15,14 +15,14 @@
buildPythonPackage rec {
pname = "tldextract";
version = "3.5.0";
version = "3.6.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-TfHGW5W+YdWUKOhhHpVeVObx1Eg9Po1XM9OpBiFV6RA=";
hash = "sha256-pdi2WDeR2sominWS6892QVL6SWF5g8SZFu6d6Zs2YiI=";
};
nativeBuildInputs = [

View File

@ -20,7 +20,7 @@ let
in
buildPythonPackage rec {
pname = "yaramod";
version = "3.20.1";
version = "3.20.2";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ in
owner = "avast";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-je4BBJ34VcA8pkvIBXfqrHAhWF+DdakSqeFma3mHpWo=";
hash = "sha256-OLsTvG+qaUJlKdHwswGBifzoT/uNunrrVWQg7hJxkhE=";
};
postPatch = ''

View File

@ -22,14 +22,14 @@ with py.pkgs;
buildPythonApplication rec {
pname = "checkov";
version = "2.4.42";
version = "2.4.47";
format = "setuptools";
src = fetchFromGitHub {
owner = "bridgecrewio";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-5G7ErzWxyQ17rn5k+3BpLhrGmU6YSBZ6BEK9y0cpki4=";
hash = "sha256-v4epPGUII2xu5e8yM4dCmEmu0ShmOIPd3h+UsFzdt6Q=";
};
patches = [

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, appimageTools, pkgs }:
{ lib, fetchurl, appimageTools, pkgs, makeWrapper }:
let
pname = "beekeeper-studio";
@ -23,11 +23,15 @@ appimageTools.wrapType2 {
extraInstallCommands = ''
ln -s $out/bin/${name} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {

View File

@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, ocamlPackages }:
with ocamlPackages;
buildDunePackage rec {
pname = "opam-publish";
version = "2.2.0";
src = fetchFromGitHub {
owner = "ocaml-opam";
repo = pname;
rev = version;
sha256 = "sha256-FNAWok5tjTOwwpNZ0Xcu9E/R8iXStZqCk/Vqdf9l+zs=";
};
duneVersion = "3";
buildInputs = [
cmdliner
lwt_ssl
opam-core
opam-format
opam-state
github
github-unix
];
meta = with lib; {
homepage = "https://github.com/ocaml-opam/${pname}";
description = "A tool to ease contributions to opam repositories";
license = with licenses; [ lgpl21Only ocamlLgplLinkingException ];
maintainers = with maintainers; [ niols ];
};
}

View File

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-nextest";
version = "0.9.57";
version = "0.9.58";
src = fetchFromGitHub {
owner = "nextest-rs";
repo = "nextest";
rev = "cargo-nextest-${version}";
hash = "sha256-vtKe0cl9PxZgc1zUJQI1YCQm4cRHmzqlBEC4RGUxM44=";
hash = "sha256-D3mSDh6IliKbtxitMRXy1L4YH/qZfdXtXiPvf45mTno=";
};
cargoHash = "sha256-o7nuDoBpSst84jyAVfrE8pLoYcKMF922r39G+gruBUo=";
cargoHash = "sha256-TjQHSaBVM4pJoTp6Vdz6WGWIyw5uC6UG7Wle6LsXP+4=";
buildInputs = lib.optionals stdenv.isDarwin [ Security ];

View File

@ -41,6 +41,7 @@
, version
, meta
, copyDesktopItems
, makeWrapper
}:
let
@ -129,6 +130,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
ln -s $out/share/postman/postman $out/bin/postman
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
mkdir -p $out/share/icons/hicolor/128x128/apps
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/postman.png
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/hicolor/128x128/apps/postman.png

View File

@ -8,7 +8,9 @@
, makeWrapper
, requireFile
, substituteAll
, nixosTests
}:
let
arch =
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
@ -20,22 +22,22 @@ let
in
stdenv.mkDerivation rec {
pname = "displaylink";
version = "5.7.0-61.129";
version = "5.8.0-63.33";
src = requireFile rec {
name = "displaylink-570.zip";
sha256 = "807f1c203ac1e71c6f1f826493b9bb32e277f07cb2cf48537bf8cfdc68dd1515";
name = "displaylink-580.zip";
sha256 = "05m8vm6i9pc9pmvar021lw3ls60inlmq92nling0vj28skm55i92";
message = ''
In order to install the DisplayLink drivers, you must first
comply with DisplayLink's EULA and download the binaries and
sources from here:
https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.7
https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.8
Once you have downloaded the file, please use the following
commands and re-run the installation:
mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu5.7-EXE.zip" \$PWD/${name}
mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu5.8-EXE.zip" \$PWD/${name}
nix-prefetch-url file://\$PWD/${name}
'';
};
@ -67,6 +69,12 @@ stdenv.mkDerivation rec {
dontStrip = true;
dontPatchELF = true;
passthru = {
tests = {
inherit (nixosTests) displaylink;
};
};
meta = with lib; {
description = "DisplayLink DL-5xxx, DL-41xx and DL-3x00 Driver for Linux";
homepage = "https://www.displaylink.com/";
@ -74,5 +82,6 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ abbradar ];
platforms = [ "x86_64-linux" "i686-linux" ];
hydraPlatforms = [];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}

View File

@ -1,31 +0,0 @@
diff --git a/module/Makefile b/module/Makefile
index fe573de..c8022c8 100644
--- a/module/Makefile
+++ b/module/Makefile
@@ -50,7 +50,7 @@ ifneq ($(KERNELRELEASE),)
# inside kbuild
# Note: this can be removed once it is in kernel tree and Kconfig is properly used
CONFIG_DRM_EVDI := m
-ccflags-y := -isystem include/uapi/drm include/drm $(CFLAGS) $(EL8FLAG) $(EL9FLAG) $(RPIFLAG)
+ccflags-y := -isystem include/uapi/drm $(CFLAGS) $(EL8FLAG) $(EL9FLAG) $(RPIFLAG)
evdi-y := evdi_platform_drv.o evdi_platform_dev.o evdi_sysfs.o evdi_modeset.o evdi_connector.o evdi_encoder.o evdi_drm_drv.o evdi_fb.o evdi_gem.o evdi_painter.o evdi_params.o evdi_cursor.o evdi_debug.o evdi_i2c.o
evdi-$(CONFIG_COMPAT) += evdi_ioc32.o
obj-$(CONFIG_DRM_EVDI) := evdi.o
diff --git a/module/evdi_drm.h b/module/evdi_drm.h
index 29b8427..5012693 100644
--- a/module/evdi_drm.h
+++ b/module/evdi_drm.h
@@ -12,12 +12,11 @@
#ifdef __KERNEL__
#include <linux/types.h>
+#include <drm/drm.h>
#else
#include <stdint.h>
#endif
-#include "drm.h"
-
/* Output events sent from driver to evdi lib */
#define DRM_EVDI_EVENT_UPDATE_READY 0x80000000
#define DRM_EVDI_EVENT_DPMS 0x80000001

View File

@ -1,4 +1,5 @@
{ lib, stdenv, fetchFromGitHub, kernel, libdrm, python3 }:
let
python3WithLibs = python3.withPackages (ps: with ps; [
pybind11
@ -6,13 +7,13 @@ let
in
stdenv.mkDerivation rec {
pname = "evdi";
version = "1.13.1";
version = "1.14.1";
src = fetchFromGitHub {
owner = "DisplayLink";
repo = pname;
rev = "v${version}";
hash = "sha256-Or4hhnFOtC8vmB4kFUHbFHn2wg/NsUMY3d2Tiea6YbY=";
hash = "sha256-em3Y56saB7K3Wr31Y0boc38xGb57gdveN0Cstgy8y20=";
};
env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare";
@ -35,11 +36,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [
./0000-fix-drm-path.patch
];
meta = with lib; {
changelog = "https://github.com/DisplayLink/evdi/releases/tag/v${version}";
description = "Extensible Virtual Display Interface";
maintainers = with maintainers; [ ];
platforms = platforms.linux;

View File

@ -4,16 +4,16 @@ let
# comments with variant added for update script
# ./update-zen.py zen
zenVariant = {
version = "6.5.3"; #zen
version = "6.5.4"; #zen
suffix = "zen1"; #zen
sha256 = "0jc50cb30dzysqdhm91ykcg5xhy062dc69gwak6q33bn56n7dw3m"; #zen
sha256 = "1s0a2706xk60k9w6dr3zx2ma8bsny1dkvv0fmsk3kd8ghyg3xswh"; #zen
isLqx = false;
};
# ./update-zen.py lqx
lqxVariant = {
version = "6.4.15"; #lqx
suffix = "lqx1"; #lqx
sha256 = "1xhm73z074niz1dd0w24q5lxlpma6xraqil5kzp3j4qsyr5wg8hz"; #lqx
version = "6.5.4"; #lqx
suffix = "lqx2"; #lqx
sha256 = "0zz7jn2fic7llppv4ih91jfz0k0q6c04xsyqljhiw6279dsv8h7c"; #lqx
isLqx = true;
};
zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {

View File

@ -15,7 +15,7 @@ let
rev = version;
sha256 = "sha256-VxAaPhaPXd9xYt663Ju6SLblqiSLizauhhuFqCqbO5M=";
}
}: stdenv.mkDerivation rec {
}: stdenv.mkDerivation (finalAttrs: {
pname = "wiringpi-${subprj}";
inherit version src;
sourceRoot = "${src.name}/${subprj}";
@ -31,7 +31,7 @@ let
# On NixOS we don't need to run ldconfig during build:
"LDCONFIG=echo"
];
};
});
passthru = {
inherit mkSubProject;
wiringPi = mkSubProject {

View File

@ -13,16 +13,16 @@
buildNpmPackage rec {
pname = "homepage-dashboard";
version = "0.6.29";
version = "0.6.35";
src = fetchFromGitHub {
owner = "benphelps";
repo = "homepage";
rev = "v${version}";
hash = "sha256-v2DpF96prpavvhf5Qq2//sskJVNMgGTWltRi/+85KDM=";
hash = "sha256-+mn90kN/YyjVnVjuvVNpsXsDYVCRmke5Rz0hmQ54VjA=";
};
npmDepsHash = "sha256-3sjMWQ40FqdTfx1QkMoIwpIGWRQKPOqOKfPVDWzjz3w=";
npmDepsHash = "sha256-vzht2nmyUxIphvrgBHzELh97k1Q1XzmAXfiVCDEnRNU=";
preBuild = ''
mkdir -p config

View File

@ -8,11 +8,11 @@
buildGoModule rec {
pname = "honk";
version = "1.0.0";
version = "1.1.1";
src = fetchurl {
url = "https://humungus.tedunangst.com/r/honk/d/honk-${version}.tgz";
hash = "sha256-+0W9HncN+51dRE9bWJU4cAfYOc5bxNAqPe4xY+4UFg0=";
hash = "sha256-kfoSVGm1QKVjDiWvjK4QzAoA/iiU9j6DS3SYFSM+AaA=";
};
vendorHash = null;

View File

@ -22,7 +22,7 @@
}:
let
version = "0.84.0";
version = "0.85.0";
in
rustPlatform.buildRustPackage {
@ -33,10 +33,10 @@ rustPlatform.buildRustPackage {
owner = "nushell";
repo = "nushell";
rev = version;
hash = "sha256-vXtQUWKRPS53IBUgO9Dw8dVzfD5W2kHSPOZHs293O5Q=";
hash = "sha256-/c3JTgIT+T41D0S7irQ0jq2MDzmx3os4pYpVr10cL3E=";
};
cargoHash = "sha256-NtTCuTWbGTrGKF7ulm3Bfal/WuBtPEX7QvHoOyKY1V8=";
cargoHash = "sha256-lBipwX72j0Af3PCat18s9NIjJiKZFZTcU9Utwt+eQzI=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ]

View File

@ -11,8 +11,8 @@ stdenvNoCC.mkDerivation rec {
src = fetchFromGitHub {
owner = "nushell";
repo = pname;
rev = "45c051dad0e243a63608c8274b7fddd5f0b74941";
hash = "sha256-kpE+vgobYsQuh8sS3gK/yg68nQykquwteeuecjLtIrE=";
rev = "36a45f28a39ee1526a748b53f438a41ae939fc7c";
hash = "sha256-QhERyWomyOOk9aYRjm69ykzOR3G/uGM/A4Pr9PlB71w=";
};
installPhase = ''

Some files were not shown because too many files have changed in this diff Show More