Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-11-10 12:01:27 +00:00 committed by GitHub
commit f3a93620b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 1122 additions and 64 deletions

View File

@ -22,6 +22,7 @@
<xi:include href="./libxml2.section.xml" />
<xi:include href="./meson.section.xml" />
<xi:include href="./ninja.section.xml" />
<xi:include href="./patch-rc-path-hooks.section.xml" />
<xi:include href="./perl.section.xml" />
<xi:include href="./pkg-config.section.xml" />
<xi:include href="./postgresql-test-hook.section.xml" />

View File

@ -0,0 +1,50 @@
# `patchRcPath` hooks {#sec-patchRcPathHooks}
These hooks provide shell-specific utilities (with the same name as the hook) to patch shell scripts meant to be sourced by software users.
The typical usage is to patch initialisation or [rc](https://unix.stackexchange.com/questions/3467/what-does-rc-in-bashrc-stand-for) scripts inside `$out/bin` or `$out/etc`.
Such scripts, when being sourced, would insert the binary locations of certain commands into `PATH`, modify other environment variables or run a series of start-up commands.
When shipped from the upstream, they sometimes use commands that might not be available in the environment they are getting sourced in.
The compatible shells for each hook are:
- `patchRcPathBash`: [Bash](https://www.gnu.org/software/bash/), [ksh](http://www.kornshell.org/), [zsh](https://www.zsh.org/) and other shells supporting the Bash-like parameter expansions.
- `patchRcPathCsh`: Csh scripts, such as those targeting [tcsh](https://www.tcsh.org/).
- `patchRcPathFish`: [Fish](https://fishshell.com/) scripts.
- `patchRcPathPosix`: POSIX-conformant shells supporting the limited parameter expansions specified by the POSIX standard. Current implementation uses the parameter expansion `${foo-}` only.
For each supported shell, it modifies the script with a `PATH` prefix that is later removed when the script ends.
It allows nested patching, which guarantees that a patched script may source another patched script.
Syntax to apply the utility to a script:
```sh
patchRcPath<shell> <file> <PATH-prefix>
```
Example usage:
Given a package `foo` containing an init script `this-foo.fish` that depends on `coreutils`, `man` and `which`,
patch the init script for users to source without having the above dependencies in their `PATH`:
```nix
{ lib, stdenv, patchRcPathFish}:
stdenv.mkDerivation {
# ...
nativeBuildInputs = [
patchRcPathFish
];
postFixup = ''
patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]}
'';
}
```
::: {.note}
`patchRcPathCsh` and `patchRcPathPosix` implementation depends on `sed` to do the string processing.
The others are in vanilla shell and have no third-party dependencies.
:::

View File

@ -2773,6 +2773,12 @@
githubId = 40290417;
name = "Seb Blair";
};
considerate = {
email = "viktor.kronvall@gmail.com";
github = "considerate";
githubId = 217918;
name = "Viktor Kronvall";
};
copumpkin = {
email = "pumpkingod@gmail.com";
github = "copumpkin";

View File

@ -1367,10 +1367,20 @@ signald -d /var/lib/signald/db \
</listitem>
<listitem>
<para>
boot.kernel.sysctl is defined as a freeformType and adds a
custom merge option for <quote>net.core.rmem_max</quote>
(taking the highest value defined to avoid conflicts between 2
services trying to set that value)
<literal>boot.kernel.sysctl</literal> is defined as a
freeformType and adds a custom merge option for
<quote>net.core.rmem_max</quote> (taking the highest value
defined to avoid conflicts between 2 services trying to set
that value).
</para>
</listitem>
<listitem>
<para>
The <literal>mame</literal> package does not ship with its
tools anymore in the default output. They were moved to a
separate <literal>tools</literal> output instead. For
convenience, <literal>mame-tools</literal> package was added
for those who want to use it.
</para>
</listitem>
</itemizedlist>

View File

@ -414,6 +414,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
- The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies.
- boot.kernel.sysctl is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value)
- `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value).
- The `mame` package does not ship with its tools anymore in the default output. They were moved to a separate `tools` output instead. For convenience, `mame-tools` package was added for those who want to use it.
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@ -18,17 +18,17 @@ let
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "1dcp6r78kaq3wzcw7dfra59kfpdzqy9qnlyp1ywayxh610ryjyfc";
x86_64-darwin = "0ypxjh5z0v83y0wb22m942qqlvx5df7k4dk8ip9wqd4p7h8540q8";
aarch64-linux = "1qq4zg0j3rpx06cqaic7a1x7ckk5wf8w1gp5y8hwhvkym4s8g4i7";
aarch64-darwin = "18hrsvr7hgmlpi64dbk581i516my6c5zwz6g8awp4fhxilk0wbrg";
armv7l-linux = "1y357ci4gllxg26m5qdv9652i5rra5vj972l7kdnxiimfgm6h83b";
x86_64-linux = "1m5mz6wdrivqrw699iivvh62bdn4yzm6hmph455sdyvk5icq59dq";
x86_64-darwin = "1zn0h9p05kb3fcn816fpxh8asaglycjmpiwkrmxd0s8jwjq7m4gn";
aarch64-linux = "1gs810iz08jxqfhcgi6ab41m46ib5h3m7i3pnyvlimxx99r5lirf";
aarch64-darwin = "1dvasr1h28snxi33m6yx95pp3jd4irwy6yav4ilwrcl22cf6ybvi";
armv7l-linux = "1j5vrpdaqihcr02pdsd5nz07zsk0027xmkfp30npnjy1gjrjvnim";
}.${system} or throwSystem;
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.73.0";
version = "1.73.1";
pname = "vscode";
executableName = "code" + lib.optionalString isInsiders "-insiders";

View File

@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-im6y/E0pQxruX2kNXZLE3fHq+zXfsstnOoC1QvH4fd4=";
};
outputs = [ "out" "tools" ];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
@ -138,21 +140,33 @@ stdenv.mkDerivation rec {
runHook preInstall
make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"}
# mame
mkdir -p ${dest}
mv build/release/*/Release/mame/* ${dest}
mkdir -p $out/bin
find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \;
install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
find ${dest} -maxdepth 1 -executable -type f -delete;
install -Dm755 mame -t $out/bin
install -Dm644 ${icon} $out/share/icons/hicolor/scalable/apps/mame.svg
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
mv artwork plugins samples ${dest}
# mame-tools
for _i in castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav pngcmp regrep romcmp \
split srcclean testkeys unidasm; do
install -Dm755 $_i -t $tools/bin
done
mv $tools/bin/{,mame-}split
runHook postInstall
'';
postFixup = ''
mkdir -p $tools/share/man
mv {$out,$tools}/share/man/man1
'';
enableParallelBuilding = true;
passthru.updateScript = writeScript "mame-update-script" ''

View File

@ -1,7 +1,7 @@
{
"version": "1.11.13",
"desktopSrcHash": "E8jpv7cJf8qdR4I3n7id5hUysAiMVvwyqUqHzGnVUJE=",
"desktopYarnHash": "1scp9y2lmah3n20f1kpc9paspd3qgslg129diis7g11cz4h0wyi5",
"webSrcHash": "985nxLIOZvrUX11AJDXYRMwC76/aP9ruSCqL47c7ZRM=",
"webYarnHash": "0bmjg9qhd89bdnh398lp257mxdgdd88wj5g3fmc3cavyd6hmgzbn"
"version": "1.11.14",
"desktopSrcHash": "91WCtb+ylVz9gSqOHb5GuSC1YZjDS3M8gdFIZYVls3c=",
"desktopYarnHash": "1ng9fwpwxsw91bzgd2kb2pdq927rkjv5rrrkmszvn55bj6ry7sqi",
"webSrcHash": "ss7Pmjg205EE/V/xIV7nvfZFRyyJfuB8MDM9dCnPckQ=",
"webYarnHash": "1v6qlk58msam9dglal4jzcyqcsrspa6idsdb8acjnscdkj26bkps"
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "clingo";
version = "5.6.1";
version = "5.6.2";
src = fetchFromGitHub {
owner = "potassco";
repo = "clingo";
rev = "v${version}";
sha256 = "sha256-blr2GPa/ZwVfvot6wUcQmdN/mLEox6tjIWtr0geeoDI=";
sha256 = "sha256-2vOscD5jengY3z9gHoY9y9y6RLfdzUj7BNKLyppNRac=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,14 +1,18 @@
{ stdenv
, lib
, callPackage
, fetchFromGitHub
, fetchpatch
, makeWrapper
, cmake
, coreutils
, git
, davix
, ftgl
, gl2ps
, glew
, gnugrep
, gnused
, gsl
, lapack
, libX11
@ -20,14 +24,18 @@
, libxcrypt
, libxml2
, llvm_9
, lsof
, lz4
, xz
, man
, openblas
, openssl
, pcre
, nlohmann_json
, pkg-config
, procps
, python
, which
, xxHash
, zlib
, zstd
@ -36,6 +44,9 @@
, libjpeg
, libtiff
, libpng
, patchRcPathCsh
, patchRcPathFish
, patchRcPathPosix
, tbb
, Cocoa
, CoreSymbolication
@ -61,6 +72,10 @@ stdenv.mkDerivation rec {
pname = "root";
version = "6.26.08";
passthru = {
tests = import ./tests { inherit callPackage; };
};
src = fetchFromGitHub {
owner = "root-project";
repo = "root";
@ -93,6 +108,9 @@ stdenv.mkDerivation rec {
libtiff
libpng
nlohmann_json
patchRcPathCsh
patchRcPathFish
patchRcPathPosix
python.pkgs.numpy
tbb
]
@ -195,6 +213,45 @@ stdenv.mkDerivation rec {
--set PYTHONPATH "$out/lib" \
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
done
# Make ldd and sed available to the ROOT executable
wrapProgram "$out/bin/root" --prefix PATH : "${lib.makeBinPath [
gnused # sed
stdenv.cc # c++ ld etc.
stdenv.cc.libc # ldd
]}"
# Patch thisroot.{sh,csh,fish}
# The main target of `thisroot.sh` is "bash-like shells",
# but it also need to support Bash-less POSIX shell like dash,
# as they are mentioned in `thisroot.sh`.
# `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28.
# See https://github.com/root-project/root/pull/10332
patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [
coreutils # dirname tail
gnugrep # grep
gnused # sed
lsof # lsof # for ROOT (>=6.28)
man # manpath
procps # ps # for ROOT (>=6.28)
which # which
]}"
patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [
coreutils
gnugrep
gnused
lsof # lsof # for ROOT (>=6.28)
man
which
]}"
patchRcPathFish "$out/bin/thisroot.fish" "${lib.makeBinPath [
coreutils
man
which
]}"
'';
setupHook = ./setup-hook.sh;

View File

@ -0,0 +1,4 @@
{ callPackage }:
{
test-thisroot = callPackage ./test-thisroot.nix { };
}

View File

@ -0,0 +1,49 @@
{ lib
, runCommand
, root
, bash
, fish
, ksh
, tcsh
, zsh
}: runCommand "test-thisroot"
{
meta = with lib; {
description = "Test for root thisroot.* sourcing";
maintainers = unique ((with maintainers; [ ShamrockLee ]) ++ root.meta.maintainers);
};
}
''
set -eu -o pipefail
declare -a shellNameArray shellOutpathArray sourcefileNameArray sourceCommandArray
shellNameArray=( bash zsh tcsh fish )
shellOutpathArray=( "${bash}" "${zsh}" "${tcsh}" "${fish}")
sourcefileNameArray=( thisroot.sh thisroot.sh thisroot.csh thisroot.fish )
sourceCommandArray=( "source" "source" "source" "source" )
debugFlagstrArray=( "-e" "-e" "-e" "" )
nShellToTest="''${#shellNameArray[@]}"
if [[ "''${#shellOutpathArray[@]}" -ne "$nShellToTest" ]] \
|| [[ "''${#sourcefileNameArray[@]}" -ne "$nShellToTest" ]] \
|| [[ "''${#sourceCommandArray[@]}" -ne "$nShellToTest" ]] \
|| [[ "''${#debugFlagstrArray[@]}" -ne "$nShellToTest" ]]
then
echo "error: Lengths of test parameter arrays doesn't match." >&2
exit 1
fi
typePExpect="${root}/bin/root"
for ((i=0; i<$nShellToTest; ++i)); do
tryCommand="''${sourceCommandArray[$i]} \"${root}/bin/''${sourcefileNameArray[$i]}\""
echo "Testing ''${shellNameArray[$i]} $tryCommand"
# Home directory for Fish
HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
binPATHGot="$(PATH="''${shellOutpathArray[$i]}/bin" HOME=$HOME_TEMP "''${shellNameArray[$i]}" ''${debugFlagstrArray[$i]} -c "$tryCommand && echo \"\$PATH\"")"
rm -r "$HOME_TEMP"
typePGot="$(PATH="$binPATHGot" type -p root)"
if [[ "$typePGot" != "$typePExpect" ]]; then
echo "error: Got PATH \"$binPATHGot\", in which the root executable path is \"$typePGot\". Expect root executable path \"$typePExpect\"." >&2
exit 1
fi
done
echo "test-thisroot pass!"
touch "$out"
''

View File

@ -0,0 +1,31 @@
{ capnproto
, lib
, fetchFromGitHub
, protobuf
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "conmon-rs";
version = "0.4.0";
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
sha256 = "sha256-VwVJWf9tKZ5rVF8tXDf35zsS2PipqC8FPbXUpOzsw/Y=";
};
nativeBuildInputs = [ capnproto protobuf ];
doCheck = false;
cargoSha256 = "sha256-zY9fsZK1C3HnCxeNA5dCbQQHYx3IVDMHCHYwFh5ev2k=";
meta = with lib; {
description = "An OCI container runtime monitor written in Rust";
homepage = "https://github.com/containers/conmon-rs";
license = licenses.asl20;
maintainers = with maintainers; [ ] ++ teams.podman.members;
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,60 @@
{ lib
, callPackage
, makeSetupHook
, gnused
}:
let
tests = import ./test { inherit callPackage; };
in
{
patchRcPathBash = makeSetupHook
{
name = "patch-rc-path-bash";
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script";
maintainers = with maintainers; [ ShamrockLee ];
};
passthru.tests = {
inherit (tests) test-bash;
};
} ./patch-rc-path-bash.sh;
patchRcPathCsh = makeSetupHook
{
name = "patch-rc-path-csh";
substitutions = {
sed = "${gnused}/bin/sed";
};
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a Csh script";
maintainers = with maintainers; [ ShamrockLee ];
};
passthru.tests = {
inherit (tests) test-csh;
};
} ./patch-rc-path-csh.sh;
patchRcPathFish = makeSetupHook
{
name = "patch-rc-path-fish";
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a Fish script";
maintainers = with maintainers; [ ShamrockLee ];
};
passthru.tests = {
inherit (tests) test-fish;
};
} ./patch-rc-path-fish.sh;
patchRcPathPosix = makeSetupHook
{
name = "patch-rc-path-posix";
substitutions = {
sed = "${gnused}/bin/sed";
};
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script";
maintainers = with maintainers; [ ShamrockLee ];
};
passthru.tests = {
inherit (tests) test-posix;
};
} ./patch-rc-path-posix.sh;
}

View File

@ -0,0 +1,50 @@
patchRcPathBash(){
local FILE_TO_PATCH="$1"
local SOURCETIME_PATH="$2"
local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to add to PATH the source-time utilities for Nixpkgs packaging
if [[ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]]; then
NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}"
fi
NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH"
if [[ -n "\$PATH" ]]; then
PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH"
else
PATH="\$NIXPKGS_SOURCETIME_PATH"
fi
export PATH
# End of lines to add to PATH source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
if [[ -n "\${PATH-}" ]]; then
# Remove the inserted section
PATH="\${PATH/\$NIXPKGS_SOURCETIME_PATH}"
# Remove the duplicated colons
PATH="\${PATH//::/:}"
# Remove the prefixing colon
if [[ -n "\$PATH" && "\${PATH:0:1}" == ":" ]]; then
PATH="\${PATH:1}"
fi
# Remove the trailing colon
if [[ -n "\$PATH" && "\${PATH:\${#PATH}-1}" == ":" ]]; then
PATH="\${PATH::}"
fi
export PATH
fi
if [[ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then
IFS="" read -r -d ";" NIXPKGS_SOURCETIME_PATH <<< "\$NIXPKGS_SOURCETIME_PATH_OLD"
NIXPKGS_SOURCETIME_PATH_OLD="\${NIXPKGS_SOURCETIME_PATH_OLD:\${#NIXPKGS_SOURCETIME_PATH}+1}"
else
unset NIXPKGS_SOURCETIME_PATH
fi
if [[ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then
unset NIXPKGS_SOURCETIME_PATH_OLD
fi
# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
rm "$FILE_TO_WORK_ON"
}

View File

@ -0,0 +1,57 @@
patchRcPathCsh(){
local FILE_TO_PATCH="$1"
local SOURCETIME_PATH="$2"
local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to add to PATH the source-time utilities for Nixpkgs packaging
if (\$?NIXPKGS_SOURCETIME_PATH) then
if ("\$NIXPKGS_SOURCETIME_PATH" != "") then
if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then
if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "")
set NIXPKGS_SOURCETIME_PATH_OLD = (\$NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD)
else
set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH
endif
else
set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH
endif
endif
endif
set NIXPKGS_SOURCETIME_PATH = "$SOURCETIME_PATH"
if (! \$?PATH) then
setenv PATH ""
endif
if ("\$PATH" != "") then
setenv PATH "\${NIXPKGS_SOURCETIME_PATH}:\$PATH"
else
setenv PATH "\$NIXPKGS_SOURCETIME_PATH"
endif
# End of lines to add to PATH source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
if (\$?PATH) then
if ("\$PATH" != "") then
# Remove the inserted section, the duplicated colons, and the leading and trailing colon
setenv PATH \`echo "\$PATH" | @sed@ "s#\${NIXPKGS_SOURCETIME_PATH}##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ 's#:\$##'\`
endif
endif
if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then
if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") then
set NIXPKGS_SOURCETIME_PATH = \$NIXPKGS_SOURCETIME_PATH_OLD[1]
set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH_OLD[2-]
else
unset NIXPKGS_SOURCETIME_PATH
endif
if (NIXPKGS_SOURCETIME_PATH_OLD == "") then
unset NIXPKGS_SOURCETIME_PATH_OLD
endif
else
unset NIXPKGS_SOURCETIME_PATH
endif
# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
rm "$FILE_TO_WORK_ON"
}

View File

@ -0,0 +1,50 @@
patchRcPathFish(){
local FILE_TO_PATCH="$1"
local SOURCETIME_PATH="$2"
local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to add to PATH the source-time utilities for Nixpkgs packaging
if set -q NIXPKGS_SOURCETIME_PATH && test (count \$NIXPKGS_SOURCETIME_PATH) -gt 0
set --unpath NIXPKGS_SOURCETIME_PATH_OLD "\$NIXPKGS_SOURCETIME_PATH" \$NIXPKGS_SOURCETIME_PATH_OLD
end
set --path NIXPKGS_SOURCETIME_PATH $SOURCETIME_PATH
set -g --path PATH \$NIXPKGS_SOURCETIME_PATH \$PATH
# End of lines to add to PATH source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
if set -q PATH && test "\$PATH" != "" && test (count \$PATH) -ge (count \$NIXPKGS_SOURCETIME_PATH)
# Remove the inserted section
for i in (seq 0 (math (count \$PATH) - (count \$NIXPKGS_SOURCETIME_PATH)))
for j in (seq 1 (count \$NIXPKGS_SOURCETIME_PATH))
if test \$PATH[(math \$i + \$j)] != \$NIXPKGS_SOURCETIME_PATH[\$j]
set i -1
break
end
end
if test \$i -eq -1
continue
end
if test \$i -eq 0
set -g --path PATH \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1)..]
else
set -g --path PATH \$PATH[..\$i] \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1 + \$i)..]
end
break
end
end
if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -gt 0
set --path NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD[1]
set --unpath NIXPKGS_SOURCETIME_PATH_OLD \$NIXPKGS_SOURCETIME_PATH_OLD[2..]
else
set -e NIXPKGS_SOURCETIME_PATH
end
if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -eq 0
set -e NIXPKGS_SOURCETIME_PATH_OLD
end
# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
rm "$FILE_TO_WORK_ON"
}

View File

@ -0,0 +1,39 @@
patchRcPathPosix(){
local FILE_TO_PATCH="$1"
local SOURCETIME_PATH="$2"
local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to add to PATH the source-time utilities for Nixpkgs packaging
if [ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]; then
NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}"
fi
NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH"
if [ -n "\$PATH" ]; then
PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH";
else
PATH="\$NIXPKGS_SOURCETIME_PATH"
fi
export PATH
# End of lines to add to PATH source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
cat <<EOF >> "$FILE_TO_WORK_ON"
# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
if [ -n "\${PATH-}" ]; then
PATH="\$(echo "\$PATH" | @sed@ "s#\$NIXPKGS_SOURCETIME_PATH##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ "s#:\\\$##")"
export PATH
fi
if [ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then
NIXPKGS_SOURCETIME_PATH="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#\\([^;]\\);.*#\\1#")"
NIXPKGS_SOURCETIME_PATH_OLD="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#[^;];\\(.*\\)#\\1#")"
else
unset NIXPKGS_SOURCETIME_PATH
fi
if [ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then
unset NIXPKGS_SOURCETIME_PATH_OLD
fi
# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
EOF
cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
rm "$FILE_TO_WORK_ON"
}

View File

@ -0,0 +1,442 @@
{ callPackage }:
{
test-bash = callPackage
(
{ lib
, runCommandLocal
, bash
, hello
, ksh
, patchRcPathBash
, shellcheck
, zsh
}:
runCommandLocal "patch-rc-path-bash-test"
{
nativeBuildInputs = [
bash
ksh
patchRcPathBash
shellcheck
zsh
];
meta = {
description = "Package test of patchActivateBash";
inherit (patchRcPathBash.meta) maintainers;
};
}
''
set -eu -o pipefail
# Check the setup hook script
echo "Running shellcheck against ${./test-sourcing-bash}"
shellcheck -s bash --exclude SC1090 ${./test-sourcing-bash}
shellcheck -s ksh --exclude SC1090 ${./test-sourcing-bash}
# Test patching a blank file
echo > blank.bash
echo "Generating blank_patched.bash from blank.bash"
cp blank.bash blank_patched.bash
patchRcPathBash blank_patched.bash "$PWD/delta:$PWD/foxtrot"
echo "Running shellcheck against blank_patched.bash"
shellcheck -s bash blank_patched.bash
shellcheck -s ksh blank_patched.bash
echo "Testing in Bash if blank.bash and blank_patched.bash modifies PATH the same way"
bash ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash
echo "Testing in Ksh if blank.bash and blank_patched.bash modifies PATH the same way"
ksh ${./test-sourcing-bash} "$PWD/blank.bash" "$PWD/blank_patched.bash"
echo "Testing in Zsh if blank.bash and blank_patched.bash modifies PATH the same way"
zsh ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash
# Test patching silent_hello
echo "hello > /dev/null" > silent_hello.bash
echo "Generating silent_hello_patched.bash from silent_hello.bash"
cp silent_hello.bash silent_hello_patched.bash
patchRcPathBash silent_hello_patched.bash "${hello}/bin"
echo "Running shellcheck against silent_hello_patched.bash"
shellcheck -s bash silent_hello_patched.bash
echo "Testing in Bash if silent_hello_patched.bash get sourced without error"
bash -eu -o pipefail -c ". ./silent_hello_patched.bash"
echo "Testing in Ksh if silent_hello_patched.bash get sourced without error"
ksh -eu -o pipefail -c ". ./silent_hello_patched.bash"
echo "Testing in Zsh if silent_hello_patched.bash get sourced without error"
zsh -eu -o pipefail -c ". ./silent_hello_patched.bash"
# Check the sample source
echo "Running shellcheck against sample_source.bash"
shellcheck -s bash ${./sample_source.bash}
shellcheck -s ksh ${./sample_source.bash}
# Test patching the sample source
cp ${./sample_source.bash} sample_source_patched.bash
chmod u+w sample_source_patched.bash
echo "Generating sample_source_patched.bash from ./sample_source.bash"
patchRcPathBash sample_source_patched.bash "$PWD/delta:$PWD/foxtrot"
echo "Running shellcheck against sample_source_patched.bash"
shellcheck -s bash sample_source_patched.bash
echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash"
echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
# Test double-patching the sample source
echo "Patching again sample_source_patched.bash"
patchRcPathBash sample_source_patched.bash "$PWD/foxtrot:$PWD/golf"
echo "Running shellcheck against sample_source_patched.bash"
shellcheck -s bash sample_source_patched.bash
shellcheck -s ksh sample_source_patched.bash
echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash"
echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
# Create a dummy output
touch "$out"
''
)
{ };
test-csh = callPackage
(
{ lib
, runCommandLocal
, gnused
, hello
, patchRcPathCsh
, tcsh
}:
runCommandLocal "patch-rc-path-csh-test"
{
nativeBuildInputs = [
patchRcPathCsh
tcsh
];
meta = {
description = "Package test of patchActivateCsh";
inherit (patchRcPathCsh.meta) maintainers;
};
}
''
set -eu -o pipefail
# Test patching a blank file
echo > blank.csh
echo "Generating blank_patched.csh from blank.csh"
cp blank.csh blank_patched.csh
patchRcPathCsh blank_patched.csh "$PWD/delta:$PWD/foxtrot"
echo "Testing in Csh if blank.csh and blank_patched.csh modifies PATH the same way"
tcsh -e ${./test-sourcing-csh} blank.csh blank_patched.csh
# Test patching silent_hello file
echo "hello > /dev/null" > silent_hello.csh
echo "Generating silent_hello_patched.csh from silent_hello.csh"
cp silent_hello.csh silent_hello_patched.csh
patchRcPathCsh silent_hello_patched.csh "${hello}/bin"
echo "Testing in Csh if silent_hello_patched.csh get sourced without errer"
tcsh -e -c "source silent_hello_patched.csh"
# Generate the sample source
substitute ${./sample_source.csh.in} sample_source.csh --replace @sed@ ${gnused}/bin/sed
chmod u+rw sample_source.csh
# Test patching the sample source
echo "Generating sample_source_patched.csh from sample_source.csh"
cp sample_source.csh sample_source_patched.csh
chmod u+w sample_source_patched.csh
patchRcPathCsh sample_source_patched.csh "$PWD/delta:$PWD/foxtrot"
echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way"
tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh
# Test double-patching the sample source
echo "Patching again sample_source_patched.csh from sample_source.csh"
patchRcPathCsh sample_source_patched.csh "$PWD/foxtrot:$PWD/golf"
echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way"
tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh
# Create a dummy output
touch "$out"
''
)
{ };
test-fish = callPackage
(
{ lib
, runCommandLocal
, fish
, hello
, patchRcPathFish
}:
runCommandLocal "patch-rc-path-fish-test"
{
nativeBuildInputs = [
fish
patchRcPathFish
];
meta = {
description = "Package test of patchActivateFish";
inherit (patchRcPathFish.meta) maintainers;
};
}
''
set -eu -o pipefail
# Test patching a blank file
echo > blank.fish
echo "Generating blank_patched.fish from blank.fish"
cp blank.fish blank_patched.fish
patchRcPathFish blank_patched.fish "$PWD/delta:$PWD/foxtrot"
echo "Testing in Fish if blank.fish and blank_patched.fish modifies PATH the same way"
HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
HOME="$HOME_TEMP" fish ${./test-sourcing-fish} blank.fish blank_patched.fish
rm -r "$HOME_TEMP"
# Test patching silent_hello file
echo "hello > /dev/null" > silent_hello.fish
echo "Generating silent_hello_patched.fish from silent_hello.fish"
cp silent_hello.fish silent_hello_patched.fish
patchRcPathFish silent_hello_patched.fish "${hello}/bin"
echo "Testing in Fish if silent_hello_patched.fish get sourced without error"
HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
HOME="$HOME_TEMP" fish -c "source silent_hello_patched.fish"
rm -r "$HOME_TEMP"
# Test patching the sample source
cp ${./sample_source.fish} sample_source_patched.fish
chmod u+w sample_source_patched.fish
echo "Generating sample_source_patched.fish from ${./sample_source.fish}"
patchRcPathFish sample_source_patched.fish "$PWD/delta:$PWD/foxtrot"
echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way"
HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish
rm -r "$HOME_TEMP"
# Test double-patching the sample source
echo "Patching again sample_source_patched.fish from ${./sample_source.fish}"
patchRcPathFish sample_source_patched.fish "$PWD/foxtrot:$PWD/golf"
echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way"
HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish
rm -r "$HOME_TEMP"
# Create a dummy output
touch "$out"
''
)
{ };
test-posix = callPackage
(
{ lib
, runCommandLocal
, bash
, dash
, gnused
, hello
, ksh
, patchRcPathPosix
, shellcheck
}:
runCommandLocal "patch-rc-path-posix-test"
{
nativeBuildInputs = [
bash
dash
ksh
patchRcPathPosix
shellcheck
];
meta = {
description = "Package test of patchActivatePosix";
inherit (patchRcPathPosix.meta) maintainers;
};
}
''
set -eu -o pipefail
# Check the setup hook script
echo "Running shellcheck against ${./test-sourcing-posix}"
shellcheck -s sh --exclude SC1090 ${./test-sourcing-posix}
shellcheck -s dash --exclude SC1090 ${./test-sourcing-posix}
# Test patching a blank file
echo > blank.sh
echo "Generating blank_patched.sh from blank.sh"
cp blank.sh blank_patched.sh
patchRcPathPosix blank_patched.sh "$PWD/delta:$PWD/foxtrot"
echo "Running shellcheck against blank_patched.sh"
shellcheck -s sh blank_patched.sh
shellcheck -s dash blank_patched.sh
echo "Testing in Bash if blank.sh and blank_patched.sh modifies PATH the same way"
bash --posix ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh
echo "Testing in Dash if blank.sh and blank_patched.sh modifies PATH the same way"
dash ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh
echo "Testing in Ksh if ./blank.sh and ./blank_patched.sh modifies PATH the same way"
ksh ${./test-sourcing-posix} "$PWD/blank.sh" "$PWD/blank_patched.sh"
# Test patching silent_hello file
echo "hello > /dev/null" > silent_hello.sh
echo "Generating silent_hello_patched.sh from silent_hello.sh"
cp silent_hello.sh silent_hello_patched.sh
patchRcPathPosix silent_hello_patched.sh "${hello}/bin"
echo "Running shellcheck against silent_hello_patched.sh"
shellcheck -s sh silent_hello_patched.sh
shellcheck -s dash silent_hello_patched.sh
echo "Testing in Bash if silent_hello_patched.sh get sourced without error"
bash --posix -eu -c ". ./silent_hello_patched.sh"
echo "Testing in Dash if silent_hello_patched.sh get sourced without error"
dash -eu -c ". ./silent_hello_patched.sh"
echo "Testing in Ksh if silent_hello_patched.sh get sourced without error"
ksh -eu -c ". $PWD/silent_hello_patched.sh"
# Generate the sample source "$PWD/delta:$PWD/foxtrot" "$PWD/delta:$PWD/foxtrot"
substitute ${./sample_source.sh.in} sample_source.sh --replace @sed@ ${gnused}/bin/sed
chmod u+rw sample_source.sh
# Check the sample source
echo "Running shellcheck against sample_source.sh"
shellcheck -s sh sample_source.sh
shellcheck -s dash sample_source.sh
# Test patching the sample source
echo "Generating sample_source_patched.sh from sample_source.sh"
cp sample_source.sh sample_source_patched.sh
chmod u+w sample_source_patched.sh
patchRcPathPosix sample_source_patched.sh "$PWD/delta:$PWD/foxtrot"
echo "Running shellcheck against sample_source_patched.sh"
shellcheck -s sh sample_source_patched.sh
shellcheck -s dash sample_source_patched.sh
echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh"
# Test double-patching the sample source
echo "Patching again sample_source_patched.sh"
patchRcPathPosix sample_source_patched.sh "$PWD/foxtrot:$PWD/golf"
echo "Running shellcheck against sample_source_patched.sh"
shellcheck -s sh sample_source_patched.sh
shellcheck -s dash sample_source_patched.sh
echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh"
# Create a dummy output
touch "$out"
''
)
{ };
}

View File

@ -0,0 +1,2 @@
PATH="$PWD/charlie:${PATH/:$PWD\/bravo}"
export PATH

View File

@ -0,0 +1 @@
setenv PATH $PWD/charlie:`echo "$PATH" | @sed@ "s#:$PWD/bravo##"`

View File

@ -0,0 +1,9 @@
begin
for p in $PATH
if test $p != "$PWD/bravo"
set TEMPORARY_PATH $TEMPORARY_PATH $p
end
end
set -g PATH $TEMPORARY_PATH
end
set PATH "$PWD/charlie" $PATH

View File

@ -0,0 +1,2 @@
PATH="$PWD/charlie:$(echo "$PATH" | @sed@ "s#:$PWD/bravo##")"
export PATH

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -eu -o pipefail
UNPATCHED_SOURCE_FILE="$1"
PATCHED_SOURCE_FILE="$2"
ORIG_PATH="$PWD/alfa:$PWD/bravo"
RESULT_PATH_FROM_UNPATCHED="$(
PATH="$ORIG_PATH"; export PATH
. "$UNPATCHED_SOURCE_FILE"
echo "$PATH"
)"
RESULT_PATH_FROM_PATCHED="$(
PATH="$ORIG_PATH"; export PATH
. "$PATCHED_SOURCE_FILE"
echo "$PATH"
)"
if [[ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]]; then
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
exit 1
fi

View File

@ -0,0 +1,13 @@
#/usr/bin/env tcsh
set UNPATCHED_SOURCE_FILE = "$1"
set PATCHED_SOURCE_FILE = "$2"
set ORIG_PATH = "${PWD}/alfa:${PWD}/bravo"
set RESULT_PATH_FROM_UNPATCHED = `setenv PATH "$ORIG_PATH"; source $UNPATCHED_SOURCE_FILE; echo $PATH`
set RESULT_PATH_FROM_PATCHED = `setenv PATH "$ORIG_PATH"; source $PATCHED_SOURCE_FILE; echo $PATH`
if ($RESULT_PATH_FROM_UNPATCHED != $RESULT_PATH_FROM_PATCHED) then
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
exit 1
endif

View File

@ -0,0 +1,13 @@
#/usr/bin/env fish
set UNPATCHED_SOURCE_FILE $argv[1]
set PATCHED_SOURCE_FILE $argv[2]
set ORIG_PATH "$PWD/alfa:$PWD/bravo"
set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"")
set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"")
if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED"
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
exit 1
end

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -eu
UNPATCHED_SOURCE_FILE="$1"
PATCHED_SOURCE_FILE="$2"
ORIG_PATH="$PWD/alfa:$PWD/bravo"
RESULT_PATH_FROM_UNPATCHED="$(
PATH="$ORIG_PATH"; export PATH
. "$UNPATCHED_SOURCE_FILE"
echo "$PATH"
)"
RESULT_PATH_FROM_PATCHED="$(
PATH="$ORIG_PATH"; export PATH
. "$PATCHED_SOURCE_FILE"
echo "$PATH"
)"
if [ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]; then
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
exit 1
fi

View File

@ -25,6 +25,7 @@
, fftwSinglePrec
, zlib
, curl
, rapidjson
, blas, lapack
# These two should use the same lapack and blas as the above
, qrupdate, arpack, suitesparse ? null
@ -130,6 +131,7 @@ let
fltk
zlib
curl
rapidjson
blas'
lapack'
libsndfile

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchFromGitHub, zlib, openssl }:
stdenv.mkDerivation rec {
version = "2.8.0";
version = "2.9.0";
pname = "libre";
src = fetchFromGitHub {
owner = "baresip";
repo = "re";
rev = "v${version}";
sha256 = "sha256-mbPFaq49EI2BdhdQJwFaBxjAh2aKlcuFwoCTwhXRbUg=";
sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA=";
};
buildInputs = [ zlib openssl ];
makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre }:
stdenv.mkDerivation rec {
version = "2.8.0";
version = "2.9.0";
pname = "librem";
src = fetchFromGitHub {
owner = "baresip";
repo = "rem";
rev = "v${version}";
sha256 = "sha256-/DAJMudEEB/8IYl27SFRlD57dfhZrPA5I1ycL4lFXy8=";
sha256 = "sha256-HiVM/opZuR7Gkt421ps+nKiiKERG8sUD8qBLIMGNCJI=";
};
buildInputs = [ zlib openssl libre ];
makeFlags = [

View File

@ -11,11 +11,11 @@ assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric");
stdenv.mkDerivation rec {
pname = "mpich";
version = "4.0.2";
version = "4.0.3";
src = fetchurl {
url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
sha256 = "0hnxvqhhscp3h70zf538dhqz9jwmqpwwnj3fqabdk8nli6lg2hjs";
sha256 = "sha256-F0BuqQpu1OzVvjnJ3cv6yTQ+arT3esToxevko+O2xQE=";
};
configureFlags = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spglib";
version = "2.0.1"; # N.B: if you change this, please update: pythonPackages.spglib
version = "2.0.2"; # N.B: if you change this, please update: pythonPackages.spglib
src = fetchFromGitHub {
owner = "spglib";
repo = "spglib";
rev = "v${version}";
sha256 = "sha256-0M3GSnNvBNmE4ShW8NNkVrOBGEF9A0C5wd++xnyrcdI=";
sha256 = "sha256-8Voepj35CMbboL3Dc55Gc4+OLPTTSgqVQuvNcRQsqmU=";
};
nativeBuildInputs = [ cmake ];

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "adafruit-platformdetect";
version = "3.32.0";
version = "3.33.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -15,7 +15,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "Adafruit-PlatformDetect";
inherit version;
hash = "sha256-MbrRf7kcPNYb1i+5cSkCvO9SJbvrPAeKGWxtfi1FmaQ=";
hash = "sha256-Fj+LUTovZm6t0YRCa8QtoTBal+PefCvTIl9OeBoac6U=";
};
nativeBuildInputs = [

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "aiohomekit";
version = "2.2.18";
version = "2.2.19";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "Jc2k";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-yE3+1dhgqgqmoBhBVsivXvn7MTKaY8FYiyqBRkg3h1U=";
hash = "sha256-x1Cah47EupdqLxwoJBLmN3AtC7zYqGZTP0nbLLsC3a0=";
};
nativeBuildInputs = [

View File

@ -10,15 +10,15 @@
buildPythonPackage rec {
pname = "azure-eventgrid";
version = "4.9.0";
version = "4.9.1";
format = "setuptools";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
extension = "zip";
hash = "sha256-ueuOxhNATK6o/Vue+x5vtP0ac3CQellkuyQmSrq7tqQ=";
hash = "sha256-zRiS5XsinEQoyYsg2PSso3Y2pC7QwB1fbVkCF1OeQ3U=";
};
propagatedBuildInputs = [

View File

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "azure-mgmt-containerservice";
version = "20.6.0";
version = "20.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
extension = "zip";
hash = "sha256-zQ3Lg45rO1vgtsjQnokNFjWt6qnrNQ2CnElGJ0Dksew=";
hash = "sha256-tNuBIfObCWd8JXq49CDLOzMl1pw7ulTQJua7CNJjRuo=";
};
propagatedBuildInputs = [

View File

@ -17,14 +17,14 @@
buildPythonPackage rec {
pname = "bellows";
version = "0.34.2";
version = "0.34.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "zigpy";
repo = "bellows";
rev = "refs/tags/${version}";
sha256 = "sha256-78LUQBFV4TFPDLiSHBG+RLnQLaCPX4LZpow9aszQAQA=";
sha256 = "sha256-7jaXNz7i+kF64T+5/QWKGpxHCkg/M9U2hbWrVB2tjH8=";
};
propagatedBuildInputs = [

View File

@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "pytenable";
version = "1.4.8";
version = "1.4.9";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "tenable";
repo = "pyTenable";
rev = "refs/tags/${version}";
hash = "sha256-alBEKCYwLIbQanKTzkd3NnfOudhGhKhg4sFqddWdzQA=";
hash = "sha256-Cj1/f/e+j5CJMl+afF+HStd419Uh053jKk/vmObaBl8=";
};
propagatedBuildInputs = [

View File

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "spglib";
version = "2.0.1";
version = "2.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-9fHKuDWuwbjXjL9CmJxUWWoomkqDP93J8MX1XKwbwsE=";
sha256 = "sha256-HQgewi2kq0/DGY6URd2tbewiYcQ5J4MRUdk+OUImEKo=";
};
propagatedBuildInputs = [ numpy ];

View File

@ -10,15 +10,15 @@
buildPythonPackage rec {
pname = "thriftpy2";
version = "0.4.14";
version = "0.4.15";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Thriftpy";
repo = pname;
rev = "v${version}";
sha256 = "17f57vsbym4c9yax128bhrwg2zjxcsgl3ja6422y8hyb38v5mdc3";
rev = "refs/tags/v${version}";
sha256 = "sha256-1X1roRFQgLJ+rrRuRlHMVtUdj2D68WGdxvid/0chsvI=";
};
nativeBuildInputs = [

View File

@ -16,11 +16,11 @@
buildPythonPackage rec {
pname = "vispy";
version = "0.11.0";
version = "0.12.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-zi0lalMdQF8pWTPHSZaRL79D9lUhbbX8ao/zp4dHhBo=";
sha256 = "sha256-CtSg/pAtOhhiuS6yE3ogzF0llceMQTF12ShXIi9GMD0=";
};
patches = [

View File

@ -37,8 +37,8 @@ let
in
rec {
shards_0_17 = generic {
version = "0.17.0";
hash = "sha256-f9MptrKalW7gi0J2h0fokkzdjKBVa2TmoPX8BYffqzY=";
version = "0.17.1";
hash = "sha256-YAsFsMoZVUINnIQzYNjE7/hpvipmyU5DrLJJrk9TkHs=";
};
shards = shards_0_17;

View File

@ -1,6 +1,8 @@
{ lib
{ stdenv
, lib
, rustPlatform
, fetchFromGitHub
, CoreServices
}:
rustPlatform.buildRustPackage rec {
@ -16,6 +18,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-qpV3UriOidIk/0di9d8RjXvjcjgD6dXqg7wLAywI66o=";
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
meta = with lib; {
description = "A package manager for JavaScript projects";
homepage = "https://github.com/danielhuang/cotton";

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "microcode-intel";
version = "20220809";
version = "20221108";
src = fetchFromGitHub {
owner = "intel";
repo = "Intel-Linux-Processor-Microcode-Data-Files";
rev = "microcode-${version}";
hash = "sha256-vcuLQHAGr5uRkGWWIwA2WXLJadVNxfcPgjmNS82Logg=";
hash = "sha256-JZbBrD3fHgJogDw4u2YggDX7OCXCu5/XEZKzHuVJR9k=";
};
nativeBuildInputs = [ iucode-tool libarchive ];

View File

@ -1,17 +1,17 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, krb5, xfsprogs, jemalloc, dbus, libcap
, ntirpc, liburcu, bison, flex, nfs-utils
, ntirpc, liburcu, bison, flex, nfs-utils, acl
} :
stdenv.mkDerivation rec {
pname = "nfs-ganesha";
version = "4.0.8";
version = "4.0.12";
src = fetchFromGitHub {
owner = "nfs-ganesha";
repo = "nfs-ganesha";
rev = "V${version}";
sha256 = "sha256-03zrEWwPQi7ED6Yr3HgzQyOtqJjjnUj5nChgGV6v0zk=";
sha256 = "sha256-s6iZcZObBEHvIqyD0niNzuPJf4ENZGw3mhgZZZdj2zc=";
};
preConfigure = "cd src";
@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
acl
krb5
xfsprogs
jemalloc

View File

@ -1,4 +1,10 @@
{ stdenv, buildGoModule, fetchFromGitHub, lib }:
{ stdenv
, buildGoModule
, fetchFromGitHub
, lib
, testers
, kics
}:
buildGoModule rec {
pname = "kics";
@ -25,6 +31,11 @@ buildGoModule rec {
"-X github.com/Checkmarx/kics/internal/constants.Version=${version}"
];
passthru.tests.version = testers.testVersion {
package = kics;
command = "kics version";
};
meta = with lib; {
description = ''
Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development

View File

@ -0,0 +1,24 @@
{ stdenv, cmake, libpcap, fetchFromGitHub, lib }:
stdenv.mkDerivation rec {
pname = "updreplay";
version = "1.0.0";
nativeBuildInputs = [ cmake ];
buildInputs = [ libpcap ];
src = fetchFromGitHub {
owner = "rigtorp";
repo = "udpreplay";
rev = "v${version}";
hash = "sha256-8cp1RyVBnq3vx2LPkAx7ktmdLo0bSq9UWlbb/DrJxpc=";
};
meta = with lib; {
description = "Replay UDP packets from a pcap file";
longDescription = ''
udpreplay is a lightweight alternative to tcpreplay for replaying UDP unicast and multicast streams from a pcap file.
'';
homepage = "https://github.com/rigtorp/udpreplay";
license = licenses.mit;
maintainers = [ maintainers.considerate ];
platforms = platforms.linux;
};
}

View File

@ -2,14 +2,14 @@
rustPlatform.buildRustPackage rec {
pname = "rustscan";
version = "2.1.0";
version = "2.1.1";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-f9QFsVGGKoWqZGIg8Z8FgZGcUo5M8MFNUavK69SgHkg=";
sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM=";
};
cargoSha256 = "sha256-ZoDE7SJ6snWTFvYXHZdVCC6UCug2wGghH93FfDTDsv0=";
cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q=";
postPatch = ''
substituteInPlace src/scripts/mod.rs \

View File

@ -983,6 +983,10 @@ with pkgs;
octant-desktop = callPackage ../applications/networking/cluster/octant/desktop.nix { };
starboard-octant-plugin = callPackage ../applications/networking/cluster/octant/plugins/starboard-octant-plugin.nix { };
inherit (
callPackages ../build-support/setup-hooks/patch-rc-path-hooks { }
) patchRcPathBash patchRcPathCsh patchRcPathFish patchRcPathPosix;
pathsFromGraph = ../build-support/kernel/paths-from-graph.pl;
pruneLibtoolFiles = makeSetupHook { name = "prune-libtool-files"; }
@ -1599,6 +1603,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback;
};
mame-tools = (lib.getOutput "tools" mame);
mednafen = callPackage ../applications/emulators/mednafen {
inherit (darwin) libiconv;
};
@ -12305,6 +12311,8 @@ with pkgs;
udftools = callPackage ../tools/filesystems/udftools {};
udpreplay = callPackage ../tools/networking/udpreplay { };
udpt = callPackage ../servers/udpt { };
udptunnel = callPackage ../tools/networking/udptunnel { };
@ -13634,7 +13642,9 @@ with pkgs;
copper = callPackage ../development/compilers/copper {};
cotton = callPackage ../development/tools/cotton { };
cotton = callPackage ../development/tools/cotton {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
inherit (callPackages ../development/compilers/crystal {
llvmPackages = if stdenv.system == "aarch64-darwin" then llvmPackages_11 else llvmPackages_10;
@ -33695,6 +33705,8 @@ with pkgs;
conmon = callPackage ../applications/virtualization/conmon { };
conmon-rs = callPackage ../applications/virtualization/conmon-rs { };
digikam = libsForQt5.callPackage ../applications/graphics/digikam {};
drumkv1 = libsForQt5.callPackage ../applications/audio/drumkv1 { };