Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
K900 2024-05-21 10:37:32 +03:00
commit 0c60d39834
19 changed files with 1784 additions and 782 deletions

View File

@ -1,16 +1,17 @@
/* Collection of functions useful for debugging /**
broken nix expressions. Collection of functions useful for debugging
broken nix expressions.
* `trace`-like functions take two values, print * `trace`-like functions take two values, print
the first to stderr and return the second. the first to stderr and return the second.
* `traceVal`-like functions take one argument * `traceVal`-like functions take one argument
which both printed and returned. which both printed and returned.
* `traceSeq`-like functions fully evaluate their * `traceSeq`-like functions fully evaluate their
traced value before printing (not just to weak traced value before printing (not just to weak
head normal form like trace does by default). head normal form like trace does by default).
* Functions that end in `-Fn` take an additional * Functions that end in `-Fn` take an additional
function as their first argument, which is applied function as their first argument, which is applied
to the traced value before it is printed. to the traced value before it is printed.
*/ */
{ lib }: { lib }:
let let
@ -32,79 +33,190 @@ rec {
# -- TRACING -- # -- TRACING --
/* Conditionally trace the supplied message, based on a predicate. /**
Conditionally trace the supplied message, based on a predicate.
Type: traceIf :: bool -> string -> a -> a
Example: # Inputs
traceIf true "hello" 3
trace: hello `pred`
=> 3
: Predicate to check
`msg`
: Message that should be traced
`x`
: Value to return
# Type
```
traceIf :: bool -> string -> a -> a
```
# Examples
:::{.example}
## `lib.debug.traceIf` usage example
```nix
traceIf true "hello" 3
trace: hello
=> 3
```
:::
*/ */
traceIf = traceIf =
# Predicate to check
pred: pred:
# Message that should be traced
msg: msg:
# Value to return
x: if pred then trace msg x else x; x: if pred then trace msg x else x;
/* Trace the supplied value after applying a function to it, and /**
return the original value. Trace the supplied value after applying a function to it, and
return the original value.
Type: traceValFn :: (a -> b) -> a -> a
Example: # Inputs
traceValFn (v: "mystring ${v}") "foo"
trace: mystring foo `f`
=> "foo"
: Function to apply
`x`
: Value to trace and return
# Type
```
traceValFn :: (a -> b) -> a -> a
```
# Examples
:::{.example}
## `lib.debug.traceValFn` usage example
```nix
traceValFn (v: "mystring ${v}") "foo"
trace: mystring foo
=> "foo"
```
:::
*/ */
traceValFn = traceValFn =
# Function to apply
f: f:
# Value to trace and return
x: trace (f x) x; x: trace (f x) x;
/* Trace the supplied value and return it. /**
Trace the supplied value and return it.
Type: traceVal :: a -> a # Inputs
Example: `x`
traceVal 42
# trace: 42 : Value to trace and return
=> 42
# Type
```
traceVal :: a -> a
```
# Examples
:::{.example}
## `lib.debug.traceVal` usage example
```nix
traceVal 42
# trace: 42
=> 42
```
:::
*/ */
traceVal = traceValFn id; traceVal = traceValFn id;
/* `builtins.trace`, but the value is `builtins.deepSeq`ed first. /**
`builtins.trace`, but the value is `builtins.deepSeq`ed first.
Type: traceSeq :: a -> b -> b
Example: # Inputs
trace { a.b.c = 3; } null
trace: { a = <CODE>; } `x`
=> null
traceSeq { a.b.c = 3; } null : The value to trace
trace: { a = { b = { c = 3; }; }; }
=> null `y`
: The value to return
# Type
```
traceSeq :: a -> b -> b
```
# Examples
:::{.example}
## `lib.debug.traceSeq` usage example
```nix
trace { a.b.c = 3; } null
trace: { a = <CODE>; }
=> null
traceSeq { a.b.c = 3; } null
trace: { a = { b = { c = 3; }; }; }
=> null
```
:::
*/ */
traceSeq = traceSeq =
# The value to trace
x: x:
# The value to return
y: trace (builtins.deepSeq x x) y; y: trace (builtins.deepSeq x x) y;
/* Like `traceSeq`, but only evaluate down to depth n. /**
This is very useful because lots of `traceSeq` usages Like `traceSeq`, but only evaluate down to depth n.
lead to an infinite recursion. This is very useful because lots of `traceSeq` usages
lead to an infinite recursion.
Example:
traceSeqN 2 { a.b.c = 3; } null
trace: { a = { b = {}; }; }
=> null
Type: traceSeqN :: Int -> a -> b -> b # Inputs
*/
`depth`
: 1\. Function argument
`x`
: 2\. Function argument
`y`
: 3\. Function argument
# Type
```
traceSeqN :: Int -> a -> b -> b
```
# Examples
:::{.example}
## `lib.debug.traceSeqN` usage example
```nix
traceSeqN 2 { a.b.c = 3; } null
trace: { a = { b = {}; }; }
=> null
```
:::
*/
traceSeqN = depth: x: y: traceSeqN = depth: x: y:
let snip = v: if isList v then noQuotes "[]" v let snip = v: if isList v then noQuotes "[]" v
else if isAttrs v then noQuotes "{}" v else if isAttrs v then noQuotes "{}" v
@ -118,41 +230,115 @@ rec {
in trace (generators.toPretty { allowPrettyValues = true; } in trace (generators.toPretty { allowPrettyValues = true; }
(modify depth snip x)) y; (modify depth snip x)) y;
/* A combination of `traceVal` and `traceSeq` that applies a /**
provided function to the value to be traced after `deepSeq`ing A combination of `traceVal` and `traceSeq` that applies a
it. provided function to the value to be traced after `deepSeq`ing
it.
# Inputs
`f`
: Function to apply
`v`
: Value to trace
*/ */
traceValSeqFn = traceValSeqFn =
# Function to apply
f: f:
# Value to trace
v: traceValFn f (builtins.deepSeq v v); v: traceValFn f (builtins.deepSeq v v);
/* A combination of `traceVal` and `traceSeq`. */ /**
A combination of `traceVal` and `traceSeq`.
# Inputs
`v`
: Value to trace
*/
traceValSeq = traceValSeqFn id; traceValSeq = traceValSeqFn id;
/* A combination of `traceVal` and `traceSeqN` that applies a /**
provided function to the value to be traced. */ A combination of `traceVal` and `traceSeqN` that applies a
provided function to the value to be traced.
# Inputs
`f`
: Function to apply
`depth`
: 2\. Function argument
`v`
: Value to trace
*/
traceValSeqNFn = traceValSeqNFn =
# Function to apply
f: f:
depth: depth:
# Value to trace
v: traceSeqN depth (f v) v; v: traceSeqN depth (f v) v;
/* A combination of `traceVal` and `traceSeqN`. */ /**
A combination of `traceVal` and `traceSeqN`.
# Inputs
`depth`
: 1\. Function argument
`v`
: Value to trace
*/
traceValSeqN = traceValSeqNFn id; traceValSeqN = traceValSeqNFn id;
/* Trace the input and output of a function `f` named `name`, /**
both down to `depth`. Trace the input and output of a function `f` named `name`,
both down to `depth`.
This is useful for adding around a function call, This is useful for adding around a function call,
to see the before/after of values as they are transformed. to see the before/after of values as they are transformed.
Example:
traceFnSeqN 2 "id" (x: x) { a.b.c = 3; } # Inputs
trace: { fn = "id"; from = { a.b = {}; }; to = { a.b = {}; }; }
=> { a.b.c = 3; } `depth`
: 1\. Function argument
`name`
: 2\. Function argument
`f`
: 3\. Function argument
`v`
: 4\. Function argument
# Examples
:::{.example}
## `lib.debug.traceFnSeqN` usage example
```nix
traceFnSeqN 2 "id" (x: x) { a.b.c = 3; }
trace: { fn = "id"; from = { a.b = {}; }; to = { a.b = {}; }; }
=> { a.b.c = 3; }
```
:::
*/ */
traceFnSeqN = depth: name: f: v: traceFnSeqN = depth: name: f: v:
let res = f v; let res = f v;
@ -168,66 +354,82 @@ rec {
# -- TESTING -- # -- TESTING --
/* Evaluates a set of tests. /**
Evaluates a set of tests.
A test is an attribute set `{expr, expected}`, A test is an attribute set `{expr, expected}`,
denoting an expression and its expected result. denoting an expression and its expected result.
The result is a `list` of __failed tests__, each represented as The result is a `list` of __failed tests__, each represented as
`{name, expected, result}`, `{name, expected, result}`,
- expected - expected
- What was passed as `expected` - What was passed as `expected`
- result - result
- The actual `result` of the test - The actual `result` of the test
Used for regression testing of the functions in lib; see Used for regression testing of the functions in lib; see
tests.nix for more examples. tests.nix for more examples.
Important: Only attributes that start with `test` are executed. Important: Only attributes that start with `test` are executed.
- If you want to run only a subset of the tests add the attribute `tests = ["testName"];` - If you want to run only a subset of the tests add the attribute `tests = ["testName"];`
Example:
runTests { # Inputs
testAndOk = {
expr = lib.and true false;
expected = false;
};
testAndFail = {
expr = lib.and true false;
expected = true;
};
}
->
[
{
name = "testAndFail";
expected = true;
result = false;
}
]
Type: `tests`
runTests :: {
tests = [ String ]; : Tests to run
${testName} :: {
expr :: a; # Type
expected :: a;
}; ```
runTests :: {
tests = [ String ];
${testName} :: {
expr :: a;
expected :: a;
};
}
->
[
{
name :: String;
expected :: a;
result :: a;
} }
-> ]
[ ```
{
name :: String; # Examples
expected :: a; :::{.example}
result :: a; ## `lib.debug.runTests` usage example
}
] ```nix
runTests {
testAndOk = {
expr = lib.and true false;
expected = false;
};
testAndFail = {
expr = lib.and true false;
expected = true;
};
}
->
[
{
name = "testAndFail";
expected = true;
result = false;
}
]
```
:::
*/ */
runTests = runTests =
# Tests to run
tests: concatLists (attrValues (mapAttrs (name: test: tests: concatLists (attrValues (mapAttrs (name: test:
let testsToRun = if tests ? tests then tests.tests else []; let testsToRun = if tests ? tests then tests.tests else [];
in if (substring 0 4 name == "test" || elem name testsToRun) in if (substring 0 4 name == "test" || elem name testsToRun)
@ -237,10 +439,26 @@ rec {
then [ { inherit name; expected = test.expected; result = test.expr; } ] then [ { inherit name; expected = test.expected; result = test.expr; } ]
else [] ) tests)); else [] ) tests));
/* Create a test assuming that list elements are `true`. /**
Create a test assuming that list elements are `true`.
Example:
{ testX = allTrue [ true ]; } # Inputs
`expr`
: 1\. Function argument
# Examples
:::{.example}
## `lib.debug.testAllTrue` usage example
```nix
{ testX = allTrue [ true ]; }
```
:::
*/ */
testAllTrue = expr: { inherit expr; expected = map (x: true) expr; }; testAllTrue = expr: { inherit expr; expected = map (x: true) expr; };
} }

View File

@ -1,4 +1,4 @@
/* /**
<!-- This anchor is here for backwards compatibility --> <!-- This anchor is here for backwards compatibility -->
[]{#sec-fileset} []{#sec-fileset}
@ -6,7 +6,7 @@
A file set is a (mathematical) set of local files that can be added to the Nix store for use in Nix derivations. A file set is a (mathematical) set of local files that can be added to the Nix store for use in Nix derivations.
File sets are easy and safe to use, providing obvious and composable semantics with good error messages to prevent mistakes. File sets are easy and safe to use, providing obvious and composable semantics with good error messages to prevent mistakes.
## Overview {#sec-fileset-overview} # Overview {#sec-fileset-overview}
Basics: Basics:
- [Implicit coercion from paths to file sets](#sec-fileset-path-coercion) - [Implicit coercion from paths to file sets](#sec-fileset-path-coercion)
@ -58,7 +58,7 @@
see [this issue](https://github.com/NixOS/nixpkgs/issues/266356) to request it. see [this issue](https://github.com/NixOS/nixpkgs/issues/266356) to request it.
## Implicit coercion from paths to file sets {#sec-fileset-path-coercion} # Implicit coercion from paths to file sets {#sec-fileset-path-coercion}
All functions accepting file sets as arguments can also accept [paths](https://nixos.org/manual/nix/stable/language/values.html#type-path) as arguments. All functions accepting file sets as arguments can also accept [paths](https://nixos.org/manual/nix/stable/language/values.html#type-path) as arguments.
Such path arguments are implicitly coerced to file sets containing all files under that path: Such path arguments are implicitly coerced to file sets containing all files under that path:
@ -78,7 +78,7 @@
This is in contrast to using [paths in string interpolation](https://nixos.org/manual/nix/stable/language/values.html#type-path), which does add the entire referenced path to the store. This is in contrast to using [paths in string interpolation](https://nixos.org/manual/nix/stable/language/values.html#type-path), which does add the entire referenced path to the store.
::: :::
### Example {#sec-fileset-path-coercion-example} ## Example {#sec-fileset-path-coercion-example}
Assume we are in a local directory with a file hierarchy like this: Assume we are in a local directory with a file hierarchy like this:
``` ```
@ -157,17 +157,34 @@ let
in { in {
/* /**
Create a file set from a path that may or may not exist: Create a file set from a path that may or may not exist:
- If the path does exist, the path is [coerced to a file set](#sec-fileset-path-coercion). - If the path does exist, the path is [coerced to a file set](#sec-fileset-path-coercion).
- If the path does not exist, a file set containing no files is returned. - If the path does not exist, a file set containing no files is returned.
Type:
maybeMissing :: Path -> FileSet
Example: # Inputs
# All files in the current directory, but excluding main.o if it exists
difference ./. (maybeMissing ./main.o) `path`
: 1\. Function argument
# Type
```
maybeMissing :: Path -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.maybeMissing` usage example
```nix
# All files in the current directory, but excluding main.o if it exists
difference ./. (maybeMissing ./main.o)
```
:::
*/ */
maybeMissing = maybeMissing =
path: path:
@ -183,7 +200,7 @@ in {
else else
_singleton path; _singleton path;
/* /**
Incrementally evaluate and trace a file set in a pretty way. Incrementally evaluate and trace a file set in a pretty way.
This function is only intended for debugging purposes. This function is only intended for debugging purposes.
The exact tracing format is unspecified and may change. The exact tracing format is unspecified and may change.
@ -194,27 +211,44 @@ in {
This variant is useful for tracing file sets in the Nix repl. This variant is useful for tracing file sets in the Nix repl.
Type:
trace :: FileSet -> Any -> Any
Example: # Inputs
trace (unions [ ./Makefile ./src ./tests/run.sh ]) null
=> `fileset`
trace: /home/user/src/myProject
trace: - Makefile (regular) : The file set to trace.
trace: - src (all files in directory)
trace: - tests This argument can also be a path,
trace: - run.sh (regular) which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
null
`val`
: The value to return.
# Type
```
trace :: FileSet -> Any -> Any
```
# Examples
:::{.example}
## `lib.fileset.trace` usage example
```nix
trace (unions [ ./Makefile ./src ./tests/run.sh ]) null
=>
trace: /home/user/src/myProject
trace: - Makefile (regular)
trace: - src (all files in directory)
trace: - tests
trace: - run.sh (regular)
null
```
:::
*/ */
trace = trace = fileset:
/*
The file set to trace.
This argument can also be a path,
which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
*/
fileset:
let let
# "fileset" would be a better name, but that would clash with the argument name, # "fileset" would be a better name, but that would clash with the argument name,
# and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76 # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76
@ -224,7 +258,7 @@ in {
(_printFileset actualFileset) (_printFileset actualFileset)
(x: x); (x: x);
/* /**
Incrementally evaluate and trace a file set in a pretty way. Incrementally evaluate and trace a file set in a pretty way.
This function is only intended for debugging purposes. This function is only intended for debugging purposes.
The exact tracing format is unspecified and may change. The exact tracing format is unspecified and may change.
@ -234,34 +268,47 @@ in {
This variant is useful for tracing file sets passed as arguments to other functions. This variant is useful for tracing file sets passed as arguments to other functions.
Type:
traceVal :: FileSet -> FileSet
Example: # Inputs
toSource {
root = ./.; `fileset`
fileset = traceVal (unions [
./Makefile : The file set to trace and return.
./src
./tests/run.sh This argument can also be a path,
]); which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
}
=> # Type
trace: /home/user/src/myProject
trace: - Makefile (regular) ```
trace: - src (all files in directory) traceVal :: FileSet -> FileSet
trace: - tests ```
trace: - run.sh (regular)
"/nix/store/...-source" # Examples
:::{.example}
## `lib.fileset.traceVal` usage example
```nix
toSource {
root = ./.;
fileset = traceVal (unions [
./Makefile
./src
./tests/run.sh
]);
}
=>
trace: /home/user/src/myProject
trace: - Makefile (regular)
trace: - src (all files in directory)
trace: - tests
trace: - run.sh (regular)
"/nix/store/...-source"
```
:::
*/ */
traceVal = traceVal = fileset:
/*
The file set to trace and return.
This argument can also be a path,
which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
*/
fileset:
let let
# "fileset" would be a better name, but that would clash with the argument name, # "fileset" would be a better name, but that would clash with the argument name,
# and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76 # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76
@ -273,7 +320,7 @@ in {
# but that would then duplicate work for consumers of the fileset, because then they have to coerce it again # but that would then duplicate work for consumers of the fileset, because then they have to coerce it again
actualFileset; actualFileset;
/* /**
Add the local files contained in `fileset` to the store as a single [store path](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) rooted at `root`. Add the local files contained in `fileset` to the store as a single [store path](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) rooted at `root`.
The result is the store path as a string-like value, making it usable e.g. as the `src` of a derivation, or in string interpolation: The result is the store path as a string-like value, making it usable e.g. as the `src` of a derivation, or in string interpolation:
@ -286,63 +333,13 @@ in {
The name of the store path is always `source`. The name of the store path is always `source`.
Type: # Inputs
toSource :: {
root :: Path,
fileset :: FileSet,
} -> SourceLike
Example: Takes an attribute set with the following attributes
# Import the current directory into the store
# but only include files under ./src
toSource {
root = ./.;
fileset = ./src;
}
=> "/nix/store/...-source"
# Import the current directory into the store `root` (Path; _required_)
# 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 : The local directory [path](https://nixos.org/manual/nix/stable/language/values.html#type-path) that will correspond to the root of the resulting store path.
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 = ./.;
}
=> <error>
*/
toSource = {
/*
(required) The local directory [path](https://nixos.org/manual/nix/stable/language/values.html#type-path) that will correspond to the root of the resulting store path.
Paths in [strings](https://nixos.org/manual/nix/stable/language/values.html#type-string), including Nix store paths, cannot be passed as `root`. 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. `root` has to be a directory.
@ -350,10 +347,10 @@ in {
Changing `root` only affects the directory structure of the resulting store path, it does not change which files are added to the store. 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. The only way to change which files get added to the store is by changing the `fileset` attribute.
::: :::
*/
root, `fileset` (FileSet; _required_)
/*
(required) The file set whose files to import into the store. : The file set whose files to import into the store.
File sets can be created using other functions in this library. File sets can be created using other functions in this library.
This argument can also be a path, This argument can also be a path,
which gets [implicitly coerced to a file set](#sec-fileset-path-coercion). which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
@ -362,7 +359,72 @@ in {
If a directory does not recursively contain any file, it is omitted from the store path contents. If a directory does not recursively contain any file, it is omitted from the store path contents.
::: :::
*/ # Type
```
toSource :: {
root :: Path,
fileset :: FileSet,
} -> SourceLike
```
# Examples
:::{.example}
## `lib.fileset.toSource` usage example
```nix
# Import the current directory into the store
# but only include files under ./src
toSource {
root = ./.;
fileset = ./src;
}
=> "/nix/store/...-source"
# 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 = ./.;
}
=> <error>
```
:::
*/
toSource = {
root,
fileset, fileset,
}: }:
let let
@ -418,7 +480,7 @@ in {
}; };
/* /**
The list of file paths contained in the given file set. The list of file paths contained in the given file set.
:::{.note} :::{.note}
@ -432,24 +494,37 @@ in {
The resulting list of files can be turned back into a file set using [`lib.fileset.unions`](#function-library-lib.fileset.unions). The resulting list of files can be turned back into a file set using [`lib.fileset.unions`](#function-library-lib.fileset.unions).
Type:
toList :: FileSet -> [ Path ]
Example: # Inputs
toList ./.
[ ./README.md ./Makefile ./src/main.c ./src/main.h ]
toList (difference ./. ./src) `fileset`
[ ./README.md ./Makefile ]
: The file set whose file paths to return. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
# Type
```
toList :: FileSet -> [ Path ]
```
# Examples
:::{.example}
## `lib.fileset.toList` usage example
```nix
toList ./.
[ ./README.md ./Makefile ./src/main.c ./src/main.h ]
toList (difference ./. ./src)
[ ./README.md ./Makefile ]
```
:::
*/ */
toList = toList = fileset:
# The file set whose file paths to return.
# This argument can also be a path,
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
fileset:
_toList (_coerce "lib.fileset.toList: Argument" fileset); _toList (_coerce "lib.fileset.toList: Argument" fileset);
/* /**
The file set containing all files that are in either of two given file sets. 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), This is the same as [`unions`](#function-library-lib.fileset.unions),
but takes just two file sets instead of a list. but takes just two file sets instead of a list.
@ -458,26 +533,41 @@ in {
The given file sets are evaluated as lazily as possible, The given file sets are evaluated as lazily as possible,
with the first argument being evaluated first if needed. with the first argument being evaluated first if needed.
Type:
union :: FileSet -> FileSet -> FileSet
Example: # Inputs
# 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` `fileset1`
# and the LICENSE file from the parent directory
union ./Makefile ../LICENSE : The first file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
`fileset2`
: The second file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
# Type
```
union :: FileSet -> FileSet -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.union` usage example
```nix
# 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 = 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: 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: fileset2:
_unionMany _unionMany
(_coerceMany "lib.fileset.union" [ (_coerceMany "lib.fileset.union" [
@ -491,7 +581,7 @@ in {
} }
]); ]);
/* /**
The file set containing all files that are in any of the given file sets. 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), This is the same as [`union`](#function-library-lib.fileset.unions),
but takes a list of file sets instead of just two. but takes a list of file sets instead of just two.
@ -500,32 +590,46 @@ in {
The given file sets are evaluated as lazily as possible, The given file sets are evaluated as lazily as possible,
with earlier elements being evaluated first if needed. with earlier elements being evaluated first if needed.
Type:
unions :: [ FileSet ] -> FileSet
Example: # Inputs
# 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 `filesets`
# If this directory is empty this has no effect
./src/code
# Include the files `run.sh` and `unit.c` from the `tests` directory : A list of file sets. The elements can also be paths, which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
./tests/run.sh
./tests/unit.c
# Include the `LICENSE` file from the parent directory # Type
../LICENSE
] ```
unions :: [ FileSet ] -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.unions` usage example
```nix
# 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 = unions =
# A list of file sets.
# The elements can also be paths,
# which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
filesets: filesets:
if ! isList filesets then if ! isList filesets then
throw '' throw ''
@ -541,28 +645,43 @@ in {
_unionMany _unionMany
]; ];
/* /**
The file set containing all files that are in both of two given file sets. The file set containing all files that are in both of two given file sets.
See also [Intersection (set theory)](https://en.wikipedia.org/wiki/Intersection_(set_theory)). See also [Intersection (set theory)](https://en.wikipedia.org/wiki/Intersection_(set_theory)).
The given file sets are evaluated as lazily as possible, The given file sets are evaluated as lazily as possible,
with the first argument being evaluated first if needed. with the first argument being evaluated first if needed.
Type:
intersection :: FileSet -> FileSet -> FileSet
Example: # Inputs
# Limit the selected files to the ones in ./., so only ./src and ./Makefile
intersection ./. (unions [ ../LICENSE ./src ./Makefile ]) `fileset1`
: The first file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
`fileset2`
: The second file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
# Type
```
intersection :: FileSet -> FileSet -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.intersection` usage example
```nix
# Limit the selected files to the ones in ./., so only ./src and ./Makefile
intersection ./. (unions [ ../LICENSE ./src ./Makefile ])
```
:::
*/ */
intersection = intersection =
# The first file set.
# This argument can also be a path,
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
fileset1: 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: fileset2:
let let
filesets = _coerceMany "lib.fileset.intersection" [ filesets = _coerceMany "lib.fileset.intersection" [
@ -580,41 +699,52 @@ in {
(elemAt filesets 0) (elemAt filesets 0)
(elemAt filesets 1); (elemAt filesets 1);
/* /**
The file set containing all files from the first file set that are not in the second file set. The file set containing all files from the first file set that are not in the second file set.
See also [Difference (set theory)](https://en.wikipedia.org/wiki/Complement_(set_theory)#Relative_complement). See also [Difference (set theory)](https://en.wikipedia.org/wiki/Complement_(set_theory)#Relative_complement).
The given file sets are evaluated as lazily as possible, The given file sets are evaluated as lazily as possible,
with the first argument being evaluated first if needed. with the first argument being evaluated first if needed.
Type:
union :: FileSet -> FileSet -> FileSet
Example: # Inputs
# Create a file set containing all files from the current directory,
# except ones under ./tests
difference ./. ./tests
let `positive`
# A set of Nix-related files
nixFiles = unions [ ./default.nix ./nix ./tests/default.nix ]; : The positive file set. The result can only contain files that are also in this file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
in
# Create a file set containing all files under ./tests, except ones in `nixFiles`, `negative`
# meaning only without ./tests/default.nix
difference ./tests nixFiles : The negative file set. The result will never contain files that are also in this file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
# Type
```
union :: FileSet -> FileSet -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.difference` usage example
```nix
# Create a file set containing all files from the current directory,
# except ones under ./tests
difference ./. ./tests
let
# A set of Nix-related files
nixFiles = unions [ ./default.nix ./nix ./tests/default.nix ];
in
# Create a file set containing all files under ./tests, except ones in `nixFiles`,
# meaning only without ./tests/default.nix
difference ./tests nixFiles
```
:::
*/ */
difference = difference =
# The positive file set.
# The result can only contain files that are also in this file set.
#
# This argument can also be a path,
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
positive: positive:
# The negative file set.
# The result will never contain files that are also in this file set.
#
# This argument can also be a path,
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
negative: negative:
let let
filesets = _coerceMany "lib.fileset.difference" [ filesets = _coerceMany "lib.fileset.difference" [
@ -632,36 +762,15 @@ in {
(elemAt filesets 0) (elemAt filesets 0)
(elemAt filesets 1); (elemAt filesets 1);
/* /**
Filter a file set to only contain files matching some predicate. Filter a file set to only contain files matching some predicate.
Type:
fileFilter ::
({
name :: String,
type :: String,
hasExt :: String -> Bool,
...
} -> Bool)
-> Path
-> FileSet
Example: # Inputs
# Include all regular `default.nix` files in the current directory
fileFilter (file: file.name == "default.nix") ./.
# Include all non-Nix files from the current directory `predicate`
fileFilter (file: ! file.hasExt "nix") ./.
# Include all files that start with a "." in the current directory : The predicate function to call on all files contained in given file set.
fileFilter (file: hasPrefix "." file.name) ./.
# Include all regular files (not symlinks or others) in the current directory
fileFilter (file: file.type == "regular") ./.
*/
fileFilter =
/*
The predicate function to call on all files contained in given file set.
A file is included in the resulting file set if this function returns true for it. A file is included in the resulting file set if this function returns true for it.
This function is called with an attribute set containing these attributes: This function is called with an attribute set containing these attributes:
@ -678,9 +787,47 @@ in {
`hasExt "gitignore"` is true. `hasExt "gitignore"` is true.
Other attributes may be added in the future. Other attributes may be added in the future.
*/
`path`
: The path whose files to filter
# Type
```
fileFilter ::
({
name :: String,
type :: String,
hasExt :: String -> Bool,
...
} -> Bool)
-> Path
-> FileSet
```
# Examples
:::{.example}
## `lib.fileset.fileFilter` usage example
```nix
# Include all regular `default.nix` files in the current directory
fileFilter (file: file.name == "default.nix") ./.
# Include all non-Nix files from the current directory
fileFilter (file: ! file.hasExt "nix") ./.
# Include all files that start with a "." in the current directory
fileFilter (file: hasPrefix "." file.name) ./.
# Include all regular files (not symlinks or others) in the current directory
fileFilter (file: file.type == "regular") ./.
```
:::
*/
fileFilter =
predicate: predicate:
# The path whose files to filter
path: path:
if ! isFunction predicate then if ! isFunction predicate then
throw '' throw ''
@ -699,23 +846,37 @@ in {
else else
_fileFilter predicate path; _fileFilter predicate path;
/* /**
Create a file set with the same files as a `lib.sources`-based value. Create a file set with the same files as a `lib.sources`-based value.
This does not import any of the files into the store. This does not import any of the files into the store.
This can be used to gradually migrate from `lib.sources`-based filtering to `lib.fileset`. This can be used to gradually migrate from `lib.sources`-based filtering to `lib.fileset`.
A file set can be turned back into a source using [`toSource`](#function-library-lib.fileset.toSource). A file set can be turned back into a source using [`toSource`](#function-library-lib.fileset.toSource).
:::{.note} :::{.note}
File sets cannot represent empty directories. File sets cannot represent empty directories.
Turning the result of this function back into a source using `toSource` will therefore not preserve empty directories. Turning the result of this function back into a source using `toSource` will therefore not preserve empty directories.
::: :::
Type:
# Inputs
`source`
: 1\. Function argument
# Type
```
fromSource :: SourceLike -> FileSet fromSource :: SourceLike -> FileSet
```
Example: # Examples
:::{.example}
## `lib.fileset.fromSource` usage example
```nix
# There's no cleanSource-like function for file sets yet, # There's no cleanSource-like function for file sets yet,
# but we can just convert cleanSource to a file set and use it that way # but we can just convert cleanSource to a file set and use it that way
toSource { toSource {
@ -740,6 +901,9 @@ in {
./Makefile ./Makefile
./src ./src
]); ]);
```
:::
*/ */
fromSource = source: fromSource = source:
let let
@ -768,27 +932,41 @@ in {
# If there's no filter, no need to run the expensive conversion, all subpaths will be included # If there's no filter, no need to run the expensive conversion, all subpaths will be included
_singleton path; _singleton path;
/* /**
Create a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository. Create a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository.
This function behaves like [`gitTrackedWith { }`](#function-library-lib.fileset.gitTrackedWith) - using the defaults. This function behaves like [`gitTrackedWith { }`](#function-library-lib.fileset.gitTrackedWith) - using the defaults.
Type:
gitTracked :: Path -> FileSet
Example: # Inputs
# Include all files tracked by the Git repository in the current directory
gitTracked ./.
# Include only files tracked by the Git repository in the parent directory `path`
# that are also in the current directory
intersection ./. (gitTracked ../.) : The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.
This directory must contain a `.git` file or subdirectory.
# Type
```
gitTracked :: Path -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.gitTracked` usage example
```nix
# Include all files tracked by the Git repository in the current directory
gitTracked ./.
# Include only files tracked by the Git repository in the parent directory
# that are also in the current directory
intersection ./. (gitTracked ../.)
```
:::
*/ */
gitTracked = gitTracked =
/*
The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.
This directory must contain a `.git` file or subdirectory.
*/
path: path:
_fromFetchGit _fromFetchGit
"gitTracked" "gitTracked"
@ -796,7 +974,7 @@ in {
path path
{}; {};
/* /**
Create a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository. Create a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository.
The first argument allows configuration with an attribute set, The first argument allows configuration with an attribute set,
while the second argument is the path to the Git working tree. while the second argument is the path to the Git working tree.
@ -820,27 +998,40 @@ in {
This may change in the future. This may change in the future.
::: :::
Type:
gitTrackedWith :: { recurseSubmodules :: Bool ? false } -> Path -> FileSet
Example: # Inputs
# Include all files tracked by the Git repository in the current directory
# and any submodules under it `options` (attribute set)
gitTracked { recurseSubmodules = true; } ./. : `recurseSubmodules` (optional, default: `false`)
: Whether to recurse into [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to also include their tracked files.
If `true`, this is equivalent to passing the [--recurse-submodules](https://git-scm.com/docs/git-ls-files#Documentation/git-ls-files.txt---recurse-submodules) flag to `git ls-files`.
`path`
: The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.
This directory must contain a `.git` file or subdirectory.
# Type
```
gitTrackedWith :: { recurseSubmodules :: Bool ? false } -> Path -> FileSet
```
# Examples
:::{.example}
## `lib.fileset.gitTrackedWith` usage example
```nix
# Include all files tracked by the Git repository in the current directory
# and any submodules under it
gitTracked { recurseSubmodules = true; } ./.
```
:::
*/ */
gitTrackedWith = gitTrackedWith =
{ {
/*
(optional, default: `false`) Whether to recurse into [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to also include their tracked files.
If `true`, this is equivalent to passing the [--recurse-submodules](https://git-scm.com/docs/git-ls-files#Documentation/git-ls-files.txt---recurse-submodules) flag to `git ls-files`.
*/
recurseSubmodules ? false, recurseSubmodules ? false,
}: }:
/*
The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.
This directory must contain a `.git` file or subdirectory.
*/
path: path:
if ! isBool recurseSubmodules then if ! isBool recurseSubmodules then
throw "lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead." throw "lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead."

View File

@ -4,8 +4,8 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
nodes = { nodes = {
node1 = { pkgs, ... }: { node1 = { pkgs, ... }: {
networking.firewall.extraCommands = "iptables -A INPUT -p vrrp -j ACCEPT";
services.keepalived.enable = true; services.keepalived.enable = true;
services.keepalived.openFirewall = true;
services.keepalived.vrrpInstances.test = { services.keepalived.vrrpInstances.test = {
interface = "eth1"; interface = "eth1";
state = "MASTER"; state = "MASTER";
@ -16,8 +16,8 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
environment.systemPackages = [ pkgs.tcpdump ]; environment.systemPackages = [ pkgs.tcpdump ];
}; };
node2 = { pkgs, ... }: { node2 = { pkgs, ... }: {
networking.firewall.extraCommands = "iptables -A INPUT -p vrrp -j ACCEPT";
services.keepalived.enable = true; services.keepalived.enable = true;
services.keepalived.openFirewall = true;
services.keepalived.vrrpInstances.test = { services.keepalived.vrrpInstances.test = {
interface = "eth1"; interface = "eth1";
state = "MASTER"; state = "MASTER";

File diff suppressed because it is too large Load Diff

View File

@ -16,21 +16,21 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "asusctl"; pname = "asusctl";
version = "6.0.6"; version = "6.0.9";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "asus-linux"; owner = "asus-linux";
repo = "asusctl"; repo = "asusctl";
rev = version; rev = version;
hash = "sha256-to2HJAqU3+xl6Wt90GH7RA7079v1QyP+AE0pL/9rd/M="; hash = "sha256-mml+nj+Z6267QtejTkWiR3SdNAdZCNz4M8r6LzvhALw=";
}; };
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"const-field-offset-0.1.5" = "sha256-53pT9ERsmF4lM9tVG09hgbM0zfbTp1qSM+NDyFQxe3c="; "const-field-offset-0.1.5" = "sha256-0MaNu6cUXislY+wDFuxZptXeJRkOuXGRJwZWm6AvcZ8=";
"notify-rust-4.7.0" = "sha256-A7edUorty5GpGXCUQPszZuXtLdEmbmrDSU9JcoDaiaI="; "notify-rust-4.7.0" = "sha256-A7edUorty5GpGXCUQPszZuXtLdEmbmrDSU9JcoDaiaI=";
"supergfxctl-5.2.2" = "sha256-hg1QJ7DLtn5oH6IqQu7BcWIsZKAsFy6jjsjF/2o1Cos="; "supergfxctl-5.2.3" = "sha256-wKcHoMukdUXZrdbE1xsylq7ySJpxny3+0dGUQ40BVH8=";
}; };
}; };

View File

@ -60,6 +60,7 @@
, postLinkSignHook ? null, signingUtils ? null , postLinkSignHook ? null, signingUtils ? null
}: }:
assert propagateDoc -> bintools ? man;
assert nativeTools -> !propagateDoc && nativePrefix != ""; assert nativeTools -> !propagateDoc && nativePrefix != "";
assert !nativeTools -> bintools != null && coreutils != null && gnugrep != null; assert !nativeTools -> bintools != null && coreutils != null && gnugrep != null;
assert !(nativeLibc && noLibc); assert !(nativeLibc && noLibc);
@ -128,7 +129,7 @@ let
else if targetPlatform.isRiscV then "${sharedLibraryLoader}/lib/ld-linux-riscv*.so.1" else if targetPlatform.isRiscV then "${sharedLibraryLoader}/lib/ld-linux-riscv*.so.1"
else if targetPlatform.isLoongArch64 then "${sharedLibraryLoader}/lib/ld-linux-loongarch*.so.1" else if targetPlatform.isLoongArch64 then "${sharedLibraryLoader}/lib/ld-linux-loongarch*.so.1"
else if targetPlatform.isDarwin then "/usr/lib/dyld" else if targetPlatform.isDarwin then "/usr/lib/dyld"
else if targetPlatform.isFreeBSD then "/libexec/ld-elf.so.1" else if targetPlatform.isFreeBSD then "${sharedLibraryLoader}/libexec/ld-elf.so.1"
else if hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else if hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
else ""; else "";

View File

@ -124,18 +124,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.83" version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
dependencies = [
"derive_arbitrary",
]
[[package]] [[package]]
name = "arc-swap" name = "arc-swap"
@ -197,12 +188,11 @@ dependencies = [
[[package]] [[package]]
name = "async-channel" name = "async-channel"
version = "2.3.0" version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f2776ead772134d55b62dd45e59a79e21612d85d0af729b8b7d3967d601a62a" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"event-listener",
"event-listener-strategy", "event-listener-strategy",
"futures-core", "futures-core",
"pin-project-lite", "pin-project-lite",
@ -234,7 +224,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -271,6 +261,12 @@ dependencies = [
"tokio-util", "tokio-util",
] ]
[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.3.0" version = "1.3.0"
@ -317,9 +313,9 @@ dependencies = [
[[package]] [[package]]
name = "axoupdater" name = "axoupdater"
version = "0.6.2" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd70e10a815d55bcef2a2e0907b189fc6d800558b7481883ad6535d5ae7cd42" checksum = "7d6bf8aaa32e7d33071ed9a339fc34ac30b0a5190f82069fbd12a1266bda9068"
dependencies = [ dependencies = [
"axoasset", "axoasset",
"axoprocess", "axoprocess",
@ -513,9 +509,9 @@ dependencies = [
[[package]] [[package]]
name = "bytemuck" name = "bytemuck"
version = "1.15.0" version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
@ -570,9 +566,9 @@ dependencies = [
[[package]] [[package]]
name = "camino" name = "camino"
version = "1.1.6" version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -754,7 +750,7 @@ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -1040,17 +1036,6 @@ dependencies = [
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "derive_arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
]
[[package]] [[package]]
name = "diff" name = "diff"
version = "0.1.13" version = "0.1.13"
@ -1095,17 +1080,6 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]]
name = "displaydoc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
]
[[package]] [[package]]
name = "distribution-filename" name = "distribution-filename"
version = "0.0.1" version = "0.0.1"
@ -1130,7 +1104,7 @@ dependencies = [
"fs-err", "fs-err",
"git2", "git2",
"indexmap", "indexmap",
"itertools 0.12.1", "itertools 0.13.0",
"once_cell", "once_cell",
"pep440_rs", "pep440_rs",
"pep508_rs", "pep508_rs",
@ -1170,9 +1144,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]] [[package]]
name = "either" name = "either"
version = "1.11.0" version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b"
[[package]] [[package]]
name = "encode_unicode" name = "encode_unicode"
@ -1419,7 +1393,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -1464,9 +1438,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.15" version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys", "js-sys",
@ -1538,15 +1512,15 @@ dependencies = [
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.4.4" version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
dependencies = [ dependencies = [
"atomic-waker",
"bytes", "bytes",
"fnv", "fnv",
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"futures-util",
"http", "http",
"indexmap", "indexmap",
"slab", "slab",
@ -1843,9 +1817,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
[[package]] [[package]]
name = "insta" name = "insta"
version = "1.38.0" version = "1.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5"
dependencies = [ dependencies = [
"console", "console",
"lazy_static", "lazy_static",
@ -1950,6 +1924,15 @@ dependencies = [
"either", "either",
] ]
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.11" version = "1.0.11"
@ -2016,9 +1999,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.154" version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]] [[package]]
name = "libgit2-sys" name = "libgit2-sys"
@ -2098,9 +2081,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.4.13" version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@ -2218,7 +2201,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -2364,6 +2347,7 @@ name = "once-map"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"dashmap", "dashmap",
"futures",
"tokio", "tokio",
] ]
@ -2583,7 +2567,7 @@ dependencies = [
"pest_meta", "pest_meta",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -2630,7 +2614,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -2807,7 +2791,7 @@ dependencies = [
"indoc", "indoc",
"libc", "libc",
"memoffset 0.9.1", "memoffset 0.9.1",
"parking_lot 0.11.2", "parking_lot 0.12.2",
"portable-atomic", "portable-atomic",
"pyo3-build-config", "pyo3-build-config",
"pyo3-ffi", "pyo3-ffi",
@ -2855,7 +2839,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"pyo3-macros-backend", "pyo3-macros-backend",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -2868,7 +2852,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"pyo3-build-config", "pyo3-build-config",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -3089,7 +3073,7 @@ dependencies = [
"fs-err", "fs-err",
"indoc", "indoc",
"insta", "insta",
"itertools 0.12.1", "itertools 0.13.0",
"pep508_rs", "pep508_rs",
"regex", "regex",
"reqwest", "reqwest",
@ -3403,9 +3387,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
[[package]] [[package]]
name = "rustls-webpki" name = "rustls-webpki"
version = "0.102.3" version = "0.102.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
dependencies = [ dependencies = [
"ring", "ring",
"rustls-pki-types", "rustls-pki-types",
@ -3454,9 +3438,9 @@ dependencies = [
[[package]] [[package]]
name = "schemars" name = "schemars"
version = "0.8.19" version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" checksum = "b0218ceea14babe24a4a5836f86ade86c1effbc198164e619194cb5069187e29"
dependencies = [ dependencies = [
"dyn-clone", "dyn-clone",
"schemars_derive", "schemars_derive",
@ -3467,14 +3451,14 @@ dependencies = [
[[package]] [[package]]
name = "schemars_derive" name = "schemars_derive"
version = "0.8.19" version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" checksum = "3ed5a1ccce8ff962e31a165d41f6e2a2dd1245099dc4d594f5574a86cd90f4d3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"serde_derive_internals", "serde_derive_internals",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -3520,33 +3504,33 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.201" version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.201" version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
name = "serde_derive_internals" name = "serde_derive_internals"
version = "0.29.0" version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -3562,9 +3546,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_spanned" name = "serde_spanned"
version = "0.6.5" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -3788,9 +3772,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.61" version = "2.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3883,7 +3867,7 @@ dependencies = [
"cfg-if", "cfg-if",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -3894,7 +3878,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
"test-case-core", "test-case-core",
] ]
@ -3916,7 +3900,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -3941,22 +3925,22 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.60" version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.60" version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -4072,7 +4056,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -4129,9 +4113,9 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.8.12" version = "0.8.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba"
dependencies = [ dependencies = [
"serde", "serde",
"serde_spanned", "serde_spanned",
@ -4141,18 +4125,18 @@ dependencies = [
[[package]] [[package]]
name = "toml_datetime" name = "toml_datetime"
version = "0.6.5" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
dependencies = [ dependencies = [
"serde", "serde",
] ]
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
version = "0.22.12" version = "0.22.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"serde", "serde",
@ -4209,7 +4193,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -4482,7 +4466,7 @@ checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0"
[[package]] [[package]]
name = "uv" name = "uv"
version = "0.1.44" version = "0.1.45"
dependencies = [ dependencies = [
"anstream", "anstream",
"anyhow", "anyhow",
@ -4503,7 +4487,7 @@ dependencies = [
"indoc", "indoc",
"insta", "insta",
"install-wheel-rs", "install-wheel-rs",
"itertools 0.12.1", "itertools 0.13.0",
"miette", "miette",
"mimalloc", "mimalloc",
"owo-colors", "owo-colors",
@ -4512,6 +4496,7 @@ dependencies = [
"platform-tags", "platform-tags",
"predicates", "predicates",
"pypi-types", "pypi-types",
"rayon",
"regex", "regex",
"requirements-txt", "requirements-txt",
"reqwest", "reqwest",
@ -4581,7 +4566,7 @@ dependencies = [
"fs-err", "fs-err",
"indoc", "indoc",
"insta", "insta",
"itertools 0.12.1", "itertools 0.13.0",
"once_cell", "once_cell",
"pep440_rs", "pep440_rs",
"pep508_rs", "pep508_rs",
@ -4680,7 +4665,7 @@ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
"distribution-types", "distribution-types",
"itertools 0.12.1", "itertools 0.13.0",
"pep508_rs", "pep508_rs",
"platform-tags", "platform-tags",
"rustc-hash", "rustc-hash",
@ -4703,14 +4688,11 @@ dependencies = [
"distribution-types", "distribution-types",
"fs-err", "fs-err",
"futures", "futures",
"indicatif",
"install-wheel-rs", "install-wheel-rs",
"itertools 0.12.1", "itertools 0.13.0",
"mimalloc", "mimalloc",
"owo-colors", "owo-colors",
"pep440_rs",
"pep508_rs", "pep508_rs",
"petgraph",
"poloto", "poloto",
"pretty_assertions", "pretty_assertions",
"resvg", "resvg",
@ -4730,11 +4712,9 @@ dependencies = [
"uv-client", "uv-client",
"uv-configuration", "uv-configuration",
"uv-dispatch", "uv-dispatch",
"uv-distribution",
"uv-fs", "uv-fs",
"uv-installer", "uv-installer",
"uv-interpreter", "uv-interpreter",
"uv-normalize",
"uv-requirements", "uv-requirements",
"uv-resolver", "uv-resolver",
"uv-types", "uv-types",
@ -4750,7 +4730,7 @@ dependencies = [
"distribution-types", "distribution-types",
"futures", "futures",
"install-wheel-rs", "install-wheel-rs",
"itertools 0.12.1", "itertools 0.13.0",
"rustc-hash", "rustc-hash",
"tracing", "tracing",
"uv-build", "uv-build",
@ -4916,7 +4896,7 @@ dependencies = [
"indoc", "indoc",
"insta", "insta",
"install-wheel-rs", "install-wheel-rs",
"itertools 0.12.1", "itertools 0.13.0",
"once_cell", "once_cell",
"pep440_rs", "pep440_rs",
"pep508_rs", "pep508_rs",
@ -4970,7 +4950,7 @@ dependencies = [
"indexmap", "indexmap",
"indoc", "indoc",
"insta", "insta",
"itertools 0.12.1", "itertools 0.13.0",
"path-absolutize", "path-absolutize",
"pep440_rs", "pep440_rs",
"pep508_rs", "pep508_rs",
@ -5003,6 +4983,7 @@ dependencies = [
"cache-key", "cache-key",
"chrono", "chrono",
"clap", "clap",
"dashmap",
"derivative", "derivative",
"distribution-filename", "distribution-filename",
"distribution-types", "distribution-types",
@ -5011,7 +4992,7 @@ dependencies = [
"indexmap", "indexmap",
"insta", "insta",
"install-wheel-rs", "install-wheel-rs",
"itertools 0.12.1", "itertools 0.13.0",
"once-map", "once-map",
"once_cell", "once_cell",
"owo-colors", "owo-colors",
@ -5065,24 +5046,19 @@ dependencies = [
[[package]] [[package]]
name = "uv-version" name = "uv-version"
version = "0.1.44" version = "0.1.45"
[[package]] [[package]]
name = "uv-virtualenv" name = "uv-virtualenv"
version = "0.0.4" version = "0.0.4"
dependencies = [ dependencies = [
"anstream",
"clap",
"directories",
"fs-err", "fs-err",
"itertools 0.12.1", "itertools 0.13.0",
"pathdiff", "pathdiff",
"platform-tags", "platform-tags",
"pypi-types", "pypi-types",
"thiserror", "thiserror",
"tracing", "tracing",
"tracing-subscriber",
"uv-cache",
"uv-fs", "uv-fs",
"uv-interpreter", "uv-interpreter",
"uv-version", "uv-version",
@ -5225,7 +5201,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -5259,7 +5235,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -5423,7 +5399,7 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -5434,7 +5410,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -5445,7 +5421,7 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -5456,7 +5432,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.61", "syn 2.0.64",
] ]
[[package]] [[package]]
@ -5710,17 +5686,14 @@ checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
[[package]] [[package]]
name = "zip" name = "zip"
version = "1.2.3" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c700ea425e148de30c29c580c1f9508b93ca57ad31c9f4e96b83c194c37a7a8f" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
dependencies = [ dependencies = [
"arbitrary", "byteorder",
"crc32fast", "crc32fast",
"crossbeam-utils", "crossbeam-utils",
"displaydoc",
"flate2", "flate2",
"indexmap",
"thiserror",
] ]
[[package]] [[package]]

View File

@ -12,13 +12,13 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "uv"; pname = "uv";
version = "0.1.44"; version = "0.1.45";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "astral-sh"; owner = "astral-sh";
repo = "uv"; repo = "uv";
rev = version; rev = version;
hash = "sha256-dmUnngHMj9WSDsr8es3eX9y2e8mmNcQFJ0QHi5YQT0U="; hash = "sha256-PJeUndpD7jHcpM66dMIyXpDx95Boc01rzovS0Y7io7w=";
}; };
cargoLock = { cargoLock = {

View File

@ -1,98 +1,91 @@
{ buildPythonPackage { lib
, SDL2 , buildPythonPackage
, cmake
, fetchFromGitHub
, fetchpatch
, gym
, importlib-metadata
, importlib-resources
, lib
, ninja
, numpy
, pybind11
, pytestCheckHook
, pythonOlder , pythonOlder
, fetchFromGitHub
, cmake
, ninja
, pybind11
, setuptools , setuptools
, stdenv
, typing-extensions
, wheel , wheel
, SDL2
, zlib , zlib
, importlib-resources
, numpy
, typing-extensions
, importlib-metadata
, gymnasium
, pytestCheckHook
, stdenv
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "ale-py"; pname = "ale-py";
version = "0.8.1"; version = "0.9.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Farama-Foundation"; owner = "Farama-Foundation";
repo = "Arcade-Learning-Environment"; repo = "Arcade-Learning-Environment";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-B2AxhlzvBy1lJ3JttJjImgTjMtEUyZBv+xHU2IC7BVE="; hash = "sha256-obZfNQ0+ppnq/BD4IFeMFAqJnCVV3X/2HeRwbdSKRFk=";
}; };
patches = [ patches = [
# don't download pybind11, use local pybind11 # don't download pybind11, use local pybind11
./cmake-pybind11.patch ./cmake-pybind11.patch
./patch-sha-check-in-setup.patch
# The following two patches add the required `include <cstdint>` for compilation to work with GCC 13.
# See https://github.com/Farama-Foundation/Arcade-Learning-Environment/pull/503
(fetchpatch {
name = "fix-gcc13-compilation-1";
url = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/commit/ebd64c03cdaa3d8df7da7c62ec3ae5795105e27a.patch";
hash = "sha256-NMz0hw8USOj88WryHRkMQNWznnP6+5aWovEYNuocQ2c=";
})
(fetchpatch {
name = "fix-gcc13-compilation-2";
url = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/commit/4c99c7034f17810f3ff6c27436bfc3b40d08da21.patch";
hash = "sha256-66/bDCyMr1RsKk63T9GnFZGloLlkdr/bf5WHtWbX6VY=";
})
]; ];
nativeBuildInputs = [ build-system = [
cmake cmake
ninja ninja
pybind11
setuptools setuptools
wheel wheel
pybind11
]; ];
buildInputs = [ buildInputs = [
zlib
SDL2 SDL2
zlib
]; ];
propagatedBuildInputs = [ dependencies = [
typing-extensions
importlib-resources importlib-resources
numpy numpy
typing-extensions
] ++ lib.optionals (pythonOlder "3.10") [ ] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata importlib-metadata
]; ];
nativeCheckInputs = [
pytestCheckHook
gym
];
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"' --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
substituteInPlace setup.py \
--replace '@sha@' '"${version}"'
''; '';
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
pythonImportsCheck = [ "ale_py" ]; pythonImportsCheck = [ "ale_py" ];
meta = with lib; { nativeCheckInputs = [
description = "a simple framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games"; gymnasium
pytestCheckHook
];
# test_atari_env.py::test_check_env fails on the majority of the environments because the ROM are missing.
# The user is expected to manually download the roms:
# https://github.com/Farama-Foundation/Arcade-Learning-Environment/blob/v0.9.0/docs/faq.md#i-downloaded-ale-and-i-installed-it-successfully-but-i-cannot-find-any-rom-file-at-roms-do-i-have-to-get-them-somewhere-else
disabledTests = [
"test_check_env"
];
meta = {
description = "A simple framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games";
mainProgram = "ale-import-roms"; mainProgram = "ale-import-roms";
homepage = "https://github.com/mgbellemare/Arcade-Learning-Environment"; homepage = "https://github.com/mgbellemare/Arcade-Learning-Environment";
license = licenses.gpl2; changelog = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases/tag/v${version}";
maintainers = with maintainers; [ billhuang ]; license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ billhuang ];
broken = stdenv.isDarwin; # fails to link with missing library broken = stdenv.isDarwin; # fails to link with missing library
}; };
} }

View File

@ -1,17 +0,0 @@
diff --git a/setup.py b/setup.py
index ff1b1c5..ce40df0 100644
--- a/setup.py
+++ b/setup.py
@@ -141,11 +141,7 @@ def parse_version(version_file):
version = ci_version
else:
- sha = (
- subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], cwd=here)
- .decode("ascii")
- .strip()
- )
+ sha = @sha@
version += f"+{sha}"
return version

View File

@ -1,17 +1,19 @@
{ lib {
, buildPythonPackage lib,
, flit-core buildPythonPackage,
, pythonOlder fetchPypi,
, fetchPypi flit-core,
, tinycss2 pytestCheckHook,
, pytestCheckHook pythonOlder,
tinycss2,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "cssselect2"; pname = "cssselect2";
version = "0.7.0"; version = "0.7.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.5";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -22,11 +24,9 @@ buildPythonPackage rec {
sed -i '/^addopts/d' pyproject.toml sed -i '/^addopts/d' pyproject.toml
''; '';
nativeBuildInputs = [ build-system = [ flit-core ];
flit-core
];
propagatedBuildInputs = [ tinycss2 ]; dependencies = [ tinycss2 ];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
@ -35,6 +35,8 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "CSS selectors for Python ElementTree"; description = "CSS selectors for Python ElementTree";
homepage = "https://github.com/Kozea/cssselect2"; homepage = "https://github.com/Kozea/cssselect2";
changelog = "https://github.com/Kozea/cssselect2/releases/tag/${version}";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ ];
}; };
} }

View File

@ -15,7 +15,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "dask-expr"; pname = "dask-expr";
version = "1.1.0"; version = "1.1.1";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "dask"; owner = "dask";
repo = "dask-expr"; repo = "dask-expr";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-yVwaOOjxHVxAhFlEENnjpX8LbJs9MW0OOmwAH5RhPgE="; hash = "sha256-ltsRKbb/p+qHeNiX0oeZUKbbjPoPxSM4uFnWUFqoqhc=";
}; };
postPatch = '' postPatch = ''
@ -32,13 +32,13 @@ buildPythonPackage rec {
--replace-fail "versioneer[toml]==0.28" "versioneer[toml]" --replace-fail "versioneer[toml]==0.28" "versioneer[toml]"
''; '';
nativeBuildInputs = [ build-system = [
setuptools setuptools
versioneer versioneer
wheel wheel
]; ];
propagatedBuildInputs = [ dependencies = [
dask dask
pandas pandas
pyarrow pyarrow
@ -53,10 +53,10 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
meta = with lib; { meta = {
description = ""; description = "A rewrite of Dask DataFrame that includes query optimization and generally improved organization";
homepage = "https://github.com/dask/dask-expr"; homepage = "https://github.com/dask/dask-expr";
license = licenses.bsd3; license = lib.licenses.bsd3;
maintainers = with maintainers; [ GaetanLepage ]; maintainers = with lib.maintainers; [ GaetanLepage ];
}; };
} }

View File

@ -1,32 +1,42 @@
{ lib { lib
, stdenv
, buildPythonPackage , buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools
, setuptools-scm
, dask , dask
, fetchPypi
, numpy , numpy
, scipy
, pandas
, pims , pims
, pytestCheckHook , pytestCheckHook
, pythonOlder
, scikit-image , scikit-image
, scipy
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "dask-image"; pname = "dask-image";
version = "2023.8.1"; version = "2024.5.1";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.9";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "dask";
hash = "sha256-XpqJhbBSehtZQsan50Tg5X0mTiIscFjwW664HDdNBLY="; repo = "dask-image";
rev = "refs/tags/v${version}";
hash = "sha256-BNjftLs/hle2EWkLBOT8r2nSOxKZzPixAE4fOfNSFIs=";
}; };
propagatedBuildInputs = [ build-system = [
setuptools
setuptools-scm
];
dependencies = [
dask dask
numpy numpy
scipy scipy
pandas
pims pims
]; ];
@ -35,19 +45,14 @@ buildPythonPackage rec {
scikit-image scikit-image
]; ];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--flake8" ""
'';
pythonImportsCheck = [ pythonImportsCheck = [
"dask_image" "dask_image"
]; ];
meta = with lib; { meta = {
description = "Distributed image processing"; description = "Distributed image processing";
homepage = "https://github.com/dask/dask-image"; homepage = "https://github.com/dask/dask-image";
license = licenses.bsdOriginal; license = lib.licenses.bsdOriginal;
maintainers = with maintainers; [ ]; maintainers = with lib.maintainers; [ GaetanLepage ];
}; };
} }

View File

@ -39,7 +39,7 @@
let self = buildPythonPackage rec { let self = buildPythonPackage rec {
pname = "dask"; pname = "dask";
version = "2024.5.0"; version = "2024.5.1";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -48,15 +48,15 @@ let self = buildPythonPackage rec {
owner = "dask"; owner = "dask";
repo = "dask"; repo = "dask";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-2tkY02Inhpo8upTjhen//EvsZwd93roPCID215NOxwQ="; hash = "sha256-FzvzmQa9kJAZw67HY+d+3uC6Bd246vp5QsyXepGnKH8=";
}; };
nativeBuildInputs = [ build-system = [
setuptools setuptools
wheel wheel
]; ];
propagatedBuildInputs = [ dependencies = [
click click
cloudpickle cloudpickle
fsspec fsspec
@ -185,12 +185,12 @@ let self = buildPythonPackage rec {
}; };
meta = with lib; { meta = {
description = "Minimal task scheduling abstraction"; description = "Minimal task scheduling abstraction";
mainProgram = "dask"; mainProgram = "dask";
homepage = "https://dask.org/"; homepage = "https://dask.org/";
changelog = "https://docs.dask.org/en/latest/changelog.html"; changelog = "https://docs.dask.org/en/latest/changelog.html";
license = licenses.bsd3; license = lib.licenses.bsd3;
maintainers = with maintainers; [ GaetanLepage ]; maintainers = with lib.maintainers; [ GaetanLepage ];
}; };
}; in self }; in self

View File

@ -17,7 +17,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "fastapi-sso"; pname = "fastapi-sso";
version = "0.14.2"; version = "0.15.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = "tomasvotava"; owner = "tomasvotava";
repo = "fastapi-sso"; repo = "fastapi-sso";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-mkaQY+fIc4zw+ESe3ybxAMgMQOOpjCIJDv+dDj76oAg="; hash = "sha256-jSUogf2Dup8k4BOQAXJwg8R96Blgieg82/X/n1TLnL0=";
}; };
postPatch = '' postPatch = ''

View File

@ -2,6 +2,7 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder , pythonOlder
, pythonAtLeast
, ninja , ninja
, ignite , ignite
, numpy , numpy
@ -14,7 +15,8 @@ buildPythonPackage rec {
pname = "monai"; pname = "monai";
version = "1.3.0"; version = "1.3.0";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.8"; # upper bound due to use of `distutils`; remove after next release:
disabled = pythonOlder "3.8" || pythonAtLeast "3.12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Project-MONAI"; owner = "Project-MONAI";

View File

@ -54,6 +54,10 @@ buildPythonPackage rec {
disabledTestPaths = [ disabledTestPaths = [
# Requires unpackaged pyspiel # Requires unpackaged pyspiel
"tests/test_openspiel.py" "tests/test_openspiel.py"
# Broken since ale-py v0.9.0 due to API change
# https://github.com/Farama-Foundation/Shimmy/issues/120
"tests/test_atari.py"
]; ];
preCheck = '' preCheck = ''

View File

@ -7,13 +7,13 @@
buildHomeAssistantComponent rec { buildHomeAssistantComponent rec {
owner = "samuelspagl"; owner = "samuelspagl";
domain = "samsung_soundbar"; domain = "samsung_soundbar";
version = "0.4.0b2"; version = "0.4.0b4";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit owner; inherit owner;
repo = "ha_samsung_soundbar"; repo = "ha_samsung_soundbar";
rev = version; rev = version;
hash = "sha256-htAUCQe8mpk+GFwxXkPVnWS0m3mZd2hUt+f4qES+W4U="; hash = "sha256-SwIB2w7iBFdyDfwm5WSDF59YVR8ou6Le0PLUMidS1vk=";
}; };
propagatedBuildInputs = [ pysmartthings ]; propagatedBuildInputs = [ pysmartthings ];

View File

@ -5,18 +5,18 @@
buildNpmPackage rec { buildNpmPackage rec {
pname = "android-tv-card"; pname = "android-tv-card";
version = "3.7.1"; version = "3.7.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Nerwyn"; owner = "Nerwyn";
repo = "android-tv-card"; repo = "android-tv-card";
rev = version; rev = version;
hash = "sha256-+g93NybZreixpXylVqWQvjP0l9Z1x5JbEMC0RDpscBE="; hash = "sha256-uhdo4K5JqKogQGKr0dkFl579YeAQNbhOwHAFTLpqY6Y=";
}; };
patches = [ ./dont-call-git.patch ]; patches = [ ./dont-call-git.patch ];
npmDepsHash = "sha256-oKIDL8BPalkIqtvA68D1YFINgg8qJ2C1KTuAr1IhJjE="; npmDepsHash = "sha256-wrmj4lewxBnWVlpkb/AP3lfuGNcvYGf+HWBQw7bcr1Q=";
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall