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

View File

@ -1,4 +1,4 @@
/*
/**
<!-- This anchor is here for backwards compatibility -->
[]{#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.
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:
- [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.
## 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.
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.
:::
### 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:
```
@ -157,17 +157,34 @@ let
in {
/*
/**
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 not exist, a file set containing no files is returned.
Type:
maybeMissing :: Path -> FileSet
Example:
# All files in the current directory, but excluding main.o if it exists
difference ./. (maybeMissing ./main.o)
# Inputs
`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 =
path:
@ -183,7 +200,7 @@ in {
else
_singleton path;
/*
/**
Incrementally evaluate and trace a file set in a pretty way.
This function is only intended for debugging purposes.
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.
Type:
trace :: FileSet -> Any -> Any
Example:
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
# Inputs
`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).
`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 =
/*
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:
trace = fileset:
let
# "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
@ -224,7 +258,7 @@ in {
(_printFileset actualFileset)
(x: x);
/*
/**
Incrementally evaluate and trace a file set in a pretty way.
This function is only intended for debugging purposes.
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.
Type:
traceVal :: FileSet -> FileSet
Example:
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"
# Inputs
`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).
# Type
```
traceVal :: FileSet -> FileSet
```
# 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 =
/*
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:
traceVal = fileset:
let
# "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
@ -273,7 +320,7 @@ in {
# but that would then duplicate work for consumers of the fileset, because then they have to coerce it again
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`.
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`.
Type:
toSource :: {
root :: Path,
fileset :: FileSet,
} -> SourceLike
# Inputs
Example:
# Import the current directory into the store
# but only include files under ./src
toSource {
root = ./.;
fileset = ./src;
}
=> "/nix/store/...-source"
Takes an attribute set with the following attributes
# 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"
`root` (Path; _required_)
# 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 = {
/*
(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.
: 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`.
`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.
The only way to change which files get added to the store is by changing the `fileset` attribute.
:::
*/
root,
/*
(required) The file set whose files to import into the store.
`fileset` (FileSet; _required_)
: The file set whose files to import into the store.
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).
@ -362,7 +359,72 @@ in {
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,
}:
let
@ -418,7 +480,7 @@ in {
};
/*
/**
The list of file paths contained in the given file set.
:::{.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).
Type:
toList :: FileSet -> [ Path ]
Example:
toList ./.
[ ./README.md ./Makefile ./src/main.c ./src/main.h ]
# Inputs
toList (difference ./. ./src)
[ ./README.md ./Makefile ]
`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).
# 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 =
# 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 = fileset:
_toList (_coerce "lib.fileset.toList: Argument" fileset);
/*
/**
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.
@ -458,26 +533,41 @@ in {
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
# Inputs
# Create a file set containing the file `Makefile`
# and the LICENSE file from the parent directory
union ./Makefile ../LICENSE
`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
```
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 =
# 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" [
@ -491,7 +581,7 @@ in {
}
]);
/*
/**
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.
@ -500,32 +590,46 @@ in {
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
# Inputs
# Recursively include all files in the `src/code` directory
# If this directory is empty this has no effect
./src/code
`filesets`
# Include the files `run.sh` and `unit.c` from the `tests` directory
./tests/run.sh
./tests/unit.c
: A list of file sets. The elements can also be paths, which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
# Include the `LICENSE` file from the parent directory
../LICENSE
]
# Type
```
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 =
# A list of file sets.
# The elements can also be paths,
# which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
filesets:
if ! isList filesets then
throw ''
@ -541,28 +645,43 @@ in {
_unionMany
];
/*
/**
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)).
The given file sets are evaluated as lazily as possible,
with the first argument being evaluated first if needed.
Type:
intersection :: FileSet -> FileSet -> FileSet
Example:
# Limit the selected files to the ones in ./., so only ./src and ./Makefile
intersection ./. (unions [ ../LICENSE ./src ./Makefile ])
# Inputs
`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 =
# 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:
let
filesets = _coerceMany "lib.fileset.intersection" [
@ -580,41 +699,52 @@ in {
(elemAt filesets 0)
(elemAt filesets 1);
/*
/**
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).
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 all files from the current directory,
# except ones under ./tests
difference ./. ./tests
# Inputs
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
`positive`
: 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).
`negative`
: 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 =
# 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:
# 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:
let
filesets = _coerceMany "lib.fileset.difference" [
@ -632,36 +762,15 @@ in {
(elemAt filesets 0)
(elemAt filesets 1);
/*
/**
Filter a file set to only contain files matching some predicate.
Type:
fileFilter ::
({
name :: String,
type :: String,
hasExt :: String -> Bool,
...
} -> Bool)
-> Path
-> FileSet
Example:
# Include all regular `default.nix` files in the current directory
fileFilter (file: file.name == "default.nix") ./.
# Inputs
# Include all non-Nix files from the current directory
fileFilter (file: ! file.hasExt "nix") ./.
`predicate`
# 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 =
/*
The predicate function to call on all files contained in given file set.
: 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.
This function is called with an attribute set containing these attributes:
@ -678,9 +787,47 @@ in {
`hasExt "gitignore"` is true.
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:
# The path whose files to filter
path:
if ! isFunction predicate then
throw ''
@ -699,23 +846,37 @@ in {
else
_fileFilter predicate path;
/*
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.
/**
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 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}
File sets cannot represent empty directories.
Turning the result of this function back into a source using `toSource` will therefore not preserve empty directories.
:::
:::{.note}
File sets cannot represent 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
```
Example:
# Examples
:::{.example}
## `lib.fileset.fromSource` usage example
```nix
# 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
toSource {
@ -740,6 +901,9 @@ in {
./Makefile
./src
]);
```
:::
*/
fromSource = source:
let
@ -768,27 +932,41 @@ in {
# If there's no filter, no need to run the expensive conversion, all subpaths will be included
_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.
This function behaves like [`gitTrackedWith { }`](#function-library-lib.fileset.gitTrackedWith) - using the defaults.
Type:
gitTracked :: Path -> FileSet
Example:
# Include all files tracked by the Git repository in the current directory
gitTracked ./.
# Inputs
# Include only files tracked by the Git repository in the parent directory
# that are also in the current directory
intersection ./. (gitTracked ../.)
`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
```
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 =
/*
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:
_fromFetchGit
"gitTracked"
@ -796,7 +974,7 @@ in {
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.
The first argument allows configuration with an attribute set,
while the second argument is the path to the Git working tree.
@ -820,27 +998,40 @@ in {
This may change in the future.
:::
Type:
gitTrackedWith :: { recurseSubmodules :: Bool ? false } -> Path -> FileSet
Example:
# Include all files tracked by the Git repository in the current directory
# and any submodules under it
gitTracked { recurseSubmodules = true; } ./.
# Inputs
`options` (attribute set)
: `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 =
{
/*
(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,
}:
/*
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:
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."

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -16,21 +16,21 @@
rustPlatform.buildRustPackage rec {
pname = "asusctl";
version = "6.0.6";
version = "6.0.9";
src = fetchFromGitLab {
owner = "asus-linux";
repo = "asusctl";
rev = version;
hash = "sha256-to2HJAqU3+xl6Wt90GH7RA7079v1QyP+AE0pL/9rd/M=";
hash = "sha256-mml+nj+Z6267QtejTkWiR3SdNAdZCNz4M8r6LzvhALw=";
};
cargoLock = {
lockFile = ./Cargo.lock;
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=";
"supergfxctl-5.2.2" = "sha256-hg1QJ7DLtn5oH6IqQu7BcWIsZKAsFy6jjsjF/2o1Cos=";
"supergfxctl-5.2.3" = "sha256-wKcHoMukdUXZrdbE1xsylq7ySJpxny3+0dGUQ40BVH8=";
};
};

View File

@ -60,6 +60,7 @@
, postLinkSignHook ? null, signingUtils ? null
}:
assert propagateDoc -> bintools ? man;
assert nativeTools -> !propagateDoc && nativePrefix != "";
assert !nativeTools -> bintools != null && coreutils != null && gnugrep != null;
assert !(nativeLibc && noLibc);
@ -128,7 +129,7 @@ let
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.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 "";

View File

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

View File

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

View File

@ -1,98 +1,91 @@
{ buildPythonPackage
, SDL2
, cmake
, fetchFromGitHub
, fetchpatch
, gym
, importlib-metadata
, importlib-resources
, lib
, ninja
, numpy
, pybind11
, pytestCheckHook
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, cmake
, ninja
, pybind11
, setuptools
, stdenv
, typing-extensions
, wheel
, SDL2
, zlib
, importlib-resources
, numpy
, typing-extensions
, importlib-metadata
, gymnasium
, pytestCheckHook
, stdenv
}:
buildPythonPackage rec {
pname = "ale-py";
version = "0.8.1";
version = "0.9.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Farama-Foundation";
repo = "Arcade-Learning-Environment";
rev = "refs/tags/v${version}";
hash = "sha256-B2AxhlzvBy1lJ3JttJjImgTjMtEUyZBv+xHU2IC7BVE=";
hash = "sha256-obZfNQ0+ppnq/BD4IFeMFAqJnCVV3X/2HeRwbdSKRFk=";
};
patches = [
# don't download pybind11, use local pybind11
./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
ninja
pybind11
setuptools
wheel
pybind11
];
buildInputs = [
zlib
SDL2
zlib
];
propagatedBuildInputs = [
typing-extensions
dependencies = [
importlib-resources
numpy
typing-extensions
] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
];
nativeCheckInputs = [
pytestCheckHook
gym
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"'
substituteInPlace setup.py \
--replace '@sha@' '"${version}"'
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
dontUseCmakeConfigure = true;
pythonImportsCheck = [ "ale_py" ];
meta = with lib; {
description = "a simple framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games";
nativeCheckInputs = [
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";
homepage = "https://github.com/mgbellemare/Arcade-Learning-Environment";
license = licenses.gpl2;
maintainers = with maintainers; [ billhuang ];
changelog = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases/tag/v${version}";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ billhuang ];
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
, flit-core
, pythonOlder
, fetchPypi
, tinycss2
, pytestCheckHook
{
lib,
buildPythonPackage,
fetchPypi,
flit-core,
pytestCheckHook,
pythonOlder,
tinycss2,
}:
buildPythonPackage rec {
pname = "cssselect2";
version = "0.7.0";
format = "pyproject";
disabled = pythonOlder "3.5";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
@ -22,11 +24,9 @@ buildPythonPackage rec {
sed -i '/^addopts/d' pyproject.toml
'';
nativeBuildInputs = [
flit-core
];
build-system = [ flit-core ];
propagatedBuildInputs = [ tinycss2 ];
dependencies = [ tinycss2 ];
nativeCheckInputs = [ pytestCheckHook ];
@ -35,6 +35,8 @@ buildPythonPackage rec {
meta = with lib; {
description = "CSS selectors for Python ElementTree";
homepage = "https://github.com/Kozea/cssselect2";
changelog = "https://github.com/Kozea/cssselect2/releases/tag/${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pythonAtLeast
, ninja
, ignite
, numpy
@ -14,7 +15,8 @@ buildPythonPackage rec {
pname = "monai";
version = "1.3.0";
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 {
owner = "Project-MONAI";

View File

@ -54,6 +54,10 @@ buildPythonPackage rec {
disabledTestPaths = [
# Requires unpackaged pyspiel
"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 = ''

View File

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

View File

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