Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2023-11-11 00:11:52 +00:00 committed by GitHub
commit 55664a961c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
316 changed files with 4094 additions and 2030 deletions

View file

@ -285,11 +285,11 @@ specifying an interpreter version), like this:
```nix
{ lib
, python3
, python3Packages
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "luigi";
version = "2.7.9";
pyproject = true;
@ -300,13 +300,13 @@ python3.pkgs.buildPythonApplication rec {
};
nativeBuildInputs = [
python3.pkgs.setuptools
python3.pkgs.wheel
python3Packages.setuptools
python3Packages.wheel
];
propagatedBuildInputs = with python3.pkgs; [
tornado
python-daemon
propagatedBuildInputs = [
python3Packages.tornado
python3Packages.python-daemon
];
meta = with lib; {

View file

@ -244,5 +244,4 @@ Here's a list of places in the library that need to be updated in the future:
- > The file set library is currently somewhat limited but is being expanded to include more functions over time.
in [the manual](../../doc/functions/fileset.section.md)
- If/Once a function to convert `lib.sources` values into file sets exists, the `_coerce` and `toSource` functions should be updated to mention that function in the error when such a value is passed
- If/Once a function exists that can optionally include a path depending on whether it exists, the error message for the path not existing in `_coerce` should mention the new function

View file

@ -3,8 +3,10 @@ let
inherit (import ./internal.nix { inherit lib; })
_coerce
_singleton
_coerceMany
_toSourceFilter
_fromSourceFilter
_unionMany
_fileFilter
_printFileset
@ -152,7 +154,12 @@ in {
sourceFilter = _toSourceFilter fileset;
in
if ! isPath root then
if isStringLike root then
if root ? _isLibCleanSourceWith then
throw ''
lib.fileset.toSource: `root` is a `lib.sources`-based value, but it should be a path instead.
To use a `lib.sources`-based value, convert it to a file set using `lib.fileset.fromSource` and pass it as `fileset`.
Note that this only works for sources created from paths.''
else if isStringLike root then
throw ''
lib.fileset.toSource: `root` (${toString root}) is a string-like value, but it should be a path instead.
Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
@ -188,6 +195,75 @@ in {
filter = sourceFilter;
};
/*
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`.
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.
:::
Type:
fromSource :: SourceLike -> FileSet
Example:
# 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 {
root = ./.;
fileset = fromSource (lib.sources.cleanSource ./.);
}
# Keeping a previous sourceByRegex (which could be migrated to `lib.fileset.unions`),
# but removing a subdirectory using file set functions
difference
(fromSource (lib.sources.sourceByRegex ./. [
"^README\.md$"
# This regex includes everything in ./doc
"^doc(/.*)?$"
])
./doc/generated
# Use cleanSource, but limit it to only include ./Makefile and files under ./src
intersection
(fromSource (lib.sources.cleanSource ./.))
(unions [
./Makefile
./src
]);
*/
fromSource = source:
let
# This function uses `._isLibCleanSourceWith`, `.origSrc` and `.filter`,
# which are technically internal to lib.sources,
# but we'll allow this since both libraries are in the same code base
# and this function is a bridge between them.
isFiltered = source ? _isLibCleanSourceWith;
path = if isFiltered then source.origSrc else source;
in
# We can only support sources created from paths
if ! isPath path then
if isStringLike path then
throw ''
lib.fileset.fromSource: The source origin of the argument is a string-like value ("${toString path}"), but it should be a path instead.
Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.''
else
throw ''
lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead.''
else if ! pathExists path then
throw ''
lib.fileset.fromSource: The source origin (${toString path}) of the argument does not exist.''
else if isFiltered then
_fromSourceFilter path source.filter
else
# If there's no filter, no need to run the expensive conversion, all subpaths will be included
_singleton path;
/*
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),

View file

@ -167,7 +167,12 @@ rec {
else
value
else if ! isPath value then
if isStringLike value then
if value ? _isLibCleanSourceWith then
throw ''
${context} is a `lib.sources`-based value, but it should be a file set or a path instead.
To convert a `lib.sources`-based value to a file set you can use `lib.fileset.fromSource`.
Note that this only works for sources created from paths.''
else if isStringLike value then
throw ''
${context} ("${toString value}") is a string-like value, but it should be a file set or a path instead.
Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''
@ -470,6 +475,59 @@ rec {
else
nonEmpty;
# Turn a builtins.filterSource-based source filter on a root path into a file set
# containing only files included by the filter.
# The filter is lazily called as necessary to determine whether paths are included
# Type: Path -> (String -> String -> Bool) -> fileset
_fromSourceFilter = root: sourceFilter:
let
# During the recursion we need to track both:
# - The path value such that we can safely call `readDir` on it
# - The path string value such that we can correctly call the `filter` with it
#
# While we could just recurse with the path value,
# this would then require converting it to a path string for every path,
# which is a fairly expensive operation
# Create a file set from a directory entry
fromDirEntry = path: pathString: type:
# The filter needs to run on the path as a string
if ! sourceFilter pathString type then
null
else if type == "directory" then
fromDir path pathString
else
type;
# Create a file set from a directory
fromDir = path: pathString:
mapAttrs
# This looks a bit funny, but we need both the path-based and the path string-based values
(name: fromDirEntry (path + "/${name}") (pathString + "/${name}"))
# We need to readDir on the path value, because reading on a path string
# would be unspecified if there are multiple filesystem roots
(readDir path);
rootPathType = pathType root;
# We need to convert the path to a string to imitate what builtins.path calls the filter function with.
# We don't want to rely on `toString` for this though because it's not very well defined, see ../path/README.md
# So instead we use `lib.path.splitRoot` to safely deconstruct the path into its filesystem root and subpath
# We don't need the filesystem root though, builtins.path doesn't expose that in any way to the filter.
# So we only need the components, which we then turn into a string as one would expect.
rootString = "/" + concatStringsSep "/" (components (splitRoot root).subpath);
in
if rootPathType == "directory" then
# We imitate builtins.path not calling the filter on the root path
_create root (fromDir root rootString)
else
# Direct files are always included by builtins.path without calling the filter
# But we need to lift up the base path to its parent to satisfy the base path invariant
_create (dirOf root)
{
${baseNameOf root} = rootPathType;
};
# Transforms the filesetTree of a file set to a shorter base path, e.g.
# _shortenTreeBase [ "foo" ] (_create /foo/bar null)
# => { bar = null; }

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=SC2016
# shellcheck disable=SC2317
# shellcheck disable=SC2192
# Tests lib.fileset
# Run:
@ -224,23 +226,17 @@ withFileMonitor() {
fi
}
# Check whether a file set includes/excludes declared paths as expected, usage:
# Create the tree structure declared in the tree variable, usage:
#
# tree=(
# [a/b] =1 # Declare that file a/b should exist and expect it to be included in the store path
# [c/a] = # Declare that file c/a should exist and expect it to be excluded in the store path
# [c/d/]= # Declare that directory c/d/ should exist and expect it to be excluded in the store path
# [a/b] = # Declare that file a/b should exist
# [c/a] = # Declare that file c/a should exist
# [c/d/]= # Declare that directory c/d/ should exist
# )
# checkFileset './a' # Pass the fileset as the argument
# createTree
declare -A tree
checkFileset() {
# New subshell so that we can have a separate trap handler, see `trap` below
local fileset=$1
# Process the tree into separate arrays for included paths, excluded paths and excluded files.
local -a included=()
local -a excluded=()
local -a excludedFiles=()
createTree() {
# Track which paths need to be created
local -a dirsToCreate=()
local -a filesToCreate=()
@ -248,24 +244,9 @@ checkFileset() {
# If keys end with a `/` we treat them as directories, otherwise files
if [[ "$p" =~ /$ ]]; then
dirsToCreate+=("$p")
isFile=
else
filesToCreate+=("$p")
isFile=1
fi
case "${tree[$p]}" in
1)
included+=("$p")
;;
0)
excluded+=("$p")
if [[ -n "$isFile" ]]; then
excludedFiles+=("$p")
fi
;;
*)
die "Unsupported tree value: ${tree[$p]}"
esac
done
# Create all the necessary paths.
@ -280,6 +261,43 @@ checkFileset() {
mkdir -p "${parentsToCreate[@]}"
touch "${filesToCreate[@]}"
fi
}
# Check whether a file set includes/excludes declared paths as expected, usage:
#
# tree=(
# [a/b] =1 # Declare that file a/b should exist and expect it to be included in the store path
# [c/a] = # Declare that file c/a should exist and expect it to be excluded in the store path
# [c/d/]= # Declare that directory c/d/ should exist and expect it to be excluded in the store path
# )
# checkFileset './a' # Pass the fileset as the argument
checkFileset() {
# New subshell so that we can have a separate trap handler, see `trap` below
local fileset=$1
# Create the tree
createTree
# Process the tree into separate arrays for included paths, excluded paths and excluded files.
local -a included=()
local -a excluded=()
local -a excludedFiles=()
for p in "${!tree[@]}"; do
case "${tree[$p]}" in
1)
included+=("$p")
;;
0)
excluded+=("$p")
# If keys end with a `/` we treat them as directories, otherwise files
if [[ ! "$p" =~ /$ ]]; then
excludedFiles+=("$p")
fi
;;
*)
die "Unsupported tree value: ${tree[$p]}"
esac
done
expression="toSource { root = ./.; fileset = $fileset; }"
@ -321,6 +339,10 @@ checkFileset() {
expectFailure 'toSource { root = "/nix/store/foobar"; fileset = ./.; }' 'lib.fileset.toSource: `root` \(/nix/store/foobar\) is a string-like value, but it should be a path instead.
\s*Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.'
expectFailure 'toSource { root = cleanSourceWith { src = ./.; }; fileset = ./.; }' 'lib.fileset.toSource: `root` is a `lib.sources`-based value, but it should be a path instead.
\s*To use a `lib.sources`-based value, convert it to a file set using `lib.fileset.fromSource` and pass it as `fileset`.
\s*Note that this only works for sources created from paths.'
# Only paths are accepted as `root`
expectFailure 'toSource { root = 10; fileset = ./.; }' 'lib.fileset.toSource: `root` is of type int, but it should be a path instead.'
@ -365,6 +387,9 @@ rm -rf -- *
expectFailure 'toSource { root = ./.; fileset = 10; }' 'lib.fileset.toSource: `fileset` is of type int, but it should be a file set or a path instead.'
expectFailure 'toSource { root = ./.; fileset = "/some/path"; }' 'lib.fileset.toSource: `fileset` \("/some/path"\) is a string-like value, but it should be a file set or a path instead.
\s*Paths represented as strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.'
expectFailure 'toSource { root = ./.; fileset = cleanSourceWith { src = ./.; }; }' 'lib.fileset.toSource: `fileset` is a `lib.sources`-based value, but it should be a file set or a path instead.
\s*To convert a `lib.sources`-based value to a file set you can use `lib.fileset.fromSource`.
\s*Note that this only works for sources created from paths.'
# Path coercion errors for non-existent paths
expectFailure 'toSource { root = ./.; fileset = ./a; }' 'lib.fileset.toSource: `fileset` \('"$work"'/a\) is a path that does not exist.'
@ -995,6 +1020,217 @@ touch 0 "${filesToCreate[@]}"
expectTrace 'unions (mapAttrsToList (n: _: ./. + "/${n}") (removeAttrs (builtins.readDir ./.) [ "0" ]))' "$expectedTrace"
rm -rf -- *
## lib.fileset.fromSource
# Check error messages
expectFailure 'fromSource null' 'lib.fileset.fromSource: The source origin of the argument is of type null, but it should be a path instead.'
expectFailure 'fromSource (lib.cleanSource "")' 'lib.fileset.fromSource: The source origin of the argument is a string-like value \(""\), but it should be a path instead.
\s*Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.'
expectFailure 'fromSource (lib.cleanSource null)' 'lib.fileset.fromSource: The source origin of the argument is of type null, but it should be a path instead.'
# fromSource on a path works and is the same as coercing that path
mkdir a
touch a/b c
expectEqual 'trace (fromSource ./.) null' 'trace ./. null'
rm -rf -- *
# Check that converting to a file set doesn't read the included files
mkdir a
touch a/b
run() {
expectEqual "trace (fromSource (lib.cleanSourceWith { src = ./a; })) null" "builtins.trace \"$work/a (all files in directory)\" null"
rm a/b
}
withFileMonitor run a/b
rm -rf -- *
# Check that converting to a file set doesn't read entries for directories that are filtered out
mkdir -p a/b
touch a/b/c
run() {
expectEqual "trace (fromSource (lib.cleanSourceWith {
src = ./a;
filter = pathString: type: false;
})) null" "builtins.trace \"(empty)\" null"
rm a/b/c
rmdir a/b
}
withFileMonitor run a/b
rm -rf -- *
# The filter is not needed on empty directories
expectEqual 'trace (fromSource (lib.cleanSourceWith {
src = ./.;
filter = abort "filter should not be needed";
})) null' 'trace _emptyWithoutBase null'
# Single files also work
touch a b
expectEqual 'trace (fromSource (cleanSourceWith { src = ./a; })) null' 'trace ./a null'
rm -rf -- *
# For a tree assigning each subpath true/false,
# check whether a source filter with those results includes the same files
# as a file set created using fromSource. Usage:
#
# tree=(
# [a]=1 # ./a is a file and the filter should return true for it
# [b/]=0 # ./b is a directory and the filter should return false for it
# )
# checkSource
checkSource() {
createTree
# Serialise the tree as JSON (there's only minimal savings with jq,
# and we don't need to handle escapes)
{
echo "{"
first=1
for p in "${!tree[@]}"; do
if [[ -z "$first" ]]; then
echo ","
else
first=
fi
echo "\"$p\":"
case "${tree[$p]}" in
1)
echo "true"
;;
0)
echo "false"
;;
*)
die "Unsupported tree value: ${tree[$p]}"
esac
done
echo "}"
} > "$tmp/tree.json"
# An expression to create a source value with a filter matching the tree
sourceExpr='
let
tree = importJSON '"$tmp"'/tree.json;
in
cleanSourceWith {
src = ./.;
filter =
pathString: type:
let
stripped = removePrefix (toString ./. + "/") pathString;
key = stripped + optionalString (type == "directory") "/";
in
tree.${key} or
(throw "tree key ${key} missing");
}
'
filesetExpr='
toSource {
root = ./.;
fileset = fromSource ('"$sourceExpr"');
}
'
# Turn both into store paths
sourceStorePath=$(expectStorePath "$sourceExpr")
filesetStorePath=$(expectStorePath "$filesetExpr")
# Loop through each path in the tree
while IFS= read -r -d $'\0' subpath; do
if [[ ! -e "$sourceStorePath"/"$subpath" ]]; then
# If it's not in the source store path, it's also not in the file set store path
if [[ -e "$filesetStorePath"/"$subpath" ]]; then
die "The store path $sourceStorePath created by $expr doesn't contain $subpath, but the corresponding store path $filesetStorePath created via fromSource does contain $subpath"
fi
elif [[ -z "$(find "$sourceStorePath"/"$subpath" -type f)" ]]; then
# If it's an empty directory in the source store path, it shouldn't be in the file set store path
if [[ -e "$filesetStorePath"/"$subpath" ]]; then
die "The store path $sourceStorePath created by $expr contains the path $subpath without any files, but the corresponding store path $filesetStorePath created via fromSource didn't omit it"
fi
else
# If it's non-empty directory or a file, it should be in the file set store path
if [[ ! -e "$filesetStorePath"/"$subpath" ]]; then
die "The store path $sourceStorePath created by $expr contains the non-empty path $subpath, but the corresponding store path $filesetStorePath created via fromSource doesn't include it"
fi
fi
done < <(find . -mindepth 1 -print0)
rm -rf -- *
}
# Check whether the filter is evaluated correctly
tree=(
[a]=
[b/]=
[b/c]=
[b/d]=
[e/]=
[e/e/]=
)
# We fill out the above tree values with all possible combinations of 0 and 1
# Then check whether a filter based on those return values gets turned into the corresponding file set
for i in $(seq 0 $((2 ** ${#tree[@]} - 1 ))); do
for p in "${!tree[@]}"; do
tree[$p]=$(( i % 2 ))
(( i /= 2 )) || true
done
checkSource
done
# The filter is called with the same arguments in the same order
mkdir a e
touch a/b a/c d e
expectEqual '
trace (fromSource (cleanSourceWith {
src = ./.;
filter = pathString: type: builtins.trace "${pathString} ${toString type}" true;
})) null
' '
builtins.seq (cleanSourceWith {
src = ./.;
filter = pathString: type: builtins.trace "${pathString} ${toString type}" true;
}).outPath
builtins.trace "'"$work"' (all files in directory)"
null
'
rm -rf -- *
# Test that if a directory is not included, the filter isn't called on its contents
mkdir a b
touch a/c b/d
expectEqual 'trace (fromSource (cleanSourceWith {
src = ./.;
filter = pathString: type:
if pathString == toString ./a then
false
else if pathString == toString ./b then
true
else if pathString == toString ./b/d then
true
else
abort "This filter should not be called with path ${pathString}";
})) null' 'trace (_create ./. { b = "directory"; }) null'
rm -rf -- *
# The filter is called lazily:
# If a later say intersection removes a part of the tree, the filter won't run on it
mkdir a d
touch a/{b,c} d/e
expectEqual 'trace (intersection ./a (fromSource (lib.cleanSourceWith {
src = ./.;
filter = pathString: type:
if pathString == toString ./a || pathString == toString ./a/b then
true
else if pathString == toString ./a/c then
false
else
abort "filter should not be called on ${pathString}";
}))) null' 'trace ./a/b null'
rm -rf -- *
# TODO: Once we have combinators and a property testing library, derive property tests from https://en.wikipedia.org/wiki/Algebra_of_sets
echo >&2 tests ok

View file

@ -14841,6 +14841,12 @@
githubId = 145816;
name = "David McKay";
};
rayslash = {
email = "stevemathewjoy@tutanota.com";
github = "rayslash";
githubId = 45141270;
name = "Steve Mathew Joy";
};
razvan = {
email = "razvan.panda@gmail.com";
github = "freeman42x";

View file

@ -57,6 +57,22 @@ using:
Once the connection is established, you can enter commands in the socat terminal
where socat is running.
## Port forwarding to NixOS test VMs {#sec-nixos-test-port-forwarding}
If your test has only a single VM, you may use e.g.
```ShellSession
$ QEMU_NET_OPTS="hostfwd=tcp:127.0.0.1:2222-127.0.0.1:22" ./result/bin/nixos-test-driver
```
to port-forward a port in the VM (here `22`) to the host machine (here port `2222`).
This naturally does not work when multiple machines are involved,
since a single port on the host cannot forward to multiple VMs.
If the test defines multiple machines, you may opt to _temporarily_ set
`virtualisation.forwardPorts` in the test definition for debugging.
## Reuse VM state {#sec-nixos-test-reuse-vm-state}
You can re-use the VM states coming from a previous run by setting the

View file

@ -89,7 +89,7 @@ guest. For instance, the following will forward host port 2222 to guest
port 22 (SSH):
```ShellSession
$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
$ QEMU_NET_OPTS="hostfwd=tcp:127.0.0.1:2222-127.0.0.1:22" ./result/bin/run-*-vm
```
allowing you to log in via SSH (assuming you have set the appropriate

View file

@ -33,6 +33,8 @@
- All [ROCm](https://rocm.docs.amd.com/en/latest/) packages have been updated to 5.7.0.
- [ROCm](https://rocm.docs.amd.com/en/latest/) package attribute sets are versioned: `rocmPackages` -> `rocmPackages_5`.
- `yarn-berry` has been updated to 4.0.1. This means that NodeJS versions less than `18.12` are no longer supported by it. More details at the [upstream changelog](https://github.com/yarnpkg/berry/blob/master/CHANGELOG.md).
- If the user has a custom shell enabled via `users.users.${USERNAME}.shell = ${CUSTOMSHELL}`, the
assertion will require them to also set `programs.${CUSTOMSHELL}.enable =
true`. This is generally safe behavior, but for anyone needing to opt out from
@ -361,6 +363,8 @@
- The `junicode` font package has been updated to [major version 2](https://github.com/psb1558/Junicode-font/releases/tag/v2.001), which is now a font family. In particular, plain `Junicode.ttf` no longer exists. In addition, TrueType font files are now placed in `font/truetype` instead of `font/junicode-ttf`; this change does not affect use via `fonts.packages` NixOS option.
- The `prayer` package as well as `services.prayer` have been removed because it's been unmaintained for several years and the author's website has vanished.
## Other Notable Changes {#sec-release-23.11-notable-changes}
- A new option `system.switch.enable` was added. By default, this is option is
@ -513,6 +517,8 @@ The module update takes care of the new config syntax and the data itself (user
- `services.bitcoind` now properly respects the `enable` option.
- The Home Assistant module now offers support for installing custom components and lovelace modules. Available at [`services.home-assistant.customComponents`](#opt-services.home-assistant.customComponents) and [`services.home-assistant.customLovelaceModules`](#opt-services.home-assistant.customLovelaceModules).
## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}
- The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead.
@ -556,3 +562,5 @@ The module update takes care of the new config syntax and the data itself (user
- `teleport` has been upgraded from major version 12 to major version 14. Please see upstream [upgrade instructions](https://goteleport.com/docs/management/operations/upgrading/) and release notes for versions [13](https://goteleport.com/docs/changelog/#1300-050823) and [14](https://goteleport.com/docs/changelog/#1400-092023). Note that Teleport does not officially support upgrades across more than one major version at a time. If you're running Teleport server components, it is recommended to first upgrade to an intermediate 13.x version by setting `services.teleport.package = pkgs.teleport_13`. Afterwards, this option can be removed to upgrade to the default version (14).
- The Linux kernel module `msr` (see [`msr(4)`](https://man7.org/linux/man-pages/man4/msr.4.html)), which provides an interface to read and write the model-specific registers (MSRs) of an x86 CPU, can now be configured via `hardware.cpu.x86.msr`.
- There is a new NixOS option when writing NixOS tests `testing.initrdBackdoor`, that enables `backdoor.service` in initrd. Requires `boot.initrd.systemd.enable` to be enabled. Boot will pause in stage 1 at `initrd.target`, and will listen for commands from the `Machine` python interface, just like stage 2 normally does. This enables commands to be sent to test and debug stage 1. Use `machine.switch_root()` to leave stage 1 and proceed to stage 2.

View file

@ -1278,3 +1278,19 @@ class Machine:
def run_callbacks(self) -> None:
for callback in self.callbacks:
callback()
def switch_root(self) -> None:
"""
Transition from stage 1 to stage 2. This requires the
machine to be configured with `testing.initrdBackdoor = true`
and `boot.initrd.systemd.enable = true`.
"""
self.wait_for_unit("initrd.target")
self.execute(
"systemctl isolate --no-block initrd-switch-root.target 2>/dev/null >/dev/null",
check_return=False,
check_output=False,
)
self.wait_for_console_text(r"systemd\[1\]:.*Switching root\.")
self.connected = False
self.connect()

View file

@ -1 +0,0 @@
{ pkgs, ... }: pkgs.nixos-option

View file

@ -86,7 +86,7 @@ in
#rtkit = 45; # dynamically allocated 2021-09-03
dovecot2 = 46;
dovenull2 = 47;
prayer = 49;
# prayer = 49; # dropped in 23.11
mpd = 50;
clamav = 51;
#fprot = 52; # unused
@ -411,7 +411,7 @@ in
#rtkit = 45; # unused
dovecot2 = 46;
dovenull2 = 47;
prayer = 49;
# prayer = 49; # dropped in 23.11
mpd = 50;
clamav = 51;
#fprot = 52; # unused

View file

@ -1041,7 +1041,6 @@
./services/networking/powerdns.nix
./services/networking/pppd.nix
./services/networking/pptpd.nix
./services/networking/prayer.nix
./services/networking/privoxy.nix
./services/networking/prosody.nix
./services/networking/quassel.nix

View file

@ -111,6 +111,7 @@ in
(mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "rtsp-simple-server" ] "Package has been completely rebranded by upstream as mediamtx, and thus the service and the package were renamed in NixOS as well.")
(mkRemovedOptionModule [ "services" "prayer" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "i18n" "inputMethod" "fcitx" ] "The fcitx module has been removed. Please use fcitx5 instead")
(mkRemovedOptionModule [ "services" "dhcpd4" ] ''

View file

@ -41,9 +41,15 @@ in
'';
};
enable = mkEnableOption (mdDoc ''
the {command}`sudo` command, which allows non-root users to execute commands as root.
'');
enable = mkOption {
type = types.bool;
default = true;
description =
lib.mdDoc ''
Whether to enable the {command}`sudo` command, which
allows non-root users to execute commands as root.
'';
};
package = mkPackageOption pkgs "sudo" { };

View file

@ -133,13 +133,15 @@ in
};
timerConfig = mkOption {
type = types.attrsOf unitOption;
type = types.nullOr (types.attrsOf unitOption);
default = {
OnCalendar = "daily";
Persistent = true;
};
description = lib.mdDoc ''
When to run the backup. See {manpage}`systemd.timer(5)` for details.
When to run the backup. See {manpage}`systemd.timer(5)` for
details. If null no timer is created and the backup will only
run when explicitly started.
'';
example = {
OnCalendar = "00:05";
@ -378,7 +380,7 @@ in
wantedBy = [ "timers.target" ];
timerConfig = backup.timerConfig;
})
config.services.restic.backups;
(filterAttrs (_: backup: backup.timerConfig != null) config.services.restic.backups);
# generate wrapper scripts, as described in the createWrapper option
environment.systemPackages = lib.mapAttrsToList (name: backup: let

View file

@ -51,7 +51,7 @@ with lib;
})
(mkIf (!config.services.gnome.at-spi2-core.enable) {
environment.variables = {
environment.sessionVariables = {
NO_AT_BRIDGE = "1";
GTK_A11Y = "none";
};

View file

@ -16,7 +16,8 @@ let
cp ${format.generate "configuration.yaml" filteredConfig} $out
sed -i -e "s/'\!\([a-z_]\+\) \(.*\)'/\!\1 \2/;s/^\!\!/\!/;" $out
'';
lovelaceConfig = cfg.lovelaceConfig or {};
lovelaceConfig = if (cfg.lovelaceConfig == null) then {}
else (lib.recursiveUpdate customLovelaceModulesResources cfg.lovelaceConfig);
lovelaceConfigFile = format.generate "ui-lovelace.yaml" lovelaceConfig;
# Components advertised by the home-assistant package
@ -62,8 +63,24 @@ let
# Respect overrides that already exist in the passed package and
# concat it with values passed via the module.
extraComponents = oldArgs.extraComponents or [] ++ extraComponents;
extraPackages = ps: (oldArgs.extraPackages or (_: []) ps) ++ (cfg.extraPackages ps);
extraPackages = ps: (oldArgs.extraPackages or (_: []) ps)
++ (cfg.extraPackages ps)
++ (lib.concatMap (component: component.propagatedBuildInputs or []) cfg.customComponents);
}));
# Create a directory that holds all lovelace modules
customLovelaceModulesDir = pkgs.buildEnv {
name = "home-assistant-custom-lovelace-modules";
paths = cfg.customLovelaceModules;
};
# Create parts of the lovelace config that reference lovelave modules as resources
customLovelaceModulesResources = {
lovelace.resources = map (card: {
url = "/local/nixos-lovelace-modules/${card.entrypoint or card.pname}.js?${card.version}";
type = "module";
}) cfg.customLovelaceModules;
};
in {
imports = [
# Migrations in NixOS 22.05
@ -137,6 +154,41 @@ in {
'';
};
customComponents = mkOption {
type = types.listOf types.package;
default = [];
example = literalExpression ''
with pkgs.home-assistant-custom-components; [
prometheus-sensor
];
'';
description = lib.mdDoc ''
List of custom component packages to install.
Available components can be found below `pkgs.home-assistant-custom-components`.
'';
};
customLovelaceModules = mkOption {
type = types.listOf types.package;
default = [];
example = literalExpression ''
with pkgs.home-assistant-custom-lovelace-modules; [
mini-graph-card
mini-media-player
];
'';
description = lib.mdDoc ''
List of custom lovelace card packages to load as lovelace resources.
Available cards can be found below `pkgs.home-assistant-custom-lovelace-modules`.
::: {.note}
Automatic loading only works with lovelace in `yaml` mode.
:::
'';
};
config = mkOption {
type = types.nullOr (types.submodule {
freeformType = format.type;
@ -408,9 +460,35 @@ in {
rm -f "${cfg.configDir}/ui-lovelace.yaml"
ln -s /etc/home-assistant/ui-lovelace.yaml "${cfg.configDir}/ui-lovelace.yaml"
'';
copyCustomLovelaceModules = if cfg.customLovelaceModules != [] then ''
mkdir -p "${cfg.configDir}/www"
ln -fns ${customLovelaceModulesDir} "${cfg.configDir}/www/nixos-lovelace-modules"
'' else ''
rm -f "${cfg.configDir}/www/nixos-lovelace-modules"
'';
copyCustomComponents = ''
mkdir -p "${cfg.configDir}/custom_components"
# remove components symlinked in from below the /nix/store
components="$(find "${cfg.configDir}/custom_components" -maxdepth 1 -type l)"
for component in "$components"; do
if [[ "$(readlink "$component")" =~ ^${escapeShellArg builtins.storeDir} ]]; then
rm "$component"
fi
done
# recreate symlinks for desired components
declare -a components=(${escapeShellArgs cfg.customComponents})
for component in "''${components[@]}"; do
path="$(dirname $(find "$component" -name "manifest.json"))"
ln -fns "$path" "${cfg.configDir}/custom_components/"
done
'';
in
(optionalString (cfg.config != null) copyConfig) +
(optionalString (cfg.lovelaceConfig != null) copyLovelaceConfig)
(optionalString (cfg.lovelaceConfig != null) copyLovelaceConfig) +
copyCustomLovelaceModules +
copyCustomComponents
;
environment.PYTHONPATH = package.pythonPath;
serviceConfig = let

View file

@ -1,90 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (pkgs) prayer;
cfg = config.services.prayer;
stateDir = "/var/lib/prayer";
prayerUser = "prayer";
prayerGroup = "prayer";
prayerExtraCfg = pkgs.writeText "extraprayer.cf" ''
prefix = "${prayer}"
var_prefix = "${stateDir}"
prayer_user = "${prayerUser}"
prayer_group = "${prayerGroup}"
sendmail_path = "/run/wrappers/bin/sendmail"
use_http_port ${cfg.port}
${cfg.extraConfig}
'';
prayerCfg = pkgs.runCommand "prayer.cf" { preferLocalBuild = true; } ''
# We have to remove the http_port 80, or it will start a server there
cat ${prayer}/etc/prayer.cf | grep -v http_port > $out
cat ${prayerExtraCfg} >> $out
'';
in
{
###### interface
options = {
services.prayer = {
enable = mkEnableOption (lib.mdDoc "the prayer webmail http server");
port = mkOption {
default = 2080;
type = types.port;
description = lib.mdDoc ''
Port the prayer http server is listening to.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "" ;
description = lib.mdDoc ''
Extra configuration. Contents will be added verbatim to the configuration file.
'';
};
};
};
###### implementation
config = mkIf config.services.prayer.enable {
environment.systemPackages = [ prayer ];
users.users.${prayerUser} =
{ uid = config.ids.uids.prayer;
description = "Prayer daemon user";
home = stateDir;
};
users.groups.${prayerGroup} =
{ gid = config.ids.gids.prayer; };
systemd.services.prayer = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "forking";
preStart = ''
mkdir -m 0755 -p ${stateDir}
chown ${prayerUser}:${prayerGroup} ${stateDir}
'';
script = "${prayer}/sbin/prayer --config-file=${prayerCfg}";
};
};
}

View file

@ -6,49 +6,109 @@
with lib;
let
cfg = config.testing;
qemu-common = import ../../lib/qemu-common.nix { inherit lib pkgs; };
backdoorService = {
wantedBy = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
conflicts = [ "shutdown.target" "initrd-switch-root.target" ];
before = [ "shutdown.target" "initrd-switch-root.target" ];
requires = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
after = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
script =
''
export USER=root
export HOME=/root
export DISPLAY=:0.0
if [[ -e /etc/profile ]]; then
source /etc/profile
fi
# Don't use a pager when executing backdoor
# actions. Because we use a tty, commands like systemctl
# or nix-store get confused into thinking they're running
# interactively.
export PAGER=
cd /tmp
exec < /dev/hvc0 > /dev/hvc0
while ! exec 2> /dev/${qemu-common.qemuSerialDevice}; do sleep 0.1; done
echo "connecting to host..." >&2
stty -F /dev/hvc0 raw -echo # prevent nl -> cr/nl conversion
# The following line is essential since it signals to
# the test driver that the shell is ready.
# See: the connect method in the Machine class.
echo "Spawning backdoor root shell..."
# Passing the terminal device makes bash run non-interactively.
# Otherwise we get errors on the terminal because bash tries to
# setup things like job control.
# Note: calling bash explicitly here instead of sh makes sure that
# we can also run non-NixOS guests during tests.
PS1= exec /usr/bin/env bash --norc /dev/hvc0
'';
serviceConfig.KillSignal = "SIGHUP";
};
in
{
options.testing = {
initrdBackdoor = lib.mkEnableOption (lib.mdDoc ''
enable backdoor.service in initrd. Requires
boot.initrd.systemd.enable to be enabled. Boot will pause in
stage 1 at initrd.target, and will listen for commands from the
Machine python interface, just like stage 2 normally does. This
enables commands to be sent to test and debug stage 1. Use
machine.switch_root() to leave stage 1 and proceed to stage 2.
'');
};
config = {
systemd.services.backdoor =
{ wantedBy = [ "multi-user.target" ];
requires = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
after = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
script =
''
export USER=root
export HOME=/root
export DISPLAY=:0.0
assertions = [
{
assertion = cfg.initrdBackdoor -> config.boot.initrd.systemd.enable;
message = ''
testing.initrdBackdoor requires boot.initrd.systemd.enable to be enabled.
'';
}
];
source /etc/profile
systemd.services.backdoor = backdoorService;
# Don't use a pager when executing backdoor
# actions. Because we use a tty, commands like systemctl
# or nix-store get confused into thinking they're running
# interactively.
export PAGER=
boot.initrd.systemd = lib.mkMerge [
{
contents."/etc/systemd/journald.conf".text = ''
[Journal]
ForwardToConsole=yes
MaxLevelConsole=debug
'';
cd /tmp
exec < /dev/hvc0 > /dev/hvc0
while ! exec 2> /dev/${qemu-common.qemuSerialDevice}; do sleep 0.1; done
echo "connecting to host..." >&2
stty -F /dev/hvc0 raw -echo # prevent nl -> cr/nl conversion
# The following line is essential since it signals to
# the test driver that the shell is ready.
# See: the connect method in the Machine class.
echo "Spawning backdoor root shell..."
# Passing the terminal device makes bash run non-interactively.
# Otherwise we get errors on the terminal because bash tries to
# setup things like job control.
# Note: calling bash explicitly here instead of sh makes sure that
# we can also run non-NixOS guests during tests.
PS1= exec /usr/bin/env bash --norc /dev/hvc0
'';
serviceConfig.KillSignal = "SIGHUP";
};
extraConfig = config.systemd.extraConfig;
}
(lib.mkIf cfg.initrdBackdoor {
# Implemented in machine.switch_root(). Suppress the unit by
# making it a noop without removing it, which would break
# initrd-parse-etc.service
services.initrd-cleanup.serviceConfig.ExecStart = [
# Reset
""
# noop
"/bin/true"
];
services.backdoor = backdoorService;
contents."/usr/bin/env".source = "${pkgs.coreutils}/bin/env";
})
];
# Prevent agetty from being instantiated on the serial device, since it
# interferes with the backdoor (writes to it will randomly fail
@ -104,12 +164,6 @@ in
MaxLevelConsole=debug
'';
boot.initrd.systemd.contents."/etc/systemd/journald.conf".text = ''
[Journal]
ForwardToConsole=yes
MaxLevelConsole=debug
'';
systemd.extraConfig = ''
# Don't clobber the console with duplicate systemd messages.
ShowStatus=no
@ -123,8 +177,6 @@ in
DefaultDeviceTimeoutSec=300
'';
boot.initrd.systemd.extraConfig = config.systemd.extraConfig;
boot.consoleLogLevel = 7;
# Prevent tests from accessing the Internet.

View file

@ -43,6 +43,16 @@ in {
psycopg2
];
# test loading custom components
customComponents = with pkgs.home-assistant-custom-components; [
prometheus-sensor
];
# test loading lovelace modules
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
mini-graph-card
];
config = {
homeassistant = {
name = "Home";
@ -114,6 +124,14 @@ in {
inheritParentConfig = true;
configuration.services.home-assistant.config.backup = {};
};
specialisation.removeCustomThings = {
inheritParentConfig = true;
configuration.services.home-assistant = {
customComponents = lib.mkForce [];
customLovelaceModules = lib.mkForce [];
};
};
};
testScript = { nodes, ... }: let
@ -161,6 +179,14 @@ in {
hass.wait_for_open_port(8123)
hass.succeed("curl --fail http://localhost:8123/lovelace")
with subtest("Check that custom components get installed"):
hass.succeed("test -f ${configDir}/custom_components/prometheus_sensor/manifest.json")
hass.wait_until_succeeds("journalctl -u home-assistant.service | grep -q 'We found a custom integration prometheus_sensor which has not been tested by Home Assistant'")
with subtest("Check that lovelace modules are referenced and fetchable"):
hass.succeed("grep -q 'mini-graph-card-bundle.js' '${configDir}/ui-lovelace.yaml'")
hass.succeed("curl --fail http://localhost:8123/local/nixos-lovelace-modules/mini-graph-card-bundle.js")
with subtest("Check that optional dependencies are in the PYTHONPATH"):
env = get_unit_property("Environment")
python_path = env.split("PYTHONPATH=")[1].split()[0]
@ -200,6 +226,13 @@ in {
for domain in ["backup"]:
assert f"Setup of domain {domain} took" in journal, f"{domain} setup missing"
with subtest("Check custom components and custom lovelace modules get removed"):
cursor = get_journal_cursor()
hass.succeed("${system}/specialisation/removeCustomThings/bin/switch-to-configuration test")
hass.fail("grep -q 'mini-graph-card-bundle.js' '${configDir}/ui-lovelace.yaml'")
hass.fail("test -f ${configDir}/custom_components/prometheus_sensor/manifest.json")
wait_for_homeassistant(cursor)
with subtest("Check that no errors were logged"):
hass.fail("journalctl -u home-assistant -o cat | grep -q ERROR")

View file

@ -55,6 +55,7 @@ import ./make-test-python.nix (
inherit passwordFile paths exclude pruneOpts backupPrepareCommand backupCleanupCommand;
repository = remoteRepository;
initialize = true;
timerConfig = null; # has no effect here, just checking that it doesn't break the service
};
remote-from-file-backup = {
inherit passwordFile exclude pruneOpts;

View file

@ -21,7 +21,8 @@ in
};
security.sudo = {
enable = true;
# Explicitly _not_ defining 'enable = true;' here, to check that sudo is enabled by default
wheelNeedsPassword = false;
extraConfig = ''

View file

@ -2,6 +2,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "systemd-initrd-modprobe";
nodes.machine = { pkgs, ... }: {
testing.initrdBackdoor = true;
boot.initrd.systemd.enable = true;
boot.initrd.kernelModules = [ "loop" ]; # Load module in initrd.
boot.extraModprobeConfig = ''
@ -10,6 +11,12 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
};
testScript = ''
machine.wait_for_unit("initrd.target")
max_loop = machine.succeed("cat /sys/module/loop/parameters/max_loop")
assert int(max_loop) == 42, "Parameter should be respected for initrd kernel modules"
# Make sure it sticks in stage 2
machine.switch_root()
machine.wait_for_unit("multi-user.target")
max_loop = machine.succeed("cat /sys/module/loop/parameters/max_loop")
assert int(max_loop) == 42, "Parameter should be respected for initrd kernel modules"

View file

@ -4,34 +4,16 @@ import ./make-test-python.nix ({ lib, ... }: {
nodes = {
server = { config, pkgs, ... }: {
environment.systemPackages = [ pkgs.cryptsetup ];
boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 0;
virtualisation = {
emptyDiskImages = [ 4096 ];
useBootLoader = true;
# Booting off the encrypted disk requires an available init script from
# the Nix store
mountHostNixStore = true;
useEFIBoot = true;
};
specialisation.encrypted-root.configuration = {
virtualisation.rootDevice = "/dev/mapper/root";
virtualisation.fileSystems."/".autoFormat = true;
boot.initrd.luks.devices = lib.mkVMOverride {
root.device = "/dev/vdb";
};
boot.initrd.systemd.enable = true;
boot.initrd.network = {
testing.initrdBackdoor = true;
boot.initrd.systemd.enable = true;
boot.initrd.systemd.contents."/etc/msg".text = "foo";
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
ssh = {
enable = true;
authorizedKeys = [ (lib.readFile ./initrd-network-ssh/id_ed25519.pub) ];
port = 22;
# Terrible hack so it works with useBootLoader
hostKeys = [ { outPath = "${./initrd-network-ssh/ssh_host_ed25519_key}"; } ];
};
authorizedKeys = [ (lib.readFile ./initrd-network-ssh/id_ed25519.pub) ];
port = 22;
hostKeys = [ ./initrd-network-ssh/ssh_host_ed25519_key ];
};
};
};
@ -63,24 +45,16 @@ import ./make-test-python.nix ({ lib, ... }: {
status, _ = client.execute("nc -z server 22")
return status == 0
server.wait_for_unit("multi-user.target")
server.succeed(
"echo somepass | cryptsetup luksFormat --type=luks2 /dev/vdb",
"bootctl set-default nixos-generation-1-specialisation-encrypted-root.conf",
"sync",
)
server.shutdown()
server.start()
client.wait_for_unit("network.target")
with client.nested("waiting for SSH server to come up"):
retry(ssh_is_up)
client.succeed(
"echo somepass | ssh -i /etc/sshKey -o UserKnownHostsFile=/etc/knownHosts server 'systemd-tty-ask-password-agent' & exit"
msg = client.succeed(
"ssh -i /etc/sshKey -o UserKnownHostsFile=/etc/knownHosts server 'cat /etc/msg'"
)
assert "foo" in msg
server.switch_root()
server.wait_for_unit("multi-user.target")
server.succeed("mount | grep '/dev/mapper/root on /'")
'';
})

View file

@ -1,14 +1,36 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "systemd-initrd-network";
meta.maintainers = [ lib.maintainers.elvishjerricco ];
{ system ? builtins.currentSystem
, config ? {}
, pkgs ? import ../.. { inherit system config; }
, lib ? pkgs.lib
}:
nodes = let
mkFlushTest = flush: script: { ... }: {
boot.initrd.systemd.enable = true;
boot.initrd.network = {
enable = true;
flushBeforeStage2 = flush;
};
with import ../lib/testing-python.nix { inherit system pkgs; };
let
inherit (lib.maintainers) elvishjerricco;
common = {
boot.initrd.systemd = {
enable = true;
network.wait-online.timeout = 10;
network.wait-online.anyInterface = true;
targets.network-online.requiredBy = [ "initrd.target" ];
services.systemd-networkd-wait-online.requiredBy =
[ "network-online.target" ];
initrdBin = [ pkgs.iproute2 pkgs.iputils pkgs.gnugrep ];
};
testing.initrdBackdoor = true;
boot.initrd.network.enable = true;
};
mkFlushTest = flush: script: makeTest {
name = "systemd-initrd-network-${lib.optionalString (!flush) "no-"}flush";
meta.maintainers = [ elvishjerricco ];
nodes.machine = {
imports = [ common ];
boot.initrd.network.flushBeforeStage2 = flush;
systemd.services.check-flush = {
requiredBy = ["multi-user.target"];
before = ["network-pre.target" "multi-user.target"];
@ -19,57 +41,53 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
inherit script;
};
};
in {
basic = { ... }: {
boot.initrd.network.enable = true;
boot.initrd.systemd = {
enable = true;
# Enable network-online to fail the test in case of timeout
network.wait-online.timeout = 10;
network.wait-online.anyInterface = true;
targets.network-online.requiredBy = [ "initrd.target" ];
services.systemd-networkd-wait-online.requiredBy =
[ "network-online.target" ];
testScript = ''
machine.wait_for_unit("network-online.target")
machine.succeed(
"ip addr | grep 10.0.2.15",
"ping -c1 10.0.2.2",
)
machine.switch_root()
initrdBin = [ pkgs.iproute2 pkgs.iputils pkgs.gnugrep ];
services.check = {
requiredBy = [ "initrd.target" ];
before = [ "initrd.target" ];
after = [ "network-online.target" ];
serviceConfig.Type = "oneshot";
path = [ pkgs.iproute2 pkgs.iputils pkgs.gnugrep ];
script = ''
ip addr | grep 10.0.2.15 || exit 1
ping -c1 10.0.2.2 || exit 1
'';
};
};
};
doFlush = mkFlushTest true ''
if ip addr | grep 10.0.2.15; then
echo "Network configuration survived switch-root; flushBeforeStage2 failed"
exit 1
fi
'';
dontFlush = mkFlushTest false ''
if ! (ip addr | grep 10.0.2.15); then
echo "Network configuration didn't survive switch-root"
exit 1
fi
machine.wait_for_unit("multi-user.target")
'';
};
testScript = ''
start_all()
basic.wait_for_unit("multi-user.target")
doFlush.wait_for_unit("multi-user.target")
dontFlush.wait_for_unit("multi-user.target")
# Make sure the systemd-network user was set correctly in initrd
basic.succeed("[ $(stat -c '%U,%G' /run/systemd/netif/links) = systemd-network,systemd-network ]")
basic.succeed("ip addr show >&2")
basic.succeed("ip route show >&2")
in {
basic = makeTest {
name = "systemd-initrd-network";
meta.maintainers = [ elvishjerricco ];
nodes.machine = common;
testScript = ''
machine.wait_for_unit("network-online.target")
machine.succeed(
"ip addr | grep 10.0.2.15",
"ping -c1 10.0.2.2",
)
machine.switch_root()
# Make sure the systemd-network user was set correctly in initrd
machine.wait_for_unit("multi-user.target")
machine.succeed("[ $(stat -c '%U,%G' /run/systemd/netif/links) = systemd-network,systemd-network ]")
machine.succeed("ip addr show >&2")
machine.succeed("ip route show >&2")
'';
};
doFlush = mkFlushTest true ''
if ip addr | grep 10.0.2.15; then
echo "Network configuration survived switch-root; flushBeforeStage2 failed"
exit 1
fi
'';
})
dontFlush = mkFlushTest false ''
if ! (ip addr | grep 10.0.2.15); then
echo "Network configuration didn't survive switch-root"
exit 1
fi
'';
}

View file

@ -2,16 +2,19 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "systemd-initrd-simple";
nodes.machine = { pkgs, ... }: {
boot.initrd.systemd = {
enable = true;
emergencyAccess = true;
};
testing.initrdBackdoor = true;
boot.initrd.systemd.enable = true;
virtualisation.fileSystems."/".autoResize = true;
};
testScript = ''
import subprocess
with subtest("testing initrd backdoor"):
machine.wait_for_unit("initrd.target")
machine.succeed("systemctl status initrd-fs.target")
machine.switch_root()
with subtest("handover to stage-2 systemd works"):
machine.wait_for_unit("multi-user.target")
machine.succeed("systemd-analyze | grep -q '(initrd)'") # direct handover
@ -37,6 +40,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
subprocess.check_call(["qemu-img", "resize", "vm-state-machine/machine.qcow2", "+1G"])
machine.start()
machine.switch_root()
newAvail = machine.succeed("df --output=avail / | sed 1d")
assert int(oldAvail) < int(newAvail), "File system did not grow"

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-mac-x64.zip";
hash = "sha256-6GYp9uzlR1eVRYhNU3kOmcUOPFY3J9eJPqN+TucNavA=";
hash = "sha256-sJg3hYOiELm+edw2JTFt6cPFdbDj6mLcLngeqEPaPgs=";
};
nativeBuildInputs = [ makeWrapper unzip ];

View file

@ -8,7 +8,7 @@ let
extraArgs = removeAttrs args [ "callPackage" ];
pname = "feishin";
version = "0.4.1";
version = "0.5.1";
appname = "Feishin";
meta = with lib; {

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-linux-x64.tar.xz";
hash = "sha256-Y8r329rO7z8V2xP/uRsjTFJfvTn+zyeAYzq6fKDxXs4=";
hash = "sha256-uYswGxSXz2YddoFs5F7f+ywqAr7qXqp6WryQ7ENSawQ=";
};

View file

@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "ocenaudio";
version = "3.13.1";
version = "3.13.2";
src = fetchurl {
url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian9_64.deb?version=${version}";
sha256 = "sha256-h5t5DpZD9zmmyGRueXBG5Pn+vZstm5yCUr6Mx3eyvsc=";
sha256 = "sha256-ITlnOrreZHTH8NDjx/hQzEV3toAwaM2bWFLqMf3btNE=";
};
nativeBuildInputs = [

View file

@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "praat";
version = "6.3.17";
version = "6.3.20";
src = fetchFromGitHub {
owner = "praat";
repo = "praat";
rev = "v${finalAttrs.version}";
hash = "sha256-HArWXUYoIjJmvh0GOcdGyBHfqC5r4ZEuvXyQ1x5iOt0=";
hash = "sha256-hVQPLRyDXrqpheAqzC/hQ/ZaFxP1c7ClAJQs3wlEcGc=";
};
nativeBuildInputs = [

View file

@ -13,14 +13,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "qpwgraph";
version = "0.5.3";
version = "0.6.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "rncbc";
repo = "qpwgraph";
rev = "v${finalAttrs.version}";
sha256 = "sha256-50KaVpNB5/CTLs2bRbXEinYM23AZxZO/ForrVPFDN8U=";
sha256 = "sha256-wJ+vUw16yBBFjMdJogF1nkLnAh3o2ndN9+0png8ZVJ4=";
};
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];

View file

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
pname = "spectmorph";
version = "0.5.2";
version = "0.6.1";
src = fetchurl {
url = "https://spectmorph.org/files/releases/${pname}-${version}.tar.bz2";
sha256 = "0yrq7mknhk096wfsx0q3b6wwa2w5la0rxa113di26rrrw136xl1f";
url = "https://github.com/swesterfeld/spectmorph/releases/download/${version}/${pname}-${version}.tar.bz2";
hash = "sha256-H/PaczAkjxeu2Q6S/jazZ0PU9oCmhBzsLgbGLusxXm8=";
};
buildInputs = [ libjack2 lv2 glib qt5.qtbase libao cairo libsndfile fftwFloat ];

View file

@ -2,11 +2,11 @@
let
pname = "ledger-live-desktop";
version = "2.69.0";
version = "2.71.0";
src = fetchurl {
url = "https://download.live.ledger.com/${pname}-${version}-linux-x86_64.AppImage";
hash = "sha256-9eELWlOzUd3xwAoob5XCj16JihOt6SHZe0Ybxb9dtQI=";
hash = "sha256-boZ28o8bg2TXZcc1mx4ZlPIPRFK9wy4+MTbYLT5XCQU=";
};
appimageContents = appimageTools.extractType2 {

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = "https://git.launchpad.net/lifeograph";
rev = "v${version}";
sha256 = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
hash = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
};
nativeBuildInputs = [
@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
description = "Lifeograph is an off-line and private journal and note taking application";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
mainProgram = "lifeograph";
platforms = platforms.linux;
};
}

View file

@ -24,10 +24,10 @@ let
};
};
"7" = {
version = "7.05.2";
version = "7.8";
src = fetchurl {
url = "https://github.com/Pinegrow/PinegrowReleases/releases/download/pg${builtins.substring 0 4 (versions."7".version)}/PinegrowLinux64.${versions."7".version}.zip";
hash = "sha256-Cvy4JwnQHMp7K0mKtIH8lk1bZ9hwa8nvtmimBK0UAf8=";
hash = "sha256-tYQfPfzKRwClNwgSoJfMwG3LHhi3O/iFuuwIVHS8OXk=";
};
};
};

View file

@ -1575,8 +1575,8 @@ let
mktplcRef = {
publisher = "github";
name = "copilot";
version = "1.126.493";
sha256 = "1an7z8z3xz2piw2xz1hdrs6l5rhpyvnjmb650ff2m4k24n01svfy";
version = "1.135.544";
sha256 = "sha256-OeG1nkQbQAfu8NuDEA+iaWy0ioFyXPe7Qm/CZIKPiX8=";
};
meta = {
@ -1592,8 +1592,8 @@ let
mktplcRef = {
publisher = "github";
name = "copilot-chat";
version = "0.3.2023061502";
sha256 = "sha256-sUoKwlPDMz+iQbmIsD2JhyDwmUQzOyCHXaXCUaizQ7k=";
version = "0.11.2023111001";
sha256 = "sha256-sBDvqqyq0R0ZyS81G61fI9Vd860RIjhNzCqY0bdz1mg=";
};
meta = {
description = "GitHub Copilot Chat is a companion extension to GitHub Copilot that houses experimental chat features";
@ -3554,8 +3554,8 @@ let
mktplcRef = {
name = "uiua-vscode";
publisher = "uiua-lang";
version = "0.0.22";
sha256 = "sha256-fJcSJwwRVofduWEEMa5f2VrSfyONKPkFl9OW+++lSRw=";
version = "0.0.23";
sha256 = "sha256-NauXoYTAka8qXNPYlW5g7r6NNX1x8cnvDRbEGkRsMoY=";
};
meta = {
description = "VSCode language extension for Uiua";

View file

@ -6,35 +6,24 @@
, makeWrapper
, alsa-lib
, curl
, egl-wayland
, libao
, libdecor
, libevdev
, libffi
, libGL
, libpulseaudio
, libX11
, libXext
, libxkbcommon
, libzip
, mesa
, lua
, miniupnpc
, udev
, vulkan-headers
, SDL2
, vulkan-loader
, wayland
, zlib
}:
stdenv.mkDerivation rec {
pname = "flycast";
version = "2.1";
version = "2.2";
src = fetchFromGitHub {
owner = "flyinghead";
repo = "flycast";
rev = "V${version}";
sha256 = "sha256-PRInOqg9OpaUVLwSj1lOxDtjpVaYehkRsp0jLrVKPyY=";
rev = "v${version}";
sha256 = "sha256-eQMKaUaZ1b0oXre4Ouli4qIyNaG64KntyRGk3/YIopc=";
fetchSubmodules = true;
};
@ -47,23 +36,16 @@ stdenv.mkDerivation rec {
buildInputs = [
alsa-lib
curl
egl-wayland
libao
libdecor
libevdev
libffi
libGL
libpulseaudio
libX11
libXext
libxkbcommon
libzip
mesa # for libgbm
lua
miniupnpc
udev
vulkan-headers
wayland
zlib
SDL2
];
cmakeFlags = [
"-DUSE_HOST_SDL=ON"
];
postFixup = ''

View file

@ -1,4 +1,4 @@
{ mkDerivation, config, lib, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook
{ mkDerivation, config, lib, fetchpatch, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook
# For `digitaglinktree`
, perl, sqlite
@ -67,6 +67,14 @@ mkDerivation rec {
hash = "sha256-BQPANORF/0JPGKZxXAp6eb5KXgyCs+vEYaIc7DdFpbM=";
};
# Fix build against exiv2 0.28.1
patches = [
(fetchpatch {
url = "https://invent.kde.org/graphics/digikam/-/commit/f5ea91a7f6c1926815ec68f3e0176d6c15b83051.patch";
hash = "sha256-5g2NaKKNKVfgW3dTO/IP/H/nZ0YAIOmdPAumy3NEaNg=";
})
];
nativeBuildInputs = [
cmake
doxygen

View file

@ -1,4 +1,5 @@
{ mkDerivation
, fetchpatch
, fetchurl
, lib
, extra-cmake-modules
@ -25,6 +26,14 @@ mkDerivation rec {
hash = "sha256-NWtOIHJXtc8PlltYbbp2YwDf/3QI3MdHNDX7WVQMig4=";
};
# Fix build against exiv2 0.28.1
patches = [
(fetchpatch {
url = "https://invent.kde.org/graphics/kphotoalbum/-/commit/1ceb1ae37f3f95aa290b0846969af4b26f616760.patch";
hash = "sha256-SfBJHyJZcysvemc/F09GPczBjcofxGomgjJ814PSU+c=";
})
];
# not sure if we really need phonon when we have vlc, but on KDE it's bound to
# be on the system anyway, so there is no real harm including it
buildInputs = [ exiv2 phonon libvlc ];

View file

@ -30,8 +30,13 @@ stdenv.mkDerivation rec {
hash = "sha256-kVf9+zI9rtEMmS0N4qrN673T/1fnqfcV3hQPnMXMLas=";
};
postPatch = ''
# exiv2 0.28.1
substituteInPlace CMakeLists.txt \
--replace "exiv2lib" "exiv2"
''
# error: no member named 'setlocale' in namespace 'std'; did you mean simply 'setlocale'?
postPatch = lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace cplusplus/main.cpp \
--replace "std::setlocale" "setlocale"
'';

View file

@ -9,11 +9,11 @@
stdenvNoCC.mkDerivation rec {
pname = "camunda-modeler";
version = "5.16.0";
version = "5.17.0";
src = fetchurl {
url = "https://github.com/camunda/camunda-modeler/releases/download/v${version}/camunda-modeler-${version}-linux-x64.tar.gz";
hash = "sha256-Y+v/r5bhtgXBjRQic0s5FA+KMWx5R7DOK+qZ9Izdnb0=";
hash = "sha256-yxph3Aor5nZOhu2PY4MGcfScaz9w24JXqXbhT+QKlNI=";
};
sourceRoot = "camunda-modeler-${version}-linux-x64";

View file

@ -9,6 +9,7 @@
, svg-path
, pygments
, watchdog
, fetchpatch
}:
buildPythonApplication rec {
@ -25,6 +26,13 @@ buildPythonApplication rec {
nativeCheckInputs = [ manuel ];
propagatedBuildInputs = [ setuptools docutils lxml svg-path pygments watchdog ];
patches = [
(fetchpatch {
name = "fix tests with pygments 2.14";
url = "https://sources.debian.org/data/main/h/hovercraft/2.7-5/debian/patches/0003-Fix-tests-with-pygments-2.14.patch";
sha256 = "sha256-qz4Kp4MxlS3KPKRB5/VESCI++66U9q6cjQ0cHy3QjTc=";
})
];
meta = with lib; {
description = "Makes impress.js presentations from reStructuredText";

View file

@ -10,11 +10,11 @@
}:
let
pname = "jetbrains-toolbox";
version = "2.0.5.17700";
version = "2.1.0.18144";
src = fetchzip {
url = "https://download.jetbrains.com/toolbox/jetbrains-toolbox-${version}.tar.gz";
sha256 = "sha256-BO9W9miQUltsg1tCyTl9j5xRCJUCsO02hUKDCYt7hd8=";
sha256 = "sha256-K65naW+RWAy4uxQq2GQmL0kwCH+G73ez1kgTtnTwjEw=";
stripRoot = false;
};

View file

@ -1,38 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce78a9d..3cd51e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,18 +8,21 @@ list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
# Common configuration
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-# Setup Conan
-if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
- message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
- file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
- "${CMAKE_BINARY_DIR}/conan.cmake"
- TLS_VERIFY ON)
-endif()
-include(${CMAKE_BINARY_DIR}/conan.cmake)
-
-conan_cmake_autodetect(settings)
-conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
+set(USE_CONAN ON CACHE BOOL "Use conan for dependency managment")
+
+if(USE_CONAN)
+ # Setup Conan
+ if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
+ message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
+ file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
+ "${CMAKE_BINARY_DIR}/conan.cmake"
+ TLS_VERIFY ON)
+ endif()
+ include(${CMAKE_BINARY_DIR}/conan.cmake)
+
+ conan_cmake_autodetect(settings)
+ conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
+endif ()
# Setup Qt
set(CMAKE_AUTOMOC ON)

View file

@ -1,13 +1,16 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, magic-enum
, range-v3
, spdlog
, qtbase
, qtconnectivity
, qttools
, qtlanguageserver
, qtwayland
, wrapQtAppsHook
, libXScrnSaver
, nix-update-script
@ -15,15 +18,24 @@
stdenv.mkDerivation rec {
pname = "kemai";
version = "0.9.2";
version = "0.10.0";
src = fetchFromGitHub {
owner = "AlexandrePTJ";
repo = "kemai";
rev = version;
hash = "sha256-PDjNO2iMPK0J3TSHVZ/DW3W0GkdB8yNZYoTGEd2snac=";
hash = "sha256-wclBAgeDyAIw/nGF6lzIwbwdoZMBTu+tjxsnIxIkODM=";
};
patches = [
# Backport the fix for an issue where LICENSE.txt ends up in /bin
# Remove in next release
(fetchpatch {
url = "https://github.com/AlexandrePTJ/kemai/commit/e279679dd7308efebe004252d168d7308f3b99ce.patch";
hash = "sha256-5cmRRMVATf4ul4HhaQKiE0yTN2qd+MfNFQzGTLLpOyg=";
})
];
buildInputs = [
qtbase
qtconnectivity
@ -31,10 +43,14 @@ stdenv.mkDerivation rec {
qtlanguageserver
libXScrnSaver
magic-enum
range-v3
spdlog
] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
cmakeFlags = [
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
"-DFETCHCONTENT_QUIET=OFF"
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
];
cmakeFlags = [ "-DUSE_CONAN=OFF" ];
patches = [ ./000-cmake-disable-conan.diff ];
nativeBuildInputs = [ cmake wrapQtAppsHook ];
@ -48,5 +64,7 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ poelzi ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
mainProgram = "Kemai";
};
}

View file

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "moonlight-embedded";
version = "2.6.1";
version = "2.6.2";
src = fetchFromGitHub {
owner = "moonlight-stream";
repo = "moonlight-embedded";
rev = "v${version}";
sha256 = "sha256-/gRm3fViTpoTOkIEu6+mrGTVTAFTmwdWV0MKoFF5vkc=";
sha256 = "sha256-57gD8vyUk4+eJB+QkD+hZzyzM+Lhvue1mY7xSApYWn8=";
fetchSubmodules = true;
};

View file

@ -28,13 +28,13 @@ let
in
stdenv.mkDerivation rec {
pname = "pwsafe";
version = "1.17.0"; # do NOT update to 3.x Windows releases
version = "1.18.0"; # do NOT update to 3.x Windows releases
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
hash = "sha256-C1mt9MklZoQNzs6zhk9CskeA4FfDsBVHNx/LRaqxWiI=";
hash = "sha256-2n3JJ/DPhJpNOyviYpqQQl83IAZnmnH5w7b/pOGU8K8=";
};
strictDeps = true;

View file

@ -1,45 +1,38 @@
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_25, libsecret }:
stdenv.mkDerivation rec {
{ lib, appimageTools, fetchurl, asar }: let
pname = "todoist-electron";
version = "8.6.0";
version = "8.9.3";
src = fetchurl {
url = "https://electron-dl.todoist.com/linux/Todoist-linux-x86_64-${version}.AppImage";
hash = "sha256-LjztKgpPm4RN1Pn5gIiPg8UCO095kzTQ9BTEG5Rlv10=";
hash = "sha256-L1uH5bnJ66QxAXs7yywG4H/FaunwTX1l+tVtRe2nxdc=";
};
appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};
appimageContents = (appimageTools.extract { inherit pname version src; }).overrideAttrs (oA: {
buildCommand = ''
${oA.buildCommand}
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
# Get rid of the autoupdater
${asar}/bin/asar extract $out/resources/app.asar app
sed -i 's/async isUpdateAvailable.*/async isUpdateAvailable(updateInfo) { return false;/g' app/node_modules/electron-updater/out/AppUpdater.js
${asar}/bin/asar pack app $out/resources/app.asar
'';
});
nativeBuildInputs = [ makeWrapper ];
in appimageTools.wrapAppImage {
inherit pname version;
src = appimageContents;
installPhase = ''
runHook preInstall
extraPkgs = { pkgs, ... }@args: [
pkgs.hidapi
] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
mkdir -p $out/bin $out/share/${pname} $out/share/applications $out/share/icons/hicolor/512x512
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/todoist.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons/hicolor/512x512/apps $out/share/icons/hicolor/512x512
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron_25}/bin/electron $out/bin/todoist-electron \
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc libsecret ]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
extraInstallCommands = ''
# Add desktop convencience stuff
mv $out/bin/{${pname}-*,${pname}}
install -Dm444 ${appimageContents}/todoist.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/todoist.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/todoist.desktop \
--replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
'';
meta = with lib; {
@ -47,6 +40,6 @@ stdenv.mkDerivation rec {
description = "The official Todoist electron app";
platforms = [ "x86_64-linux" ];
license = licenses.unfree;
maintainers = with maintainers; [ i077 kylesferrazza ];
maintainers = with maintainers; [ kylesferrazza pokon548 ];
};
}

View file

@ -503,6 +503,9 @@ buildStdenv.mkDerivation {
preBuild = ''
cd mozobj
'' + lib.optionalString (lib.versionAtLeast version "120") ''
# https://bugzilla.mozilla.org/show_bug.cgi?id=1864083
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
'';
postBuild = ''

View file

@ -30,11 +30,11 @@
firefox-beta = buildMozillaMach rec {
pname = "firefox-beta";
version = "119.0b9";
version = "120.0b9";
applicationName = "Mozilla Firefox Beta";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "11d07474e3ca72a4e2f60053882e09a215e0d29d6830d0cd41447bb67370118356090af7adcbacd7703ad9fcdda83c9f909419c86b8f3bf2eacd9ca3d3aa3f54";
sha512 = "7ac5562ce393ea84663eac5c6ee1a0ca527ff4a8a9ec6aaaef37213ff071076846949e80af21d95ec8e32d3cbc740b772a9d7cc54965b7bbc8e015da22ae927f";
};
meta = {
@ -58,12 +58,12 @@
firefox-devedition = (buildMozillaMach rec {
pname = "firefox-devedition";
version = "119.0b9";
version = "120.0b9";
applicationName = "Mozilla Firefox Developer Edition";
branding = "browser/branding/aurora";
src = fetchurl {
url = "mirror://mozilla/devedition/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "ce3e2adb3171aa05c7af3b7a4ea25eaafbc109c522b90e26aad577192a0902000fb7d705fa5707a9a7d0be2ab1c0cddc5a98abbe6549e1377c0a1d765bda62eb";
sha512 = "07bf1a58550e70c683719adef55fa3d1ee06876e0cb086c28242879c683269c4aa784b1dce639218b3ad24a546192088fe5224a52e13a0086f205ec5470e2428";
};
meta = {

View file

@ -1,15 +1,15 @@
{
"packageVersion": "119.0-5",
"packageVersion": "119.0.1-1",
"source": {
"rev": "119.0-5",
"sha256": "0ql4i6b4fvydiyscj8ki2pnzr67bmb3azpdm6kk5y8yyw2697230"
"rev": "119.0.1-1",
"sha256": "1ghxrylxrb5i37i4z2hrb8dn9lndhs75pjvhdafg079jmar5wfn7"
},
"settings": {
"rev": "9c862f06f970d69e00c1035e0d4774fb44fd84a6",
"sha256": "0ay58wrhfn0b56748phpn0ahz11ls9y8d2fd1z4zrj6dv398vlmb"
"rev": "095f50ed91aa7db2de9c67763cf46bae09146a58",
"sha256": "0nwrzcqxa72wcbxjbilxl340i69m5l0qr7gq2s6a76bbzxg502gi"
},
"firefox": {
"version": "119.0",
"sha512": "4b555c444add36567fd538752b122f227cf78bb70b72c79e6d8ae8d9c2e61c3cdacfae79c37970753b8b5c7716b28c686071eb7b551773c30a76852f3550676c"
"version": "119.0.1",
"sha512": "4f3201aee10e7b831cc384b2c7430a24f4de81f703115a917f9eb7acecb2ae1725f11af56c41257a056bb9d7a4d749d590cc9baffcd6e13852be45aaecf8163a"
}
}

View file

@ -18,7 +18,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "palemoon-bin";
version = "32.4.1";
version = "32.5.0";
src = fetchzip {
urls = [
@ -26,9 +26,9 @@ stdenv.mkDerivation (finalAttrs: {
"https://rm-us.palemoon.org/release/palemoon-${finalAttrs.version}.linux-x86_64-gtk${if withGTK3 then "3" else "2"}.tar.xz"
];
hash = if withGTK3 then
"sha256-c/rfnMpiLWqlNZppqPRNWXsgAQ1FofAdel5EFnK+mrY="
"sha256-1MJ5K9Zc/BHeQwwlq3XyUV8XTFEpPytNyTnsDpE1tBI="
else
"sha256-27njFdqq2DUctlz/UOtH5tlOduQNpoapuCYS+48K9dk=";
"sha256-xXunZTqoc2A+ilosRUUluxDwewD3xwITF5nb5Lbyv7Y=";
};
preferLocalBuild = true;

View file

@ -2,12 +2,12 @@
let
pname = "polypane";
version = "15.0.1";
version = "16.0.0";
src = fetchurl {
url = "https://github.com/firstversionist/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
name = "${pname}-${version}.AppImage";
sha256 = "sha256-CU5PI+9iBcxZdhhs2QjfZTViU2xQ3i+T+4Wzp+yeKEE=";
sha256 = "sha256-bxzLduesbeVhLuPcnIJmZaVi861gv44Oos9VB8m3TCs=";
};
appimageContents = appimageTools.extractType2 {

View file

@ -95,6 +95,7 @@ let
removed = name: date: throw "the ${name} terraform provider removed from nixpkgs on ${date}";
in
lib.optionalAttrs config.allowAliases {
fly = archived "fly" "2023/10";
ksyun = removed "ksyun" "2023/04";
};

View file

@ -425,15 +425,6 @@
"spdx": "MPL-2.0",
"vendorHash": "sha256-RqYzqKPzb5GcrzHnEDZC7GaBt1zP8g28Wo3WNAe07Ck="
},
"fly": {
"hash": "sha256-9QB2fbggCKcJz8tkSYgq/X8r+MB2M76VCWXgsHARTkU=",
"homepage": "https://registry.terraform.io/providers/fly-apps/fly",
"owner": "fly-apps",
"repo": "terraform-provider-fly",
"rev": "v0.0.23",
"spdx": "BSD-3-Clause",
"vendorHash": "sha256-f+Z6Y2WPxqJoHoCwuK6sgFa8nUnkW/WwrD55dtU0wtM="
},
"fortios": {
"hash": "sha256-RpcKMndbO3wbkHmrINkbsQ+UeFsZrQ7x02dv8ZpFMec=",
"homepage": "https://registry.terraform.io/providers/fortinetdev/fortios",

View file

@ -24,7 +24,7 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "flexget";
version = "3.9.16";
version = "3.9.18";
format = "pyproject";
# Fetch from GitHub in order to use `requirements.in`
@ -32,7 +32,7 @@ python.pkgs.buildPythonApplication rec {
owner = "Flexget";
repo = "Flexget";
rev = "refs/tags/v${version}";
hash = "sha256-p92wiQ01NBFs5910wngkNHnE/mOfs9XnOLUEOyk9VpA=";
hash = "sha256-Wxi6+6c/PK990YCoFKBMxJbYgMkS9y46hNIlkVhjbA4=";
};
postPatch = ''

View file

@ -21,11 +21,11 @@
python3.pkgs.buildPythonApplication rec {
pname = "gajim";
version = "1.8.2";
version = "1.8.3";
src = fetchurl {
url = "https://gajim.org/downloads/${lib.versions.majorMinor version}/gajim-${version}.tar.gz";
hash = "sha256-2GaBxY2o9qxpJbiPpl3PcPUPta4eEOp6rTteK4Xb95k=";
hash = "sha256-yyIs8TT6tNrqycgmYJVHdCQwUX5NlR2IHTW+Q+J9CIQ=";
};
format = "pyproject";

View file

@ -25,7 +25,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ intltool ];
buildInputs = [ pidgin gmime libxml2 nss ];
configureFlags = [ "--without-dbus" ];
configureFlags = [
"--without-dbus"
"--enable-quality-check=no"
];
enableParallelBuilding = true;
postInstall = "ln -s \$out/lib/purple-2 \$out/share/pidgin-sipe";

View file

@ -103,14 +103,14 @@ let
in
stdenv.mkDerivation rec {
pname = "telegram-desktop";
version = "4.11.5";
version = "4.11.6";
src = fetchFromGitHub {
owner = "telegramdesktop";
repo = "tdesktop";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-NkUm05bR5y5TAI5SL0en029n9903PzarQ6HC2vot27o=";
hash = "sha256-GV5jaC1chm4cq097/aP18Z4QemTO4tt8SBrdxCQYaS8=";
};
patches = [

View file

@ -48,23 +48,23 @@ let
# and often with different versions. We write them on three lines
# like this (rather than using {}) so that the updater script can
# find where to edit them.
versions.aarch64-darwin = "5.16.2.23409";
versions.x86_64-darwin = "5.16.2.23409";
versions.x86_64-linux = "5.16.5.303";
versions.aarch64-darwin = "5.16.6.24664";
versions.x86_64-darwin = "5.16.6.24664";
versions.x86_64-linux = "5.16.6.382";
srcs = {
aarch64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
name = "zoomusInstallerFull.pkg";
hash = "sha256-MUkxEj4G6MCCXcqyFquCrHhnu+sVw5H4HSk+sP5H+gY=";
hash = "sha256-5xccYYisVRZw7tJ6uri52BuaeURadaHypse4vjwPQIY=";
};
x86_64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
hash = "sha256-niR/WbMq7T1PBCJMK1DdhbFc4eJDgub8LIv3X4i8S5c=";
hash = "sha256-N3jzvxoRY3W5fw1Fs0qevgHC+7cLLYvoGA/ZYiE71JA=";
};
x86_64-linux = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
hash = "sha256-M+76HzqhPVxsP0nZOG4Oe8lnRJ9MJ2mE4+1hGvRkSUg=";
hash = "sha256-2O8jGQHGyF5XLQUxHUWA3h9K792lRQmOC2mS0rTukSw=";
};
};

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
{ lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
python3Packages.buildPythonPackage rec {
pname = "qnotero";
@ -46,6 +46,7 @@ python3Packages.buildPythonPackage rec {
homepage = "https://www.cogsci.nl/software/qnotero";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
broken = stdenv.isDarwin; # Build fails even after adding cx-freeze to `buildInputs`
maintainers = [ lib.maintainers.nico202 ];
};
}

View file

@ -15,13 +15,13 @@ assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation (finalAttrs: {
pname = "R";
version = "4.3.1";
version = "4.3.2";
src = let
inherit (finalAttrs) pname version;
in fetchurl {
url = "https://cran.r-project.org/src/base/R-${lib.versions.major version}/${pname}-${version}.tar.gz";
sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk=";
sha256 = "sha256-s/V2CsLu6AJqPw7vyyW0dyPZeAOO7o6ER2IJTIYMRSo=";
};
outputs = [ "out" "tex" ];

View file

@ -64,6 +64,9 @@ stdenv.mkDerivation rec {
url = "https://github.com/root-project/root/commit/c75458024082de0cc35b45505c652b8460a9e71b.patch";
sha256 = "sha256-A5zEjQE9OGPFp/L1HUs4NIdxQMRiwbwCRNWOLN2ENrM=";
})
# Backport Python 3.11 fix to v5 from v6.26
# https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc
./root5-python311-fix.patch
];
# https://github.com/root-project/root/issues/13216

View file

@ -0,0 +1,17 @@
diff --git a/bindings/pyroot/src/MethodProxy.cxx b/bindings/pyroot/src/MethodProxy.cxx
--- a/bindings/pyroot/src/MethodProxy.cxx
+++ b/bindings/pyroot/src/MethodProxy.cxx
@@ -4,10 +4,10 @@
// Bindings
#include "PyROOT.h"
#include "structmember.h" // from Python
-#if PY_VERSION_HEX >= 0x02050000
-#include "code.h" // from Python
-#else
+#if PY_VERSION_HEX < 0x02050000
#include "compile.h" // from Python
+#elif PY_VERSION_HEX < 0x030b0000
+#include "code.h" // from Python
#endif
#ifndef CO_NOFREE
// python2.2 does not have CO_NOFREE defined

View file

@ -5,14 +5,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "snakemake";
version = "7.29.0";
version = "7.32.4";
format = "setuptools";
src = fetchFromGitHub {
owner = "snakemake";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-UfUzvDo5OE1LGCBBGoDpxG96RKOaShbqu5TOOILG3AY=";
hash = "sha256-9KuMPqvM8ZCTuomc0R9MBxsK3KIpukDTrlwU6MHysK0=";
};
propagatedBuildInputs = with python3.pkgs; [
@ -49,6 +49,7 @@ python3.pkgs.buildPythonApplication rec {
pandas
pytestCheckHook
requests-mock
pillow
];
disabledTestPaths = [
@ -56,6 +57,8 @@ python3.pkgs.buildPythonApplication rec {
"tests/test_tes.py"
"tests/test_tibanna.py"
"tests/test_linting.py"
"tests/test_google_lifesciences.py"
"tests/test_conda_python_script/test_script.py"
];
disabledTests = [

View file

@ -7,6 +7,7 @@
, openssl
, installShellFiles
, dbus
, sudo
, Libsystem
, Cocoa
, Kernel
@ -29,20 +30,20 @@
with python3Packages;
buildPythonApplication rec {
pname = "kitty";
version = "0.30.1";
version = "0.31.0";
format = "other";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "kitty";
rev = "refs/tags/v${version}";
hash = "sha256-zjXwiRo6Jw3K0iDf05f04MCtg1qKABah7x07CwvW0/0=";
hash = "sha256-VWWuC4T0pyTgqPNm0gNL1j3FShU5b8S157C1dKLon1g=";
};
goModules = (buildGoModule {
pname = "kitty-go-modules";
inherit src version;
vendorHash = "sha256-KDqzcJbI2f91wlrjVWgUmut4nhXA/rO9q5q3FaDWnfc=";
vendorHash = "sha256-OyZAWefSIiLQO0icxMIHWH3BKgNas8HIxLcse/qWKcU=";
}).goModules;
buildInputs = [
@ -150,6 +151,9 @@ buildPythonApplication rec {
bashInteractive
zsh
fish
] ++ lib.optionals (!stdenv.isDarwin) [
# integration tests need sudo
sudo
];
# skip failing tests due to darwin sandbox

View file

@ -2,15 +2,15 @@
buildGoModule rec {
pname = "gitsign";
version = "0.7.1";
version = "0.8.0";
src = fetchFromGitHub {
owner = "sigstore";
repo = pname;
rev = "v${version}";
hash = "sha256-99JpuABkPHTNy9OpvRL7aIe1ZTrs2uZvxtxZf8346Ao=";
hash = "sha256-COgoj5MrX7VBwjgfH+Ud7gp0gE7gpsYoyd0Jv4uXoec=";
};
vendorHash = "sha256-+EKC/Up48EjwfVhLTpoxctWCSMDL0kLZaRPLBl0JGFQ=";
vendorHash = "sha256-btvFro0K0+9potwForIj/7h41l+LbUE0Gym9aHaWtEE=";
subPackages = [
"."

View file

@ -12,13 +12,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "media-downloader";
version = "3.4.0";
version = "4.0.0";
src = fetchFromGitHub {
owner = "mhogomchungu";
repo = "media-downloader";
rev = finalAttrs.version;
hash = "sha256-FTfkVD2uBfCBbP7fjjfG21bOGDVd2j6bhPLHGPm3xh4=";
hash = "sha256-ucANfu28Co88btr4YEBENuxkOOTL/9V5JdN8cRq944Q=";
};
nativeBuildInputs = [

View file

@ -19,6 +19,7 @@
, libuchardet
, libiconv
, xcbuild
, sigtool
, waylandSupport ? stdenv.isLinux
, wayland
@ -154,7 +155,7 @@ in stdenv'.mkDerivation (finalAttrs: {
pkg-config
python3
]
++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun ]
++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun sigtool ]
++ lib.optionals swiftSupport [ swift ]
++ lib.optionals waylandSupport [ wayland-scanner ];
@ -203,6 +204,11 @@ in stdenv'.mkDerivation (finalAttrs: {
postBuild = lib.optionalString stdenv.isDarwin ''
pushd .. # Must be run from the source dir because it uses relative paths
python3 TOOLS/osxbundle.py -s build/mpv
# Swap binary and bundle symlink to sign bundle executable as symlinks cannot be signed
rm build/mpv.app/Contents/MacOS/mpv-bundle
mv build/mpv.app/Contents/MacOS/mpv build/mpv.app/Contents/MacOS/mpv-bundle
ln -s mpv-bundle build/mpv.app/Contents/MacOS/mpv
codesign --force --sign - build/mpv.app/Contents/MacOS/mpv-bundle
popd
'';

View file

@ -97,7 +97,7 @@ let
'' + lib.optionalString stdenv.isDarwin ''
# wrapProgram can't operate on symlinks
rm "$out/Applications/mpv.app/Contents/MacOS/mpv"
makeWrapper "${mpv}/Applications/mpv.app/Contents/MacOS/mpv" "$out/Applications/mpv.app/Contents/MacOS/mpv" ${mostMakeWrapperArgs}
makeWrapper "${mpv}/Applications/mpv.app/Contents/MacOS/mpv-bundle" "$out/Applications/mpv.app/Contents/MacOS/mpv" ${mostMakeWrapperArgs}
'';
meta = {

View file

@ -3,8 +3,9 @@
, fetchFromGitHub
, rust
, rustPlatform
, cargo
, cmake
, makeWrapper
, cosmic-icons
, just
, pkg-config
, libxkbcommon
@ -19,13 +20,13 @@
, util-linuxMinimal
}:
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage rec {
pname = "cosmic-settings";
version = "unstable-2023-10-26";
src = fetchFromGitHub {
owner = "pop-os";
repo = "cosmic-settings";
repo = pname;
rev = "d15ebbd340dee7adf184831311b5da73faaa80f5";
hash = "sha256-OlQ2jjT/ygO+hpl5Cc3h8Yp/SVo+pmI/EH7pqvY9GXI=";
};
@ -50,7 +51,7 @@ rustPlatform.buildRustPackage {
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
'';
nativeBuildInputs = [ cmake just pkg-config which lld util-linuxMinimal ];
nativeBuildInputs = [ cmake just pkg-config which lld util-linuxMinimal makeWrapper ];
buildInputs = [ libxkbcommon libinput fontconfig freetype wayland expat udev ];
dontUseJustBuild = true;
@ -64,6 +65,11 @@ rustPlatform.buildRustPackage {
"target/${rust.lib.toRustTargetSpecShort stdenv.hostPlatform}/release/cosmic-settings"
];
postInstall = ''
wrapProgram "$out/bin/cosmic-settings" \
--suffix XDG_DATA_DIRS : "${cosmic-icons}/share"
'';
meta = with lib; {
homepage = "https://github.com/pop-os/cosmic-settings";
description = "Settings for the COSMIC Desktop Environment";

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, mpi, lwgrp }:
stdenv.mkDerivation rec {
pname = "dtcmp";
version = "1.1.5";
src = fetchFromGitHub {
owner = "LLNL";
repo = "dtcmp";
rev = "v${version}";
hash = "sha256-Dc+c8JCc5D23CtpwiWkHCqngywEZXw7cYsRiSYiQdWk=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ lwgrp ];
configureFlags = [ "--with-lwgrp=${lib.getDev lwgrp}" ];
propagatedBuildInputs = [ mpi ];
meta = with lib; {
description = "MPI datatype comparison library";
homepage = "https://github.com/LLNL/dtcmp";
platforms = platforms.linux;
license = licenses.bsd3;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -0,0 +1,34 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, mpi
, lwgrp
}:
stdenv.mkDerivation rec {
pname = "libcircle";
version = "0.3";
src = fetchFromGitHub {
owner = "hpc";
repo = "libcircle";
rev = "v${version}";
hash = "sha256-EfnoNL6wo6qQES6XzMtpTpYcsJ8V2gy32i26wiTldH0=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
propagatedBuildInputs = [ mpi ];
meta = with lib; {
description = "API for distributing embarrassingly parallel workloads using self-stabilization";
homepage = "http://hpc.github.io/libcircle/";
platforms = platforms.linux;
license = licenses.bsd3;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -37,13 +37,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "llama-cpp";
version = "1469";
version = "1483";
src = fetchFromGitHub {
owner = "ggerganov";
repo = "llama.cpp";
rev = "refs/tags/b${finalAttrs.version}";
hash = "sha256-budBvpX2SnKekGTWHomvhW+4grB8EPd9OJbufNynHsc=";
hash = "sha256-TYklPkqwXLt+80FSHBDA2r3xTXlmgqB7sOt2mNnVNso=";
};
postPatch = ''

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchFromGitHub, mpi, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "lwgrp";
version = "1.0.5";
src = fetchFromGitHub {
owner = "LLNL";
repo = "lwgrp";
rev = "v${version}";
hash = "sha256-f0tYn9FbrOz8iMoG8Is8vYDNfYHTfxLKNnyxJA+Msdk=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook ];
propagatedBuildInputs = [ mpi ];
meta = with lib; {
description = "Data structures and operations to group MPI processes as an ordered set";
homepage = "https://github.com/LLNL/lwgrp";
platforms = platforms.linux;
license = licenses.bsd3;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -0,0 +1,56 @@
{ lib
, stdenvNoCC
, fetchzip
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "monaspace";
version = "1.000";
src = fetchzip {
url = "https://github.com/githubnext/monaspace/releases/download/v${finalAttrs.version}/monaspace-v${finalAttrs.version}.zip";
stripRoot = false;
hash = "sha256-H8NOS+pVkrY9DofuJhPR2OlzkF4fMdmP2zfDBfrk83A=";
};
outputs = [ "out" "woff" ];
installPhase = ''
runHook preInstall
pushd monaspace-v${finalAttrs.version}/fonts/
install -Dm644 otf/*.otf -t $out/share/fonts/opentype
install -Dm644 variable/*.ttf -t $out/share/fonts/truetype
install -Dm644 webfonts/*.woff -t $woff/share/fonts/woff
popd
runHook postInstall
'';
meta = {
description = "An innovative superfamily of fonts for code";
longDescription = ''
Since the earliest days of the teletype machine, code has been set in
monospaced typeletters, on a grid. Monaspace is a new type system that
advances the state of the art for the display of code on screen.
Every advancement in the technology of computing has been accompanied by
advancements to the display and editing of code. CRTs made screen editors
possible. The advent of graphical user interfaces gave rise to integrated
development environments.
Even today, we still have limited options when we want to layer additional
meaning on top of code. Syntax highlighting was invented in 1982 to help
children to code in BASIC. But beyond colors, most editors must
communicate with developers through their interfaceshovers, underlines,
and other graphical decorations.
Monaspace offers a more expressive palette for code and the tools we use
to work with it.
'';
homepage = "https://monaspace.githubnext.com/";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.all;
};
})

View file

@ -0,0 +1,47 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, mpi
, attr
, dtcmp
, libarchive
, libcircle
, bzip2
, openssl
}:
stdenv.mkDerivation rec {
pname = "mpifileutils";
version = "0.11.1";
src = fetchFromGitHub {
owner = "hpc";
repo = "mpifileutils";
rev = "v${version}";
hash = "sha256-3nls82awMMCwlfafsOy3AY8OvT9sE+BvvsDOY14YvQc=";
};
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
attr
dtcmp
libarchive
libcircle
bzip2
openssl
];
propagatedBuildInputs = [ mpi ];
meta = with lib; {
description = "Suite of MPI-based tools to manage large datasets";
homepage = "https://hpc.github.io/mpifileutils";
platforms = platforms.linux;
license = licenses.bsd3;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -11,12 +11,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "nncp";
version = "8.9.0";
version = "8.10.0";
outputs = [ "out" "doc" "info" ];
src = fetchurl {
url = "http://www.nncpgo.org/download/nncp-${finalAttrs.version}.tar.xz";
hash = "sha256-JZ+svDNU7cwW58ZOJ4qszbR/+j7Cr+oLNig/RqqCS10=";
sha256 = "154e13ba15c0ea93f54525793b0699e496b2db7281e1555f08d785a528f3f7fc";
};
nativeBuildInputs = [

View file

@ -0,0 +1,35 @@
{ stdenv
, lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "oauth2l";
version = "1.3.0";
src = fetchFromGitHub {
owner = "google";
repo = "oauth2l";
rev = "v${version}";
hash = "sha256-bL1bys/CBo/P9VfWc/FB8JHW/aBwC521V8DB1sFBIAA=";
};
vendorHash = null;
ldflags = [ "-s" "-w" ];
# Fix tests by preventing them from writing to /homeless-shelter.
preCheck = "export HOME=$(mktemp -d)";
# tests fail on linux for some reason
doCheck = stdenv.isDarwin;
meta = with lib; {
description = "Simple CLI for interacting with Google API authentication";
homepage = "https://github.com/google/oauth2l";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
mainProgram = "oauth2l";
};
}

View file

@ -22,7 +22,7 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "triton-llvm";
pname = "openai-triton-llvm";
version = "14.0.6-f28c006a5895";
outputs = [

View file

@ -0,0 +1,20 @@
{ seclists
, stdenvNoCC
}:
stdenvNoCC.mkDerivation {
pname = "rockyou";
inherit (seclists) version src;
installPhase = ''
runHook preInstall
mkdir -p $out/share/wordlists/
tar -xvzf ${seclists}/share/wordlists/seclists/Passwords/Leaked-Databases/rockyou.txt.tar.gz -C $out/share/wordlists/
runHook postInstall
'';
meta = seclists.meta // {
description = "A famous wordlist often used for brute force attacks";
};
}

View file

@ -0,0 +1,34 @@
{ lib
, fetchFromGitHub
, stdenvNoCC
}:
stdenvNoCC.mkDerivation {
pname = "seclists";
version = "2023.2";
src = fetchFromGitHub {
owner = "danielmiessler";
repo = "SecLists";
rev = "2023.2";
hash = "sha256-yVxb5GaQDuCsyjIV+oZzNUEFoq6gMPeaIeQviwGdAgY=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/wordlists/seclists
find . -maxdepth 1 -type d -regextype posix-extended -regex '^./[A-Z].*' -exec cp -R {} $out/share/wordlists/seclists \;
find $out/share/wordlists/seclists -name "*.md" -delete
runHook postInstall
'';
meta = with lib; {
description = "A collection of multiple types of lists used during security assessments, collected in one place";
homepage = "https://github.com/danielmiessler/seclists";
license = licenses.mit;
maintainers = with maintainers; [ tochiaha janik pamplemousse ];
};
}

View file

@ -14,16 +14,16 @@
rustPlatform.buildRustPackage rec {
pname = "uiua";
version = "0.1.0";
version = "0.2.0";
src = fetchFromGitHub {
owner = "uiua-lang";
repo = "uiua";
rev = version;
hash = "sha256-ZoiT7Yf8Mdwh2vBkRCDxhkbvTkekhTopFNWjUnyoPUQ=";
hash = "sha256-RAMQC9weEvTV44nAXjwMYv+4O5aSNNM5UOf/xBb4SBE=";
};
cargoHash = "sha256-My/15zNfEqt+a0jganS6LfFiEXENUaPTcyz6SBL0oKo=";
cargoHash = "sha256-ZBedAIHwbRiR9i6w0CWIiE+OJvTkmxiEihn7zLAV/Dg=";
nativeBuildInputs = lib.optionals stdenv.isDarwin [
rustPlatform.bindgenHook

View file

@ -0,0 +1,42 @@
{ lib
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "websecprobe";
version = "0.0.10";
pyproject = true;
src = fetchPypi {
pname = "WebSecProbe";
inherit version;
hash = "sha256-QvXOyQUptMyim/bgvhihjgGs7vX0qX8MqK2ol8q9ePc=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
wheel
];
propagatedBuildInputs = with python3.pkgs; [
requests
tabulate
];
postInstall = ''
mv $out/bin/WebSecProbe $out/bin/$pname
'';
pythonImportsCheck = [
"WebSecProbe"
];
meta = with lib; {
description = "Web Security Assessment Tool";
homepage = "https://github.com/spyboy-productions/WebSecProbe/";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "websecprobe";
};
}

View file

@ -0,0 +1,70 @@
{ lib
, callPackage
, nmap
, rockyou
, runtimeShell
, seclists
, symlinkJoin
, tree
, wfuzz
, lists ? [
nmap
rockyou
seclists
wfuzz
]
}:
symlinkJoin rec {
pname = "wordlists";
version = "unstable-2023-10-10";
name = "${pname}-${version}";
paths = lists;
postBuild = ''
mkdir -p $out/bin
# Create a command to show the location of the links.
cat >> $out/bin/wordlists << __EOF__
#!${runtimeShell}
${tree}/bin/tree ${placeholder "out"}/share/wordlists
__EOF__
chmod +x $out/bin/wordlists
# Create a handy command for easy access to the wordlists.
# e.g.: `cat "$(wordlists_path)/rockyou.txt"`, or `ls "$(wordlists_path)/dirbuster"`
cat >> $out/bin/wordlists_path << __EOF__
#!${runtimeShell}
printf "${placeholder "out"}/share/wordlists\n"
__EOF__
chmod +x $out/bin/wordlists_path
'';
meta = with lib; {
description = "A collection of wordlists useful for security testing";
longDescription = ''
The `wordlists` package provides two scripts. One is called {command}`wordlists`,
and it will list a tree of all the wordlists installed. The other one is
called {command}`wordlists_path` which will print the path to the nix store
location of the lists. You can for example do
{command}`$(wordlists_path)/rockyou.txt` to get the location of the
[rockyou](https://en.wikipedia.org/wiki/RockYou#Data_breach)
wordlist. If you want to modify the available wordlists you can override
the `lists` attribute`. In your nixos configuration this would look
similiar to this:
```nix
environment.systemPackages = [
(pkgs.wordlists.override { lists = with pkgs; [ rockyou ] })
]
```
you can use this with nix-shell by doing:
{command}`nix-shell -p 'wordlists.override { lists = with (import <nixpkgs> {}); [ nmap ]; }'
If you want to add a new package that provides wordlist/s the convention
is to copy it to {file}`$out/share/wordlists/myNewWordlist`.
'';
maintainers = with maintainers; [ janik pamplemousse ];
};
}

View file

@ -0,0 +1,77 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, jdupes
, adwaita-icon-theme
, hicolor-icon-theme
, numix-icon-theme-circle
, gitUpdater
, allColorVariants ? false
, colorVariants ? []
}:
let
pname = "reversal-icon-theme";
in
lib.checkListOfEnum "${pname}: color variants" [ "-blue" "-red" "-pink" "-purple" "-green" "-orange" "-brown" "-grey" "-black" "-cyan" ] colorVariants
stdenvNoCC.mkDerivation rec {
inherit pname;
version = "unstable-2023-05-13";
src = fetchFromGitHub {
owner = "yeyushengfan258";
repo = pname;
rev = "bdae2ea365731b25a869fc2c8c6a1fb849eaf5b2";
hash = "sha256-Cd+1ggyS+Y2Sk8w5zifc4IFOwbFrbjL6S6awES/W0EE=";
};
nativeBuildInputs = [
gtk3
jdupes
];
propagatedBuildInputs = [
adwaita-icon-theme
hicolor-icon-theme
numix-icon-theme-circle
];
dontDropIconThemeCache = true;
# These fixup steps are slow and unnecessary for this package.
# Package may install many small files.
dontPatchELF = true;
dontRewriteSymlinks = true;
postPatch = ''
patchShebangs install.sh
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons
name= ./install.sh \
${if allColorVariants then "-a" else builtins.toString colorVariants} \
-d $out/share/icons
rm $out/share/icons/*/{AUTHORS,COPYING}
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "A colorful Design Rectangle icon theme";
homepage = "https://github.com/yeyushengfan258/Reversal-icon-theme";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ romildo ];
};
}

View file

@ -19,18 +19,18 @@ mkDerivation rec {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "0gcvyn7aabdz5yj0jzv14hlgjgbm8d9ib5r73i842f0hv4cv9m0q";
hash = "sha256-GNS0GdkQOEFQHCeXFVNDdT35KCRhfwmkL78tpY71mz0=";
};
nativeBuildInputs = [
cmake
pkg-config
lxqt.lxqt-build-tools
qttools
];
buildInputs = [
qtbase
qttools
libconfig
];

View file

@ -18,6 +18,7 @@ let
lxqt-admin = callPackage ./lxqt-admin {};
lxqt-config = callPackage ./lxqt-config {};
lxqt-globalkeys = callPackage ./lxqt-globalkeys {};
lxqt-menu-data = callPackage ./lxqt-menu-data {};
lxqt-notificationd = callPackage ./lxqt-notificationd {};
lxqt-openssh-askpass = callPackage ./lxqt-openssh-askpass {};
lxqt-policykit = callPackage ./lxqt-policykit {};
@ -26,7 +27,7 @@ let
lxqt-session = callPackage ./lxqt-session {};
lxqt-sudo = callPackage ./lxqt-sudo {};
lxqt-themes = callPackage ./lxqt-themes {};
pavucontrol-qt = libsForQt5.callPackage ./pavucontrol-qt {};
pavucontrol-qt = callPackage ./pavucontrol-qt {};
qtermwidget = callPackage ./qtermwidget {};
### CORE 2
@ -36,7 +37,7 @@ let
### OPTIONAL
qterminal = callPackage ./qterminal {};
compton-conf = qt5.callPackage ./compton-conf {};
compton-conf = callPackage ./compton-conf {};
obconf-qt = callPackage ./obconf-qt {};
lximage-qt = callPackage ./lximage-qt {};
qps = callPackage ./qps {};
@ -50,7 +51,6 @@ let
libsForQt5.libkscreen # provides plugins for screen management software
pkgs.libfm
pkgs.libfm-extra
pkgs.lxmenu-data
pkgs.menu-cache
pkgs.openbox # default window manager
qt5.qtsvg # provides QT5 plugins for svg icons
@ -68,6 +68,7 @@ let
lxqt-admin
lxqt-config
lxqt-globalkeys
lxqt-menu-data
lxqt-notificationd
lxqt-openssh-askpass
lxqt-policykit

View file

@ -4,6 +4,7 @@
, cmake
, pkg-config
, lxqt-build-tools
, lxqt-menu-data
, pcre
, libexif
, xorg
@ -16,29 +17,30 @@
mkDerivation rec {
pname = "libfm-qt";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = "libfm-qt";
rev = version;
sha256 = "MK1QMYfr0T/cE46IUWarG9a/PJUSSskk1W3y2+kvEwg=";
hash = "sha256-QxPYSA7537K+/dRTxIYyg+Q/kj75rZOdzlUsmSdQcn4=";
};
nativeBuildInputs = [
cmake
pkg-config
lxqt-build-tools
qttools
];
buildInputs = [
lxqt-menu-data
pcre
libexif
xorg.libpthreadstubs
xorg.libxcb
xorg.libXdmcp
qtx11extras
qttools
libfm
menu-cache
];

View file

@ -15,23 +15,23 @@
mkDerivation rec {
pname = "liblxqt";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "Ug6LmDxynSDLWykZhnih2F9lT34aOlU0ewM88PX+5Ms=";
hash = "sha256-daD4okYc4J2nRrO6423W0IUK9173zcepCvvMtx7Vho4=";
};
nativeBuildInputs = [
cmake
lxqt-build-tools
qttools
];
buildInputs = [
qtx11extras
qttools
qtsvg
polkit-qt
kwindowsystem

View file

@ -10,13 +10,13 @@
mkDerivation rec {
pname = "libqtxdg";
version = "3.11.0";
version = "3.12.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "b3XR0Tn/roiCjNGb3EMf4ilECNaUjGYi11ykVBppBuc=";
hash = "sha256-y+3noaHubZnwUUs8vbMVvZPk+6Fhv37QXUb//reedCU=";
};
nativeBuildInputs = [

View file

@ -16,7 +16,7 @@ mkDerivation rec {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "0z2r8041vqssm59lkb3ka7qis9br4wvavxzd45m3pnqlp7wwhkbn";
hash = "sha256-dk3I+bkU2ztqIe33rTYneSUd8VFzrElTqVrjHQhAWXw=";
};
nativeBuildInputs = [

View file

@ -18,24 +18,24 @@
mkDerivation rec {
pname = "lximage-qt";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "afCW3VeXAq2HYc4fjSrd+7j6cGoHmGlO8jCiNq6/F3E=";
hash = "sha256-Igfd8lhKDjdseQeARiirj+tEoJdcaeHuyd4mfQHOVg0=";
};
nativeBuildInputs = [
cmake
pkg-config
lxqt-build-tools
qttools
];
buildInputs = [
qtbase
qttools
qtx11extras
qtsvg
qtimageformats # add-on module to support more image file formats

View file

@ -14,23 +14,23 @@
mkDerivation rec {
pname = "lxqt-about";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "Dm4WFtF0O7MgAvwYBI/1DkY9MhneI+QSM+wRp4JlD+o=";
hash = "sha256-FA9xvIi45qpD6iGxiiNKNlcLKzJtb0cWmvDBJRnJFwA=";
};
nativeBuildInputs = [
cmake
lxqt-build-tools
qttools
];
buildInputs = [
qtx11extras
qttools
qtsvg
kwindowsystem
liblxqt

View file

@ -15,23 +15,23 @@
mkDerivation rec {
pname = "lxqt-admin";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "glSxrSCr56lpdWca9q8hgnMcW22DNdsIyBzxPmQXQOY=";
hash = "sha256-wPK3TMBC359GnisjpdY2zU+Jnvr7Hdzb6r+HuUQC3mo=";
};
nativeBuildInputs = [
cmake
lxqt-build-tools
qttools
];
buildInputs = [
qtx11extras
qttools
qtsvg
kwindowsystem
liblxqt

View file

@ -16,19 +16,20 @@
mkDerivation rec {
pname = "lxqt-archiver";
version = "0.8.0";
version = "0.9.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = "lxqt-archiver";
rev = version;
sha256 = "C38c/jCyRur7jQSgU2ByasCQnollHgy3/mUoNv61OCU=";
hash = "sha256-8pfUpyjn01D8CL+2PjGkZqyHu+lpHZIXlXn67rZoxMY=";
};
nativeBuildInputs = [
cmake
pkg-config
lxqt-build-tools
qttools
];
buildInputs = [
@ -37,7 +38,6 @@ mkDerivation rec {
libfm-qt
menu-cache
qtbase
qttools
qtx11extras
];

View file

@ -18,7 +18,7 @@ mkDerivation rec {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "4/hVlEdqqqd6CNitCRkIzsS1R941vPJdirIklp4acXA=";
hash = "sha256-4/hVlEdqqqd6CNitCRkIzsS1R941vPJdirIklp4acXA=";
};
postPatch = ''

View file

@ -1,11 +1,11 @@
{ lib
, mkDerivation
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, glib
, lxqt-build-tools
, lxqt-menu-data
, qtbase
, qtx11extras
, qttools
@ -21,31 +21,32 @@
mkDerivation rec {
pname = "lxqt-config";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "lxqt";
repo = pname;
rev = version;
sha256 = "Gm/Y/5i7Abob9eRdLZHpRma2+Mdh2LBZUGKM4mMZMFk=";
hash = "sha256-ypHjUYRtrWx1Cp9KGSqsWpRHg7zoV0YDW6P4amJKapI=";
};
nativeBuildInputs = [
cmake
pkg-config
lxqt-build-tools
qttools
];
buildInputs = [
glib.bin
qtbase
qtx11extras
qttools
qtsvg
kwindowsystem
libkscreen
liblxqt
libqtxdg
lxqt-menu-data
xorg.libpthreadstubs
xorg.libXdmcp
xorg.libXScrnSaver

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