Merge master into staging-next

This commit is contained in:
nixpkgs-ci[bot] 2025-10-28 10:01:01 +00:00 committed by GitHub
commit ba6c1b1e17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 1836 additions and 2839 deletions

View file

@ -146,14 +146,19 @@ jobs:
- name: Requesting maintainer reviews
if: ${{ steps.app-token.outputs.token }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ github.token }}
APP_GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY: ${{ github.repository }}
ORG_ID: ${{ github.repository_owner_id }}
NUMBER: ${{ github.event.number }}
AUTHOR: ${{ github.event.pull_request.user.login }}
# Don't request reviewers on draft PRs
DRY_MODE: ${{ github.event.pull_request.draft && '1' || '' }}
run: result/bin/request-maintainers-reviews.sh "$ORG_ID" "$REPOSITORY" "$NUMBER" "$AUTHOR" comparison
run: |
# maintainers.json contains GitHub IDs. Look up handles to request reviews from.
# There appears to be no API to request reviews based on GitHub IDs
jq -r 'keys[]' comparison/maintainers.json \
| while read -r id; do gh api /user/"$id" --jq .login; done \
| GH_TOKEN="$APP_GH_TOKEN" result/bin/request-reviewers.sh "$REPOSITORY" "$NUMBER" "$AUTHOR"
- name: Log current API rate limits (app-token)
if: ${{ steps.app-token.outputs.token }}

View file

@ -179,12 +179,8 @@ runCommand "compare"
jq
cmp-stats
];
maintainers = builtins.toJSON maintainers.users;
teams = builtins.toJSON maintainers.teams;
passAsFile = [
"maintainers"
"teams"
];
maintainers = builtins.toJSON maintainers;
passAsFile = [ "maintainers" ];
}
''
mkdir $out
@ -227,5 +223,4 @@ runCommand "compare"
fi
cp "$maintainersPath" "$out/maintainers.json"
cp "$teamsPath" "$out/teams.json"
''

View file

@ -51,16 +51,15 @@ let
# updates to .json files.
# TODO: Support by-name package sets.
filenames = lib.optional (lib.length path == 1) "pkgs/by-name/${sharded (lib.head path)}/";
# meta.maintainers also contains all individual team members.
# We only want to ping individuals if they're added individually as maintainers, not via teams.
maintainers = package.meta.nonTeamMaintainers or [ ];
teams = package.meta.teams or [ ];
# TODO: Refactor this so we can ping entire teams instead of the individual members.
# Note that this will require keeping track of GH team IDs in "maintainers/teams.nix".
maintainers = package.meta.maintainers or [ ];
}
))
# No need to match up packages without maintainers with their files.
# This also filters out attributes where `packge = null`, which is the
# case for libintl, for example.
(lib.filter (pkg: pkg.maintainers != [ ] || pkg.teams != [ ]))
(lib.filter (pkg: pkg.maintainers != [ ]))
];
relevantFilenames =
@ -95,43 +94,20 @@ let
attrsWithModifiedFiles = lib.filter (pkg: anyMatchingFiles pkg.filenames) attrsWithFilenames;
userPings =
listToPing = lib.concatMap (
pkg:
map (maintainer: {
type = "user";
user = toString maintainer.githubId;
id = maintainer.githubId;
inherit (maintainer) github;
packageName = pkg.name;
});
teamPings =
pkg: team:
if team ? github then
[
{
type = "team";
team = toString team.githubId;
packageName = pkg.name;
}
]
else
userPings pkg team.members;
maintainersToPing = lib.concatMap (
pkg: userPings pkg pkg.maintainers ++ lib.concatMap (teamPings pkg) pkg.teams
dueToFiles = pkg.filenames;
}) pkg.maintainers
) attrsWithModifiedFiles;
byType = lib.groupBy (ping: ping.type) maintainersToPing;
byMaintainer = lib.groupBy (ping: toString ping.id) listToPing;
byUser = lib.pipe (byType.user or [ ]) [
(lib.groupBy (ping: ping.user))
(lib.mapAttrs (_user: lib.map (pkg: pkg.packageName)))
];
byTeam = lib.pipe (byType.team or [ ]) [
(lib.groupBy (ping: ping.team))
(lib.mapAttrs (_team: lib.map (pkg: pkg.packageName)))
];
packagesPerMaintainer = lib.mapAttrs (
maintainer: packages: map (pkg: pkg.packageName) packages
) byMaintainer;
in
{
users = byUser;
teams = byTeam;
}
packagesPerMaintainer

View file

@ -17,7 +17,6 @@ stdenvNoCC.mkDerivation {
./get-code-owners.sh
./request-reviewers.sh
./request-code-owner-reviews.sh
./request-maintainers-reviews.sh
];
};
nativeBuildInputs = [ makeWrapper ];
@ -27,7 +26,6 @@ stdenvNoCC.mkDerivation {
for bin in *.sh; do
mv "$bin" "$out/bin"
wrapProgram "$out/bin/$bin" \
--set PAGER cat \
--set PATH ${
lib.makeBinPath [
coreutils

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Get the code owners of the files changed by a PR, returning one GitHub user/team handle per line
# Get the code owners of the files changed by a PR, returning one username per line
set -euo pipefail
@ -29,9 +29,9 @@ log "This PR touches ${#touchedFiles[@]} files"
# remove code owners to avoid pinging them
git -C "$gitRepo" show "$baseRef":"$ownersFile" > "$tmp"/codeowners
# Associative array with the user/team as the key for easy de-duplication
# Associative array with the user as the key for easy de-duplication
# Make sure to always lowercase keys to avoid duplicates with different casings
declare -A finalOwners=()
declare -A users=()
for file in "${touchedFiles[@]}"; do
result=$(codeowners --file "$tmp"/codeowners "$file")
@ -59,9 +59,39 @@ for file in "${touchedFiles[@]}"; do
# The first regex match is everything after the @
entry=${BASH_REMATCH[1]}
finalOwners[${entry,,}]=
if [[ "$entry" =~ (.*)/(.*) ]]; then
# Teams look like $org/$team
org=${BASH_REMATCH[1]}
team=${BASH_REMATCH[2]}
# Instead of requesting a review from the team itself,
# we request reviews from the individual users.
# This is because once somebody from a team reviewed the PR,
# the API doesn't expose that the team was already requested for a review,
# so we wouldn't be able to avoid rerequesting reviews
# without saving some some extra state somewhere
# We could also consider implementing a more advanced heuristic
# in the future that e.g. only pings one team member,
# but escalates to somebody else if that member doesn't respond in time.
gh api \
--cache=1h \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$org/teams/$team/members" \
--jq '.[].login' > "$tmp/team-members"
readarray -t members < "$tmp/team-members"
log "Team $entry has these members: ${members[*]}"
for user in "${members[@]}"; do
users[${user,,}]=
done
else
# Everything else is a user
users[${entry,,}]=
fi
done
done
printf "%s\n" "${!finalOwners[@]}"
printf "%s\n" "${!users[@]}"

View file

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Requests maintainer reviews for a PR
set -euo pipefail
SCRIPT_DIR=$(dirname "$0")
if (( $# < 5 )); then
echo >&2 "Usage: $0 ORG_ID GITHUB_REPO PR_NUMBER AUTHOR COMPARISON_PATH"
exit 1
fi
orgId=$1
baseRepo=$2
prNumber=$3
prAuthor=$4
comparisonPath=$5
org="${baseRepo%/*}"
# maintainers.json/teams.json contains GitHub IDs. Look up handles to request reviews from.
# There appears to be no API to request reviews based on IDs
{
jq -r 'keys[]' "$comparisonPath"/maintainers.json \
| while read -r id; do
if login=$(gh api /user/"$id" --jq .login); then
echo "$login"
else
echo >&2 "Skipping user with id $id: $login"
fi
done
jq -r 'keys[]' "$comparisonPath"/teams.json \
| while read -r id; do
if slug=$(gh api /organizations/"$orgId"/team/"$id" --jq .slug); then
echo "$org/$slug"
else
echo >&2 "Skipping team with id $id: $slug"
fi
done
} | "$SCRIPT_DIR"/request-reviewers.sh "$baseRepo" "$prNumber" "$prAuthor"

View file

@ -1,16 +1,8 @@
#!/usr/bin/env bash
# Request reviewers for a PR, reading line-separated usernames/teams on stdin,
# Request reviewers for a PR, reading line-separated usernames on stdin,
# filtering for valid reviewers before using the API endpoint to request reviews:
# https://docs.github.com/en/rest/pulls/review-requests?apiVersion=2022-11-28#request-reviewers-for-a-pull-request
#
# Example:
# $ request-reviewers.sh NixOS/nixpkgs 123456 someUser <<-EOF
# someUser
# anotherUser
# NixOS/someTeam
# NixOS/anotherTeam
# EOF
set -euo pipefail
@ -38,133 +30,59 @@ baseRepo=$1
prNumber=$2
prAuthor=$3
org="${baseRepo%/*}"
repo="${baseRepo#*/}"
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' exit
declare -A users=() teams=()
declare -A users=()
while read -r handle && [[ -n "$handle" ]]; do
if [[ "$handle" =~ (.*)/(.*) ]]; then
if [[ "${BASH_REMATCH[1]}" != "$org" ]]; then
log "Team $handle is not part of the $org org, ignoring"
else
teams[${BASH_REMATCH[2],,}]=
fi
else
users[${handle,,}]=
fi
users[${handle,,}]=
done
log "Checking users: ${!users[*]}"
log "Checking teams: ${!teams[*]}"
# Cannot request a review from the author
if [[ -v users[${prAuthor,,}] ]]; then
log "Avoiding review request for PR author $prAuthor"
log "One or more files are owned by the PR author, ignoring"
unset 'users[${prAuthor,,}]'
fi
# And we don't want to rerequest reviews from people or teams who already reviewed
log -e "Checking if users/teams have already reviewed the PR"
# shellcheck disable=SC2016
# A graphql query to get all reviewers of a PR, including both users and teams
# on behalf of which a review was done.
# The REST API doesn't have an end-point for figuring out the on-behalfness of reviews
all_reviewers_query='
query($owner: String!, $repo: String!, $pr: Int!, $endCursor: String) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviews(first: 100, after: $endCursor) {
nodes {
author {
login
}
onBehalfOf(first: 100) {
nodes {
slug
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}
'
gh api graphql \
gh api \
-H "Accept: application/vnd.github+json" \
--paginate \
-f query="$all_reviewers_query" \
-F owner="$org" \
-F repo="$repo" \
-F pr="$prNumber" \
> "$tmp/already-reviewed-by-response"
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$baseRepo/pulls/$prNumber/reviews" \
--jq '.[].user.login' > "$tmp/already-reviewed-by"
readarray -t userReviewers < <(jq -r '.data.repository.pullRequest.reviews.nodes[].author.login' "$tmp/already-reviewed-by-response")
log "PR is already reviewed by these users: ${userReviewers[*]}"
for user in "${userReviewers[@]}"; do
# And we don't want to rerequest reviews from people who already reviewed
while read -r user; do
if [[ -v users[${user,,}] ]]; then
log "Avoiding review request for user $user, who has already left a review"
log "User $user is a potential reviewer, but has already left a review, ignoring"
unset 'users[${user,,}]'
fi
done
readarray -t teamReviewers < <(jq -r '.data.repository.pullRequest.reviews.nodes[].onBehalfOf.nodes[].slug' "$tmp/already-reviewed-by-response")
log "PR is already reviewed by these teams: ${teamReviewers[*]}"
for team in "${teamReviewers[@]}"; do
if [[ -v teams[${team,,}] ]]; then
log "Avoiding review request for team $team, who has already left a review"
unset 'teams[${team,,}]'
fi
done
log -e "Checking that all users/teams can be requested for review"
done < "$tmp/already-reviewed-by"
for user in "${!users[@]}"; do
if ! gh api "/repos/$baseRepo/collaborators/$user" >&2; then
log "User $user cannot be requested for review because they don't exist or are not a repository collaborator, ignoring. Probably missed the automated invite to the maintainers team (see <https://github.com/NixOS/nixpkgs/issues/234293>)"
if ! gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$baseRepo/collaborators/$user" >&2; then
log "User $user is not a repository collaborator, probably missed the automated invite to the maintainers team (see <https://github.com/NixOS/nixpkgs/issues/234293>), ignoring"
unset 'users[$user]'
fi
done
for team in "${!teams[@]}"; do
if ! gh api "/orgs/$org/teams/$team/repos/$baseRepo" >&2; then
log "Team $team cannot be requested for review because it doesn't exist or has no repository permissions, ignoring. Probably wasn't added to the nixpkgs-maintainers team (see https://github.com/NixOS/nixpkgs/tree/master/maintainers#maintainer-teams)"
unset 'teams[$team]'
fi
done
log "Would request reviews from users: ${!users[*]}"
log "Would request reviews from teams: ${!teams[*]}"
if (( ${#users[@]} + ${#teams[@]} > 10 )); then
log "Too many reviewers (users: ${!users[*]}, teams: ${!teams[*]}), skipping review requests"
if [[ "${#users[@]}" -gt 10 ]]; then
log "Too many reviewers (${!users[*]}), skipping review requests"
exit 0
fi
for user in "${!users[@]}"; do
log "Requesting review from user $user"
if ! response=$(effect gh api \
--method POST \
"/repos/$baseRepo/pulls/$prNumber/requested_reviewers" \
-f "reviewers[]=$user"); then
log "Failed to request review from user $user: $response"
fi
done
log "Requesting review from: $user"
for team in "${!teams[@]}"; do
log "Requesting review from team $team"
if ! response=$(effect gh api \
if ! response=$(jq -n --arg user "$user" '{ reviewers: [ $user ] }' | \
effect gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$baseRepo/pulls/$prNumber/requested_reviewers" \
-f "team_reviewers[]=$team"); then
log "Failed to request review from team $team: $response"
--input -); then
log "Failed to request review from $user: $response"
fi
done

View file

@ -48,14 +48,7 @@ with lib.maintainers;
};
agda = {
members = [
alexarice
ncfavier
phijor
turion
];
scope = "Maintain Agda-related packages and modules.";
shortName = "Agda";
github = "agda";
};
android = {
@ -373,9 +366,7 @@ with lib.maintainers;
};
freedesktop = {
members = [ jtojnar ];
scope = "Maintain Freedesktop.org packages for graphical desktop.";
shortName = "freedesktop.org packaging";
github = "freedesktop";
};
fslabs = {
@ -551,14 +542,7 @@ with lib.maintainers;
};
kubernetes = {
members = [
johanot
offline
saschagrunert
srhb
];
scope = "Maintain the Kubernetes package and module";
shortName = "Kubernetes";
github = "kubernetes";
};
libretro = {
@ -573,15 +557,7 @@ with lib.maintainers;
};
linux-kernel = {
members = [
TredwellGit
k900
ma27
nequissimus
qyliss
];
scope = "Maintain the Linux kernel.";
shortName = "Linux Kernel";
github = "linux-kernel";
};
lisp = {
@ -590,15 +566,7 @@ with lib.maintainers;
};
lix = {
members = [
raitobezarius
qyriad
_9999years
lf-
alois31
];
scope = "Maintain the Lix package manager inside of Nixpkgs.";
shortName = "Lix ecosystem";
github = "lix-maintainers";
enableFeatureFreezePing = true;
};
@ -835,13 +803,7 @@ with lib.maintainers;
};
postgres = {
members = [
thoughtpolice
ma27
wolfgangwalther
];
scope = "Maintain the PostgreSQL package and plugins along with the NixOS module.";
shortName = "PostgreSQL";
github = "postgres";
enableFeatureFreezePing = true;
};

View file

@ -38,6 +38,13 @@ in
type = with types; nullOr str;
default = null;
};
extraFlags = mkOption {
description = "Extra flags to pass to snowflake-proxy";
type = with types; listOf str;
default = [ ];
example = [ "-metrics" ];
};
};
};
@ -52,6 +59,7 @@ in
++ optional (cfg.capacity != null) "-capacity ${builtins.toString cfg.capacity}"
++ optional (cfg.relay != null) "-relay ${cfg.relay}"
++ optional (cfg.stun != null) "-stun ${cfg.stun}"
++ cfg.extraFlags
);
# Security Hardening

View file

@ -12,16 +12,16 @@
rustPlatform.buildRustPackage rec {
pname = "alfis";
version = "0.8.5";
version = "0.8.7";
src = fetchFromGitHub {
owner = "Revertron";
repo = "Alfis";
tag = "v${version}";
hash = "sha256-ettStNktSDZnYNN/IWqTB1Ou1g1QEGFabS4EatnDLaE=";
hash = "sha256-u5luVJRNIuGqqNyh+C7nMSkZgoq/S7gpmsEiz8ntmC4=";
};
cargoHash = "sha256-xe0YQCKnDV6M6IKWgljsuJ5ZevkdpxZDnNHAHKJyUec=";
cargoHash = "sha256-ittJ/iKcmvd5r8oaBoGhi/E2osq245OWxSC+VH+bme4=";
nativeBuildInputs = [
pkg-config
@ -52,8 +52,5 @@ rustPlatform.buildRustPackage rec {
maintainers = with lib.maintainers; [ misuzu ];
platforms = lib.platforms.unix;
mainProgram = "alfis";
# needs libsoup-2.4, which is soon going to be removed
# https://github.com/NixOS/nixpkgs/pull/450065
broken = withGui;
};
}

View file

@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
"@sourcegraph/amp": "^0.0.1760546826-g6984fa"
"@sourcegraph/amp": "^0.0.1761583653-gd8c2df"
}
},
"node_modules/@napi-rs/keyring": {
@ -228,9 +228,9 @@
}
},
"node_modules/@sourcegraph/amp": {
"version": "0.0.1760546826-g6984fa",
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1760546826-g6984fa.tgz",
"integrity": "sha512-QKtu4XFbdi+B9mmkbu64RGPO2gcCtvHFCr3pSojnBQWVMLUjVJpj51dTSNYhBs8pABmJoRA6n8TGNRyaosl7aQ==",
"version": "0.0.1761583653-gd8c2df",
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1761583653-gd8c2df.tgz",
"integrity": "sha512-/sAPMVQkj3sLtuYfv4GAXRBfqrWPHcMXbeWXXqW0+i8GKMsrMIenawwkEzQdCoTH94eZYeS8JlBPde3YFsdDOA==",
"dependencies": {
"@napi-rs/keyring": "1.1.9"
},

View file

@ -9,11 +9,11 @@
buildNpmPackage (finalAttrs: {
pname = "amp-cli";
version = "0.0.1760546826-g6984fa";
version = "0.0.1761583653-gd8c2df";
src = fetchzip {
url = "https://registry.npmjs.org/@sourcegraph/amp/-/amp-${finalAttrs.version}.tgz";
hash = "sha256-aEUBTpQMQ2fgSfioRNXvdkKy4eLTw5XqkeSrt5T5498=";
hash = "sha256-Q6iBVtSIXoy6r+9/s3GefLq5c9SFRSQoBxUjBlg/wh8=";
};
postPatch = ''
@ -45,7 +45,7 @@ buildNpmPackage (finalAttrs: {
chmod +x bin/amp-wrapper.js
'';
npmDepsHash = "sha256-/s1wZhdwvVGOJoasgBs5eCWcvSuIriWi+bfz/Np8h+Y=";
npmDepsHash = "sha256-n8dRIJPTFFhS3aQQKKRdqYcEeHxfpU9XGbeV+2XAVeY=";
propagatedBuildInputs = [
ripgrep

View file

@ -0,0 +1,5 @@
{
python3,
}:
python3.pkgs.toPythonApplication python3.pkgs.beets-minimal

View file

@ -0,0 +1,5 @@
{
python3,
}:
python3.pkgs.toPythonApplication python3.pkgs.beets

View file

@ -34,7 +34,7 @@ assert lib.assertOneOf "policy" policy [
];
let
stdenv' = if static then buildPackages.libxccStdenv else stdenv;
stdenv' = if static then buildPackages.libcxxStdenv else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
version = "3.9.0";

View file

@ -7,16 +7,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-outdated";
version = "0.17.0";
version = "0.18.0";
src = fetchFromGitHub {
owner = "kbknapp";
repo = "cargo-outdated";
rev = "v${version}";
hash = "sha256-ey11ANSflWGnCsn6M9GupgC4DE5mWww6vw5pK0CFdLo=";
hash = "sha256-r7FtuXx9+OmVAdL6+9s2bYHjsURmX60+2c7+2FjkSRs=";
};
cargoHash = "sha256-PYlVXGfitsjEGiw07L5b+L8pfxvtkHshIjTXeuPUTdk=";
cargoHash = "sha256-l4UfmntTRlqRq1040FTzAn/QU33+owv569tcWNXSGN0=";
nativeBuildInputs = [ pkg-config ];

View file

@ -10,16 +10,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "chirpstack-concentratord";
version = "4.5.2";
version = "4.5.3";
src = fetchFromGitHub {
owner = "chirpstack";
repo = "chirpstack-concentratord";
rev = "v${version}";
hash = "sha256-g7GlpibXAS3Nup/mYB2DEP+6UWjYHbSnPHRdpl+3ukA=";
hash = "sha256-D/zp3stjV0EUnUZlEVQ7YwFlczTxG0f0ABPban0JhPM=";
};
cargoHash = "sha256-2ukynvY3ybu5t22PA5sbx3ehlA5aHjbw9v+0y9Bf4TY=";
cargoHash = "sha256-7l/42l1rFX7HXdhgA34FXWpQjksGCnHeARC5YupA2nE=";
buildInputs = [
libloragw-2g4

View file

@ -11,7 +11,7 @@
buildNpmPackage rec {
pname = "clever-tools";
version = "4.2.0";
version = "4.3.0";
nodejs = nodejs_22;
@ -19,10 +19,10 @@ buildNpmPackage rec {
owner = "CleverCloud";
repo = "clever-tools";
rev = version;
hash = "sha256-1llFIq5F4FTxJuIdFov8+XExAZmfIMy81fP7OT2JbbE=";
hash = "sha256-YC6wfa8bz21LhOH5YIRZ94rLxWl4f1m24jmAAsTvbS0=";
};
npmDepsHash = "sha256-UzjGYHIG2fza4HJqiha0dyIqKY9v0O9YvbmcMUcMhAY=";
npmDepsHash = "sha256-KCaLAlJtLsTpjWR8PQtgFYJg0zX5vtu78DKowjE6ygI=";
nativeBuildInputs = [
installShellFiles

View file

@ -4,19 +4,17 @@
fetchFromGitHub,
fetchpatch,
cmake,
ninja,
ctestCheckHook,
testers,
enableStatic ? stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation rec {
pname = "double-conversion";
version = "3.3.1";
src = fetchFromGitHub {
owner = "google";
repo = "double-conversion";
rev = "v${finalAttrs.version}";
rev = "v${version}";
sha256 = "sha256-M80H+azCzQYa4/gBLWv5GNNhEuHsH7LbJ/ajwmACnrM=";
};
@ -32,46 +30,22 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/google/double-conversion/commit/0604b4c18815aadcf7f4b78dfa6bfcb91a634ed7.patch";
hash = "sha256-cJBp1ou1O/bMQ/7kvcX52dWbUdhmPfQ9aWmEhQdyhis=";
})
(fetchpatch {
name = "double-conversion-add-pkg-config.patch";
url = "https://github.com/google/double-conversion/commit/ddfd18c58ecc32fc74afc1083bb8774240b54efb.patch";
hash = "sha256-/pKCL19vS8fNwCm27yTNP+32ApHTH5dEGpnsMI11Lf4=";
})
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
ninja
ctestCheckHook
];
doCheck = true;
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" true)
(lib.cmakeBool "BUILD_SHARED_LIBS" stdenv.hostPlatform.hasSharedLibraries)
];
cmakeFlags = lib.optional (!enableStatic) "-DBUILD_SHARED_LIBS=ON";
# Case sensitivity issue
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
rm BUILD
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = with lib; {
pkgConfigModules = [ "double-conversion" ];
description = "Binary-decimal and decimal-binary routines for IEEE doubles";
homepage = "https://github.com/google/double-conversion";
license = licenses.bsd3;
platforms = platforms.unix ++ platforms.windows;
maintainers = with lib.maintainers; [ fzakaria ];
maintainers = [ ];
};
})
}

View file

@ -4,7 +4,7 @@
fetchFromGitHub,
autoconf-archive,
autoreconfHook,
makeWrapper,
makeBinaryWrapper,
pkg-config,
replaceVarsWith,
curl,
@ -20,7 +20,7 @@
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "eid-mw";
# NOTE: Don't just blindly update to the latest version/tag. Releases are always for a specific OS.
version = "5.1.25";
@ -28,30 +28,34 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "Fedict";
repo = "eid-mw";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-LdOfwgRGyNK+a4SByClPgH9SrDeCdnhI9sLO7agsNsA=";
};
postPatch = ''
sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac
substituteInPlace configure.ac --replace 'p11kitcfdir=""' 'p11kitcfdir="'$out/share/p11-kit/modules'"'
sed 's@m4_esyscmd_s(.*,@[${finalAttrs.version}],@' -i configure.ac
substituteInPlace configure.ac \
--replace-fail 'p11kitcfdir=""' 'p11kitcfdir="'$out/share/p11-kit/modules'"'
'';
strictDeps = true;
nativeBuildInputs = [
wrapGAppsHook3
autoreconfHook
autoconf-archive
autoreconfHook
libassuan
makeBinaryWrapper
openssl
pkg-config
makeWrapper
wrapGAppsHook3
];
buildInputs = [
curl
gtk3
libassuan
libbsd
libproxy
libxml2
openssl
p11-kit
pcsclite
];
@ -62,9 +66,8 @@ stdenv.mkDerivation rec {
ln -s ${openssl.bin}/bin openssl
ln -s ${openssl.dev}/include openssl
export SSL_PREFIX=$(realpath openssl)
substituteInPlace plugins_tools/eid-viewer/Makefile.in \
--replace "c_rehash" "openssl rehash"
'';
# pinentry uses hardcoded `/usr/bin/pinentry`, so use the built-in (uglier) dialogs for pinentry.
configureFlags = [ "--disable-pinentry" ];
@ -81,20 +84,21 @@ stdenv.mkDerivation rec {
''
install -D ${eid-nssdb-in} $out/bin/eid-nssdb
substituteInPlace $out/bin/eid-nssdb \
--replace "modutil" "${nssTools}/bin/modutil"
--replace-fail "modutil" "${lib.getExe' nssTools "modutil"}"
rm $out/bin/about-eid-mw
wrapProgram $out/bin/eid-viewer --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
wrapProgram $out/bin/eid-viewer \
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
'';
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
meta = {
description = "Belgian electronic identity card (eID) middleware";
homepage = "https://eid.belgium.be/en";
license = licenses.lgpl3Only;
license = lib.licenses.lgpl3Only;
longDescription = ''
Allows user authentication and digital signatures with Belgian ID cards.
Also requires a running pcscd service and compatible card reader.
@ -117,10 +121,10 @@ stdenv.mkDerivation rec {
firefox.override { pkcs11Modules = [ pkgs.eid-mw ]; }
'';
platforms = platforms.linux;
maintainers = with maintainers; [
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
bfortz
chvp
];
};
}
})

View file

@ -30,13 +30,13 @@ let
in
stdenv.mkDerivation rec {
pname = "libime";
version = "1.1.11";
version = "1.1.12";
src = fetchFromGitHub {
owner = "fcitx";
repo = "libime";
tag = version;
hash = "sha256-C9l7VBSUdSpnt+8ghdmLljZXHFswTyi/ItqeeYTjF4Y=";
hash = "sha256-LqbwXpmqUCbaKHaaE9pOrHb1Qdp20/S3QEf9F4/3oiE=";
fetchSubmodules = true;
};

View file

@ -27,13 +27,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libqalculate";
version = "5.8.0";
version = "5.8.1";
src = fetchFromGitHub {
owner = "qalculate";
repo = "libqalculate";
tag = "v${finalAttrs.version}";
hash = "sha256-8rw+SPRGWTdlJkrqSk7FXKMgOWSfErlC8FXqQM49o8A=";
hash = "sha256-SxBO3isyxiJBwo12mVH6A/pmHxTgjfMhG6KVb7bk5B4=";
};
outputs = [

View file

@ -31,9 +31,9 @@ let
phome = "$out/lib/olympus";
# The following variables are to be updated by the update script.
version = "25.10.15.03";
buildId = "5232"; # IMPORTANT: This line is matched with regex in update.sh.
rev = "8810c6bd26354658d72eae4571184c00e91617a8";
version = "25.10.25.02";
buildId = "5257"; # IMPORTANT: This line is matched with regex in update.sh.
rev = "026231884815cdda170157b8006852a10c2bd361";
in
buildDotnetModule {
pname = "olympus-unwrapped";
@ -44,7 +44,7 @@ buildDotnetModule {
owner = "EverestAPI";
repo = "Olympus";
fetchSubmodules = true; # Required. See upstream's README.
hash = "sha256-UG1W1jyjmaJ1xoaXP3WZT/G2Or9/3KAvWXBLiGFeEpo=";
hash = "sha256-YfFRi8vWGLJcXrVvYRfokgdFXSys3lRZDK6ggAxxllA=";
};
nativeBuildInputs = [

View file

@ -6,12 +6,12 @@
python3Packages.buildPythonApplication rec {
pname = "onionprobe";
version = "1.4.0";
version = "1.4.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-rjExMm1mkoeRiv+aNuC6Ieo0/X5sbsjuSiAHcnQxjFo=";
sha256 = "sha256-RcEsiYKeNEQil0qp1WzGU9HiCi8iXnPuGK65lcpHor4=";
};
build-system = with python3Packages; [

View file

@ -0,0 +1,89 @@
{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
libxcrypt-legacy,
makeBinaryWrapper,
pgsql-tools,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pgsql-tools";
version = "2.1.0";
src = fetchurl (
let
sources = {
x86_64-linux = {
url = "https://github.com/microsoft/pgsql-tools/releases/download/v${finalAttrs.version}/pgsqltoolsservice-linux-x64.tar.gz";
hash = "sha256-dN7+LJCUwb39ypuJV4p3jUHNGAPaObN4aZvsOHIpmkQ=";
};
aarch64-linux = {
url = "https://github.com/microsoft/pgsql-tools/releases/download/v${finalAttrs.version}/pgsqltoolsservice-linux-arm64.tar.gz";
hash = "sha256-rD8jymGdM1RDGDbrKu6E7xoWtSMRNuc2ngCmR+sHgQI=";
};
x86_64-darwin = {
url = "https://github.com/microsoft/pgsql-tools/releases/download/v${finalAttrs.version}/pgsqltoolsservice-osx-x86.tar.gz";
hash = "sha256-KLl7HPChurzB6QYV6AqAP3g1J3VKl61+we3opzJQwG0=";
};
aarch64-darwin = {
url = "https://github.com/microsoft/pgsql-tools/releases/download/v${finalAttrs.version}/pgsqltoolsservice-osx-arm64.tar.gz";
hash = "sha256-tpabEKB1kqse7D58FsP/9jywk+vgAAvptL9MadwxWg8=";
};
};
in
sources.${stdenv.hostPlatform.system}
);
nativeBuildInputs = [
makeBinaryWrapper
]
++ lib.optionals stdenv.isLinux [
autoPatchelfHook
];
buildInputs = lib.optionals stdenv.isLinux [
libxcrypt-legacy
(lib.getLib stdenv.cc.cc)
];
dontBuild = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib/pgsql-tools
install -Dm755 ossdbtoolsservice_main $out/lib/pgsql-tools/ossdbtoolsservice_main
cp -r _internal $out/lib/pgsql-tools/
makeBinaryWrapper $out/lib/pgsql-tools/ossdbtoolsservice_main $out/bin/ossdbtoolsservice_main \
${lib.optionalString stdenv.isLinux ''--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
libxcrypt-legacy
(lib.getLib stdenv.cc.cc)
]
}"''} \
--chdir $out/lib/pgsql-tools
runHook postInstall
'';
doInstallCheck = true;
passthru = {
updateScript = ./update.sh;
};
meta = {
homepage = "https://github.com/microsoft/pgsql-tools";
description = "Backend service for PostgreSQL server tools, offering features such as connection management, query execution with result set handling, and language service support via the VS Code protocol";
changelog = "https://github.com/microsoft/pgsql-tools/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "ossdbtoolsservice_main";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View file

@ -0,0 +1,33 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash curl jq nix nix-prefetch common-updater-scripts
set -euo pipefail
latestVersion=$(curl --fail --silent https://api.github.com/repos/microsoft/pgsql-tools/releases/latest | jq --raw-output '.tag_name | ltrimstr("v")')
currentVersion=$(nix eval --raw -f . pgsql-tools.version 2>/dev/null || echo "unknown")
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
update-source-version pgsql-tools "$latestVersion" --file=pkgs/by-name/pg/pgsql-tools/package.nix
declare -A platforms=(
["x86_64-linux"]="pgsqltoolsservice-linux-x64.tar.gz"
["aarch64-linux"]="pgsqltoolsservice-linux-arm64.tar.gz"
["x86_64-darwin"]="pgsqltoolsservice-osx-x86.tar.gz"
["aarch64-darwin"]="pgsqltoolsservice-osx-arm64.tar.gz"
)
for system in "${!platforms[@]}"; do
filename="${platforms[$system]}"
url="https://github.com/microsoft/pgsql-tools/releases/download/v${latestVersion}/${filename}"
echo "Updating hash for $system..."
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "$url"))
update-source-version pgsql-tools "$latestVersion" "$hash" --system="$system" --ignore-same-version --ignore-same-hash
done

View file

@ -7,16 +7,16 @@
rustPlatform.buildRustPackage rec {
pname = "polarity";
version = "latest-unstable-2025-10-14";
version = "latest-unstable-2025-10-27";
src = fetchFromGitHub {
owner = "polarity-lang";
repo = "polarity";
rev = "cd882ce79d4ebd4527f87386dba32574cefc9535";
hash = "sha256-aRFAWIp8luAofr/5rSNYZQgjsZFeU8xvTE7RrnHRKKI=";
rev = "bac4a2ba743551fe5986d8b4e840ee53ae8e065d";
hash = "sha256-7sp/7U1AoudUEEM9Pa4BcXNRiym70MnOx3NiSUOQb9o=";
};
cargoHash = "sha256-yU+P8CqefuyDDYiaoslQ58HsXDT6iKzmNYekZwaaL3A=";
cargoHash = "sha256-DyqK5cxdsZWMr79clw8oRHTAAlzGzP8i4Vu/UXH/ptE=";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

View file

@ -9,11 +9,11 @@
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "proton-pass";
version = "1.32.6";
version = "1.32.10";
src = fetchurl {
url = "https://proton.me/download/pass/linux/x64/proton-pass_${finalAttrs.version}_amd64.deb";
hash = "sha256-xtptEi/H15fEABrlPE854uSWagr2kt2/h33SuegVab8=";
hash = "sha256-FeU7ubjT1WqtviCPA78SW8zZi1h6gnj7erFebg2mgg4=";
};
dontConfigure = true;

View file

@ -14,13 +14,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "qalculate-gtk";
version = "5.8.0";
version = "5.8.1";
src = fetchFromGitHub {
owner = "qalculate";
repo = "qalculate-gtk";
tag = "v${finalAttrs.version}";
hash = "sha256-cK710enmkSgp3r4MEfyWac/V7mMs+CPxq0LrdX2jZTQ=";
hash = "sha256-+vyFdenXp/lLYoD0LwVUf9v8bVw2+NH6q2HiP349Ajw=";
};
hardeningDisable = [ "format" ];

View file

@ -16,6 +16,7 @@
callPackage,
withFoundationdb ? false,
stalwartEnterprise ? false,
buildPackages,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@ -173,7 +174,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
passthru = {
inherit rocksdb; # make used rocksdb version available (e.g., for backup scripts)
webadmin = callPackage ./webadmin.nix { };
webadmin = buildPackages.callPackage ./webadmin.nix { };
spam-filter = callPackage ./spam-filter.nix { };
updateScript = nix-update-script { };
tests.stalwart-mail = nixosTests.stalwart-mail;

View file

@ -23,6 +23,7 @@
xorg,
# wpsoffice runtime dependencies
cups,
dbus,
pango,
}:
@ -51,10 +52,9 @@ let
}
''
readonly SECURITY_KEY="7f8faaaa468174dc1c9cd62e5f218a5b"
prefix="https://wps-linux-personal.wpscdn.cn"
timestamp10=$(date '+%s')
md5hash=($(printf '%s' "$SECURITY_KEY''${${url}#$prefix}$timestamp10" | md5sum))
md5hash=($(printf '%s' "$SECURITY_KEY${lib.removePrefix "https://wps-linux-personal.wpscdn.cn" url}$timestamp10" | md5sum))
curl --retry 3 --retry-delay 3 "${url}?t=$timestamp10&k=$md5hash" > $out
'';
@ -96,6 +96,7 @@ stdenv.mkDerivation {
runtimeDependencies = map lib.getLib [
cups
dbus
pango
];

View file

@ -35,13 +35,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "xemu";
version = "0.8.108";
version = "0.8.109";
src = fetchFromGitHub {
owner = "xemu-project";
repo = "xemu";
tag = "v${finalAttrs.version}";
hash = "sha256-+bQNy3UvRT9GKwsRNFezbyeXKzCnHw9S8GdT+UQc+Kw=";
hash = "sha256-1SJGcwnDvqEnm2Z9O4TNo+417CJrwHRgzuRzewzIbXY=";
nativeBuildInputs = [
git

View file

@ -28,9 +28,9 @@ let
"20.1.8".officialRelease.sha256 = "sha256-ysyB/EYxi2qE9fD5x/F2zI4vjn8UDoo1Z9ukiIrjFGw=";
"21.1.2".officialRelease.sha256 = "sha256-SgZdBL0ivfv6/4EqmPQ+I57qT2t6i/rqnm20+T1BsFY=";
"22.0.0-git".gitRelease = {
rev = "6afccac4148253d4f9a90ad0a51cba0995f92fad";
rev-version = "22.0.0-unstable-2025-10-19";
sha256 = "sha256-mQBSRibRygpWIMjICzhza2U8xb/y9EM3SmtnNFfCWpY=";
rev = "aed12c33ade9ea48f1a596cd98fde958803a17a7";
rev-version = "22.0.0-unstable-2025-10-27";
sha256 = "sha256-RnY+2/t4cGdjzh5sSsUPxOZ7xo4oUu4MkGSyOFBsk1s=";
};
}
// llvmVersions;

View file

@ -0,0 +1,74 @@
{
lib,
fetchFromGitHub,
fetchpatch,
buildPythonPackage,
# build-system
poetry-core,
# nativeBuildInputs
beets-minimal,
# tests
pytestCheckHook,
pytest-cov-stub,
mock,
pillow,
tomli,
typeguard,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "beets-alternatives";
version = "0.13.4";
pyproject = true;
src = fetchFromGitHub {
repo = "beets-alternatives";
owner = "geigerzaehler";
tag = "v${version}";
hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ=";
};
patches = [
# Fixes build failure by ignoring DeprecationWarning during tests.
(fetchpatch {
url = "https://github.com/geigerzaehler/beets-alternatives/commit/3c15515edfe62d5d6c8f3fb729bf3dcef41c1ffa.patch";
hash = "sha256-gZXftDI5PXJ0c65Z1HLABJ2SlDnXU78xxIEt7IGp8RQ=";
excludes = [
"poetry.lock"
];
})
];
build-system = [
poetry-core
];
nativeBuildInputs = [
beets-minimal
];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
mock
pillow
tomli
typeguard
writableTmpDirAsHomeHook
];
meta = {
description = "Beets plugin to manage external files";
homepage = "https://github.com/geigerzaehler/beets-alternatives";
changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md";
maintainers = with lib.maintainers; [
aszlig
lovesegfault
];
license = lib.licenses.mit;
};
}

View file

@ -1,11 +1,24 @@
{
beets,
fetchFromGitHub,
lib,
fetchFromGitHub,
buildPythonPackage,
# build-system
hatchling,
# native
beets,
# dependencies
markdownify,
natsort,
tldextract,
# passthru
nix-update-script,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
buildPythonPackage rec {
pname = "beets-audible";
version = "1.0.2";
pyproject = true;
@ -17,17 +30,17 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs=";
};
build-system = [
hatchling
];
nativeBuildInputs = [
beets
];
pythonRelaxDeps = true;
build-system = with python3Packages; [
hatchling
];
dependencies = with python3Packages; [
dependencies = [
markdownify
natsort
tldextract

View file

@ -1,12 +1,23 @@
{
lib,
beets,
fetchFromGitHub,
python3Packages,
buildPythonPackage,
# build-system
setuptools,
# nativeBuildInputs
beets-minimal,
# dependencies
six,
# tests
pytestCheckHook,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
buildPythonPackage rec {
pname = "beets-copyartifacts";
version = "0.1.5";
pyproject = true;
@ -27,20 +38,20 @@ python3Packages.buildPythonApplication rec {
sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py
'';
nativeBuildInputs = [
beets
];
build-system = with python3Packages; [
build-system = [
setuptools
];
dependencies = with python3Packages; [
nativeBuildInputs = [
beets-minimal
];
dependencies = [
six
];
nativeCheckInputs = [
python3Packages.pytestCheckHook
pytestCheckHook
writableTmpDirAsHomeHook
];
@ -55,7 +66,7 @@ python3Packages.buildPythonApplication rec {
homepage = "https://github.com/adammillerio/beets-copyartifacts";
changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}";
license = lib.licenses.mit;
inherit (beets.meta) platforms;
inherit (beets-minimal.meta) platforms;
# Isn't compatible with beets >= 2.3
broken = true;
};

View file

@ -1,13 +1,26 @@
{
lib,
fetchFromGitHub,
python3Packages,
beets,
beetsPackages,
buildPythonPackage,
# build-system
poetry-core,
# nativeBuildInputs
beets-minimal,
# tests
pytestCheckHook,
beets-audible,
mediafile,
pytest,
reflink,
toml,
typeguard,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
buildPythonPackage rec {
pname = "beets-filetote";
version = "1.1.0";
pyproject = true;
@ -23,41 +36,30 @@ python3Packages.buildPythonApplication rec {
substituteInPlace pyproject.toml --replace-fail "poetry-core<2.0.0" "poetry-core"
'';
nativeBuildInputs = [
beets
build-system = [
poetry-core
];
build-system = [ python3Packages.poetry-core ];
nativeBuildInputs = [
beets-minimal
];
dependencies = with python3Packages; [
dependencies = [
mediafile
reflink
toml
typeguard
];
optional-dependencies = {
lint = with python3Packages; [
black
check-manifest
flake8
flake8-bugbear
flake8-bugbear-pyi
isort
mypy
pylint
typing_extensions
];
test = with python3Packages; [
beetsPackages.audible
mediafile
pytest
reflink
toml
typeguard
];
dev = optional-dependencies.lint ++ optional-dependencies.test ++ [ python3Packages.tox ];
};
nativeCheckInputs = [
pytestCheckHook
beets-audible
mediafile
reflink
toml
typeguard
writableTmpDirAsHomeHook
];
pytestFlags = [
# This is the same as:
@ -71,19 +73,13 @@ python3Packages.buildPythonApplication rec {
"tests/test_version.py"
];
nativeCheckInputs = [
python3Packages.pytestCheckHook
writableTmpDirAsHomeHook
]
++ optional-dependencies.test;
meta = with lib; {
meta = {
description = "Beets plugin to move non-music files during the import process";
homepage = "https://github.com/gtronset/beets-filetote";
changelog = "https://github.com/gtronset/beets-filetote/blob/${src.tag}/CHANGELOG.md";
maintainers = with maintainers; [ dansbandit ];
license = licenses.mit;
inherit (beets.meta) platforms;
maintainers = with lib.maintainers; [ dansbandit ];
license = lib.licenses.mit;
inherit (beets-minimal.meta) platforms;
# https://github.com/gtronset/beets-filetote/issues/211
broken = true;
};

View file

@ -0,0 +1,495 @@
/*
** To customize the enabled beets plugins, use the pluginOverrides input to the
** derivation.
** Examples:
**
** Disabling a builtin plugin:
** python3.pkgs.beets.override {
** pluginOverrides = {
** beatport.enable = false;
** };
** }
**
** Enabling an external plugin:
** python3.pkgs.beets.override {
** pluginOverrides = {
** alternatives = {
** enable = true;
** propagatedBuildInputs = [ beets-alternatives ];
** };
** };
** }
*/
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
beets,
# build-system
poetry-core,
poetry-dynamic-versioning,
# dependencies
confuse,
gst-python,
jellyfish,
mediafile,
munkres,
musicbrainzngs,
platformdirs,
pyyaml,
unidecode,
reflink,
typing-extensions,
lap,
# native
gobject-introspection,
sphinxHook,
sphinx-design,
sphinx-copybutton,
pydata-sphinx-theme,
# buildInputs
gst_all_1,
# plugin deps
aacgain,
beautifulsoup4,
chromaprint,
discogs-client,
ffmpeg,
flac,
flask,
flask-cors,
imagemagick,
keyfinder-cli,
langdetect,
librosa,
mp3gain,
mp3val,
mpd2,
pyacoustid,
pylast,
pyxdg,
requests,
requests-oauthlib,
resampy,
soco,
# configurations
extraPatches ? [ ],
pluginOverrides ? { },
disableAllPlugins ? false,
extraDisabledTests ? [ ],
extraNativeBuildInputs ? [ ],
# tests
pytestCheckHook,
pytest-cov-stub,
mock,
rarfile,
responses,
requests-mock,
pillow,
writableTmpDirAsHomeHook,
# preCheck
bashInteractive,
diffPlugins,
runtimeShell,
writeScript,
# passthru.tests
runCommand,
}:
buildPythonPackage rec {
pname = "beets";
version = "2.5.1";
src = fetchFromGitHub {
owner = "beetbox";
repo = "beets";
tag = "v${version}";
hash = "sha256-H3jcEHyK13+RHVlV4zp+8M3LZ0Jc2FdmAbLpekGozLA=";
};
pyproject = true;
patches = [
# Bash completion fix for Nix
./bash-completion-always-print.patch
]
++ extraPatches;
build-system = [
poetry-core
poetry-dynamic-versioning
];
dependencies = [
confuse
gst-python
jellyfish
mediafile
munkres
musicbrainzngs
platformdirs
pyyaml
unidecode
# Can be built without it, but is useful on btrfs systems, and doesn't
# add too much to the closure. See:
# https://github.com/NixOS/nixpkgs/issues/437308
reflink
typing-extensions
lap
]
++ (lib.concatMap (p: p.propagatedBuildInputs) (lib.attrValues passthru.plugins.enabled));
nativeBuildInputs = [
gobject-introspection
sphinxHook
sphinx-design
sphinx-copybutton
pydata-sphinx-theme
]
++ extraNativeBuildInputs;
buildInputs = with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
];
outputs = [
"out"
"doc"
"man"
];
sphinxBuilders = [
"html"
"man"
];
# Causes an installManPage error. Not clear why this directory gets generated
# with the manpages. The same directory is observed correctly in
# $doc/share/doc/beets-${version}/html
preInstallSphinx = ''
rm -r .sphinx/man/man/_sphinx_design_static
'';
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp extra/_beet $out/share/zsh/site-functions/
'';
makeWrapperArgs = [
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
"--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
"--prefix PATH : ${lib.makeBinPath passthru.plugins.wrapperBins}"
];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
mock
rarfile
responses
requests-mock
pillow
writableTmpDirAsHomeHook
]
++ passthru.plugins.wrapperBins;
__darwinAllowLocalNetworking = true;
disabledTestPaths =
passthru.plugins.disabledTestPaths
++ [
# touches network
"test/plugins/test_aura.py"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Flaky: several tests fail randomly with:
# if not self._poll(timeout):
# raise Empty
# _queue.Empty
"test/plugins/test_bpd.py"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
# fail on Hydra with `RuntimeError: image cannot be obtained without artresizer backend`
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_percent_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_px_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_minwidth"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced_and_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_not_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_and_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_but_not_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize"
];
disabledTests = extraDisabledTests ++ [
# touches network
"test_merge_duplicate_album"
# The existence of the dependency reflink (see comment above), causes this
# test to be run, and it fails in the sandbox.
"test_successful_reflink"
];
# Perform extra "sanity checks", before running pytest tests.
preCheck = ''
# Check for undefined plugins
find beetsplug -mindepth 1 \
\! -path 'beetsplug/__init__.py' -a \
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
| sort -u > plugins_available
${diffPlugins (lib.attrNames passthru.plugins.builtins) "plugins_available"}
export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc"
env EDITOR="${writeScript "beetconfig.sh" ''
#!${runtimeShell}
cat > "$1" <<CFG
plugins: ${lib.concatStringsSep " " (lib.attrNames passthru.plugins.enabled)}
CFG
''}" "$out/bin/beet" config -e
env EDITOR=true "$out/bin/beet" config -e
'';
passthru = {
plugins = {
builtins = {
absubmit = {
deprecated = true;
testPaths = [ ];
};
advancedrewrite = {
testPaths = [ ];
};
acousticbrainz = {
deprecated = true;
propagatedBuildInputs = [ requests ];
};
albumtypes = { };
aura = {
propagatedBuildInputs = [
flask
flask-cors
pillow
];
};
autobpm = {
propagatedBuildInputs = [
librosa
# An optional dependency of librosa, needed for beets' autobpm
resampy
];
};
badfiles = {
testPaths = [ ];
wrapperBins = [
mp3val
flac
];
};
bareasc = { };
beatport.propagatedBuildInputs = [ requests-oauthlib ];
bench.testPaths = [ ];
bpd.testPaths = [ ];
bpm.testPaths = [ ];
bpsync.testPaths = [ ];
bucket = { };
chroma = {
propagatedBuildInputs = [ pyacoustid ];
testPaths = [ ];
wrapperBins = [
chromaprint
];
};
convert.wrapperBins = [ ffmpeg ];
deezer = {
propagatedBuildInputs = [ requests ];
testPaths = [ ];
};
discogs.propagatedBuildInputs = [
discogs-client
requests
];
duplicates.testPaths = [ ];
edit = { };
embedart = {
propagatedBuildInputs = [ pillow ];
wrapperBins = [ imagemagick ];
};
embyupdate.propagatedBuildInputs = [ requests ];
export = { };
fetchart = {
propagatedBuildInputs = [
beautifulsoup4
langdetect
pillow
requests
];
wrapperBins = [ imagemagick ];
};
filefilter = { };
fish.testPaths = [ ];
freedesktop.testPaths = [ ];
fromfilename.testPaths = [ ];
ftintitle = { };
fuzzy.testPaths = [ ];
gmusic.testPaths = [ ];
hook = { };
ihate = { };
importadded = { };
importfeeds = { };
info = { };
inline.testPaths = [ ];
ipfs = { };
keyfinder.wrapperBins = [ keyfinder-cli ];
kodiupdate = {
propagatedBuildInputs = [ requests ];
testPaths = [ ];
};
lastgenre.propagatedBuildInputs = [ pylast ];
lastimport = {
propagatedBuildInputs = [ pylast ];
testPaths = [ ];
};
limit = { };
listenbrainz = {
testPaths = [ ];
};
loadext = {
propagatedBuildInputs = [ requests ];
testPaths = [ ];
};
lyrics.propagatedBuildInputs = [
beautifulsoup4
langdetect
requests
];
mbcollection.testPaths = [ ];
mbsubmit = { };
mbsync = { };
metasync.testPaths = [ ];
missing.testPaths = [ ];
mpdstats.propagatedBuildInputs = [ mpd2 ];
mpdupdate = {
propagatedBuildInputs = [ mpd2 ];
testPaths = [ ];
};
musicbrainz = { };
parentwork = { };
permissions = { };
play = { };
playlist.propagatedBuildInputs = [ requests ];
plexupdate = { };
random = { };
replace = { };
replaygain.wrapperBins = [
aacgain
ffmpeg
mp3gain
];
rewrite.testPaths = [ ];
scrub.testPaths = [ ];
smartplaylist = { };
sonosupdate = {
propagatedBuildInputs = [ soco ];
testPaths = [ ];
};
spotify = { };
subsonicplaylist = {
propagatedBuildInputs = [ requests ];
testPaths = [ ];
};
subsonicupdate.propagatedBuildInputs = [ requests ];
substitute = {
testPaths = [ ];
};
the = { };
thumbnails = {
propagatedBuildInputs = [
pillow
pyxdg
];
wrapperBins = [ imagemagick ];
};
types.testPaths = [ "test/plugins/test_types_plugin.py" ];
unimported.testPaths = [ ];
web.propagatedBuildInputs = [
flask
flask-cors
];
zero = { };
_typing = {
testPaths = [ ];
};
_utils = {
testPaths = [ ];
};
};
base = lib.mapAttrs (_: a: { builtin = true; } // a) passthru.plugins.builtins;
overrides = lib.mapAttrs (
plugName:
lib.throwIf (passthru.plugins.builtins.${plugName}.deprecated or false)
"beets evaluation error: Plugin ${plugName} was enabled in pluginOverrides, but it has been removed. Remove the override to fix evaluation."
) pluginOverrides;
all = lib.mapAttrs (
n: a:
{
name = n;
enable = !disableAllPlugins;
builtin = false;
propagatedBuildInputs = [ ];
testPaths = [ "test/plugins/test_${n}.py" ];
wrapperBins = [ ];
}
// a
) (lib.recursiveUpdate passthru.plugins.base passthru.plugins.overrides);
enabled = lib.filterAttrs (_: p: p.enable) passthru.plugins.all;
disabled = lib.filterAttrs (_: p: !p.enable) passthru.plugins.all;
disabledTestPaths = lib.flatten (
lib.attrValues (lib.mapAttrs (_: v: v.testPaths) passthru.plugins.disabled)
);
wrapperBins = lib.concatMap (p: p.wrapperBins) (lib.attrValues passthru.plugins.enabled);
};
tests = {
gstreamer =
runCommand "beets-gstreamer-test"
{
meta.timeout = 60;
}
''
set -euo pipefail
export HOME=$(mktemp -d)
mkdir $out
cat << EOF > $out/config.yaml
replaygain:
backend: gstreamer
EOF
${beets}/bin/beet -c $out/config.yaml > /dev/null
'';
};
};
meta = {
description = "Music tagger and library organizer";
homepage = "https://beets.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
doronbehar
lovesegfault
montchr
pjones
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "beet";
};
}

View file

@ -2,15 +2,21 @@
lib,
buildPythonPackage,
fetchFromGitHub,
flit-core,
pyyaml,
pytestCheckHook,
pythonOlder,
# build-system
flit-core,
# dependencies
pyyaml,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "confuse";
version = "1.7.0";
version = "2.0.1";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -19,21 +25,30 @@ buildPythonPackage rec {
owner = "beetbox";
repo = "confuse";
rev = "v${version}";
hash = "sha256-zdH5DNXnuAfYTuaG9EIKiXL2EbLSfzYjPSkC3G06bU8=";
hash = "sha256-TVx0cBXv/fIuli/xrFXBAmwJ1rQr5xJL1Q67FaDr4ow=";
};
nativeBuildInputs = [ flit-core ];
build-system = [
flit-core
];
propagatedBuildInputs = [ pyyaml ];
dependencies = [
pyyaml
];
nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "confuse" ];
meta = with lib; {
meta = {
description = "Python configuration library for Python that uses YAML";
homepage = "https://github.com/beetbox/confuse";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
lovesegfault
doronbehar
];
};
}

View file

@ -36,16 +36,26 @@
buildPythonPackage rec {
pname = "keras";
version = "3.11.3";
version = "3.12.0";
pyproject = true;
src = fetchFromGitHub {
owner = "keras-team";
repo = "keras";
tag = "v${version}";
hash = "sha256-J/NPLR9ShKhvHDU0/NpUNp95RViS2KygqvnuDHdwiP0=";
hash = "sha256-xuCxeQD8NAn7zlqCG+GyFjL6NlnIkGie+4GxzLGsyUg=";
};
# Use a raw string to prevent LaTeX codes from being interpreted as escape sequences.
# SyntaxError: invalid escape sequence '\h
# Fix submitted upstream: https://github.com/keras-team/keras/pull/21790
postPatch = ''
substituteInPlace keras/src/quantizers/gptq_test.py \
--replace-fail \
'CALIBRATION_TEXT = """' \
'CALIBRATION_TEXT = r"""'
'';
build-system = [
setuptools
];
@ -87,6 +97,25 @@ buildPythonPackage rec {
"test_fit_with_data_adapter_grain_dataloader"
"test_fit_with_data_adapter_grain_datast"
"test_fit_with_data_adapter_grain_datast_with_len"
"test_image_dataset_from_directory_binary_grain"
"test_image_dataset_from_directory_color_modes_grain"
"test_image_dataset_from_directory_crop_to_aspect_ratio_grain"
"test_image_dataset_from_directory_follow_links_grain"
"test_image_dataset_from_directory_manual_labels_grain"
"test_image_dataset_from_directory_multiclass_grain"
"test_image_dataset_from_directory_no_labels_grain"
"test_image_dataset_from_directory_not_batched_grain"
"test_image_dataset_from_directory_pad_to_aspect_ratio_grain"
"test_image_dataset_from_directory_shuffle_grain"
"test_image_dataset_from_directory_validation_split_grain"
"test_sample_count_grain"
"test_text_dataset_from_directory_binary_grain"
"test_text_dataset_from_directory_follow_links_grain"
"test_text_dataset_from_directory_manual_labels_grain"
"test_text_dataset_from_directory_multiclass_grain"
"test_text_dataset_from_directory_not_batched_grain"
"test_text_dataset_from_directory_standalone_grain"
"test_text_dataset_from_directory_validation_split_grain"
# Tries to install the package in the sandbox
"test_keras_imports"
@ -179,6 +208,9 @@ buildPythonPackage rec {
disabledTestPaths = [
# Require unpackaged `grain`
"keras/src/layers/preprocessing/data_layer_test.py"
"keras/src/layers/preprocessing/image_preprocessing/resizing_test.py"
"keras/src/layers/preprocessing/rescaling_test.py"
"keras/src/trainers/data_adapters/grain_dataset_adapter_test.py"
# These tests succeed when run individually, but crash within the full test suite:

View file

@ -0,0 +1,124 @@
{
autoconf,
automake,
cunit,
fetchFromGitHub,
fetchpatch,
installShellFiles,
lib,
libtool,
libxml2,
perl,
postgresql,
postgresqlBuildExtension,
postgresqlTestExtension,
postgresqlTestHook,
sphinx,
which,
zlib,
}:
postgresqlBuildExtension (finalAttrs: {
pname = "pointcloud";
version = "1.2.5";
outputs = [
"out"
"man"
];
src = fetchFromGitHub {
owner = "pgpointcloud";
repo = "pointcloud";
tag = "v${finalAttrs.version}";
hash = "sha256-uFbScxq21kt0jOjjyfMeO3i+bG2/kWS/Rrt3ZpOqEns=";
};
nativeBuildInputs = [
autoconf
automake
installShellFiles
libtool
perl
# for doc
sphinx
# needed by the configure phase
which
];
buildInputs = [
zlib
];
doCheck = !(postgresqlTestHook.meta.broken);
checkInputs = [
cunit
];
nativeCheckInputs = [
postgresql
postgresqlTestHook
];
preConfigure = ''
./autogen.sh
'';
configureFlags = [
(lib.withFeatureAs true "xml2config" (lib.getExe' (lib.getDev libxml2) "xml2-config"))
];
postInstall = ''
cd doc
make man
installManPage build/man/pgpointcloud.1
'';
passthru.tests = {
extension = postgresqlTestExtension {
inherit (finalAttrs) finalPackage;
# see https://pgpointcloud.github.io/pointcloud/concepts/schemas.html
withPackages = [ "postgis" ];
sql = builtins.readFile ./tests.sql;
asserts = [
{
query = "pc_version()";
expected = "'${lib.versions.major finalAttrs.version}.${lib.versions.minor finalAttrs.version}.${lib.versions.patch finalAttrs.version}'";
description = "pc_version() returns correct values.";
}
{
query = "pc_postgis_version()";
expected = "'${lib.versions.major finalAttrs.version}.${lib.versions.minor finalAttrs.version}.${lib.versions.patch finalAttrs.version}'";
description = "pc_postgis_version() returns correct values.";
}
# these tests are taken from the documentation of respective methods
{
query = "SELECT PC_AsText('010100000064CEFFFF94110000703000000400'::pcpoint)";
expected = "'{\"pcid\":1,\"pt\":[-127,45,124,4]}'";
description = "Creating a point and displaying as text returns correct string";
}
{
query = "SELECT ST_AsText(PC_MakePoint(1, ARRAY[-127, 45, 124.0, 4.0])::geometry)";
expected = "'POINT Z (-127 45 124)'";
description = "Casting a pcpoint to a postgis geometry works";
}
];
};
};
meta = {
description = "PostgreSQL extension for storing point cloud (LIDAR) data";
longDescription = ''
# pgPointcloud - A PostgreSQL extension for storing point cloud (LIDAR) data.
LIDAR point cloud are becoming more and more available. Devices are easy to get, not too expensive, and provide very accurate 3D points. pgPointCLoud is an open source PostgreSQL extension for storing point cloud data and use it with PostGIS. It is very easy to use, robust and efficient.
By storing LIDAR points in a PostgreSQL database, pgPointcloud eases many problems and allows a good integration with other geo-spatial data (vector, raster) into one common framework : PostGIS.
'';
homepage = "https://pgpointcloud.github.io/pointcloud/";
changelog = "https://github.com/pgpointcloud/pointcloud/blob/v${finalAttrs.version}/NEWS";
license = lib.licenses.bsd3;
teams = [ lib.teams.geospatial ];
inherit (postgresql.meta) platforms;
};
})

View file

@ -0,0 +1,55 @@
CREATE EXTENSION pointcloud;
CREATE EXTENSION pointcloud_postgis CASCADE;
INSERT INTO pointcloud_formats
(pcid, srid, schema) VALUES (
1,
4326,
'<?xml version="1.0" encoding="UTF-8"?>
<pc:PointCloudSchema xmlns:pc="http://pointcloud.org/schemas/PC/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pc:dimension>
<pc:position>1</pc:position>
<pc:size>4</pc:size>
<pc:description>X coordinate as a long integer. You must use the
scale and offset information of the header to
determine the double value.</pc:description>
<pc:name>X</pc:name>
<pc:interpretation>int32_t</pc:interpretation>
<pc:scale>0.01</pc:scale>
</pc:dimension>
<pc:dimension>
<pc:position>2</pc:position>
<pc:size>4</pc:size>
<pc:description>Y coordinate as a long integer. You must use the
scale and offset information of the header to
determine the double value.</pc:description>
<pc:name>Y</pc:name>
<pc:interpretation>int32_t</pc:interpretation>
<pc:scale>0.01</pc:scale>
</pc:dimension>
<pc:dimension>
<pc:position>3</pc:position>
<pc:size>4</pc:size>
<pc:description>Z coordinate as a long integer. You must use the
scale and offset information of the header to
determine the double value.</pc:description>
<pc:name>Z</pc:name>
<pc:interpretation>int32_t</pc:interpretation>
<pc:scale>0.01</pc:scale>
</pc:dimension>
<pc:dimension>
<pc:position>4</pc:position>
<pc:size>2</pc:size>
<pc:description>The intensity value is the integer representation
of the pulse return magnitude. This value is optional
and system specific. However, it should always be
included if available.</pc:description>
<pc:name>Intensity</pc:name>
<pc:interpretation>uint16_t</pc:interpretation>
<pc:scale>1</pc:scale>
</pc:dimension>
<pc:metadata>
<Metadata name="compression">dimensional</Metadata>
</pc:metadata>
</pc:PointCloudSchema>'
);

View file

@ -397,7 +397,6 @@ let
];
sourceProvenance = listOf attrs;
maintainers = listOf (attrsOf any); # TODO use the maintainer type from lib/tests/maintainer-module.nix
nonTeamMaintainers = listOf (attrsOf any); # TODO use the maintainer type from lib/tests/maintainer-module.nix
teams = listOf (attrsOf any); # TODO similar to maintainers, use a teams type
priority = int;
pkgConfigModules = listOf str;
@ -671,10 +670,6 @@ let
maintainers =
attrs.meta.maintainers or [ ] ++ concatMap (team: team.members or [ ]) attrs.meta.teams or [ ];
# Needed for CI to be able to avoid requesting reviews from individual
# team members
nonTeamMaintainers = attrs.meta.maintainers or [ ];
identifiers =
let
# nix-env writes a warning for each derivation that has null in its meta values, so

View file

@ -1,184 +0,0 @@
{
aacgain,
chromaprint,
ffmpeg,
flac,
imagemagick,
keyfinder-cli,
mp3gain,
mp3val,
python3Packages,
version,
lib,
...
}:
{
absubmit = {
deprecated = true;
testPaths = [ ];
};
advancedrewrite = {
testPaths = [ ];
};
acousticbrainz = {
deprecated = true;
propagatedBuildInputs = [ python3Packages.requests ];
};
albumtypes = { };
aura = {
propagatedBuildInputs = with python3Packages; [
flask
flask-cors
pillow
];
};
autobpm = {
propagatedBuildInputs = with python3Packages; [
librosa
# An optional dependency of librosa, needed for beets' autobpm
resampy
];
};
badfiles = {
testPaths = [ ];
wrapperBins = [
mp3val
flac
];
};
bareasc = { };
beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ];
bench.testPaths = [ ];
bpd.testPaths = [ ];
bpm.testPaths = [ ];
bpsync.testPaths = [ ];
bucket = { };
chroma = {
propagatedBuildInputs = [ python3Packages.pyacoustid ];
testPaths = [ ];
wrapperBins = [
chromaprint
];
};
convert.wrapperBins = [ ffmpeg ];
deezer = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
discogs.propagatedBuildInputs = with python3Packages; [
discogs-client
requests
];
duplicates.testPaths = [ ];
edit = { };
embedart = {
propagatedBuildInputs = with python3Packages; [ pillow ];
wrapperBins = [ imagemagick ];
};
embyupdate.propagatedBuildInputs = [ python3Packages.requests ];
export = { };
fetchart = {
propagatedBuildInputs = with python3Packages; [
beautifulsoup4
langdetect
pillow
requests
];
wrapperBins = [ imagemagick ];
};
filefilter = { };
fish.testPaths = [ ];
freedesktop.testPaths = [ ];
fromfilename.testPaths = [ ];
ftintitle = { };
fuzzy.testPaths = [ ];
gmusic.testPaths = [ ];
hook = { };
ihate = { };
importadded = { };
importfeeds = { };
info = { };
inline.testPaths = [ ];
ipfs = { };
keyfinder.wrapperBins = [ keyfinder-cli ];
kodiupdate = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lastgenre.propagatedBuildInputs = [ python3Packages.pylast ];
lastimport = {
propagatedBuildInputs = [ python3Packages.pylast ];
testPaths = [ ];
};
limit = { };
listenbrainz = {
testPaths = [ ];
};
loadext = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lyrics.propagatedBuildInputs = with python3Packages; [
beautifulsoup4
langdetect
requests
];
mbcollection.testPaths = [ ];
mbsubmit = { };
mbsync = { };
metasync.testPaths = [ ];
missing.testPaths = [ ];
mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ];
mpdupdate = {
propagatedBuildInputs = [ python3Packages.mpd2 ];
testPaths = [ ];
};
musicbrainz = { };
parentwork = { };
permissions = { };
play = { };
playlist.propagatedBuildInputs = [ python3Packages.requests ];
plexupdate = { };
random = { };
replace = { };
replaygain.wrapperBins = [
aacgain
ffmpeg
mp3gain
];
rewrite.testPaths = [ ];
scrub.testPaths = [ ];
smartplaylist = { };
sonosupdate = {
propagatedBuildInputs = [ python3Packages.soco ];
testPaths = [ ];
};
spotify = { };
subsonicplaylist = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ];
substitute = {
testPaths = [ ];
};
the = { };
thumbnails = {
propagatedBuildInputs = with python3Packages; [
pillow
pyxdg
];
wrapperBins = [ imagemagick ];
};
types.testPaths = [ "test/plugins/test_types_plugin.py" ];
unimported.testPaths = [ ];
web.propagatedBuildInputs = with python3Packages; [
flask
flask-cors
];
zero = { };
_typing = {
testPaths = [ ];
};
_utils = { };
}

View file

@ -1,269 +0,0 @@
{
lib,
stdenv,
src,
version,
fetchpatch,
bashInteractive,
diffPlugins,
gobject-introspection,
gst_all_1,
python3Packages,
sphinxHook,
writableTmpDirAsHomeHook,
runtimeShell,
writeScript,
# plugin deps, used indirectly by the @inputs when we `import ./builtin-plugins.nix`
aacgain,
chromaprint,
essentia-extractor,
ffmpeg,
flac,
imagemagick,
keyfinder-cli,
mp3gain,
mp3val,
extraPatches ? [ ],
pluginOverrides ? { },
disableAllPlugins ? false,
disabledTests ? [ ],
extraNativeBuildInputs ? [ ],
# tests
runCommand,
beets,
}@inputs:
let
inherit (lib) attrNames attrValues concatMap;
mkPlugin =
{
name,
enable ? !disableAllPlugins,
builtin ? false,
propagatedBuildInputs ? [ ],
testPaths ? [
"test/plugins/test_${name}.py"
],
wrapperBins ? [ ],
}:
{
inherit
name
enable
builtin
propagatedBuildInputs
testPaths
wrapperBins
;
};
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
pluginOverrides' = lib.mapAttrs (
plugName:
lib.throwIf (basePlugins.${plugName}.deprecated or false)
"beets evaluation error: Plugin ${plugName} was enabled in pluginOverrides, but it has been removed. Remove the override to fix evaluation."
) pluginOverrides;
allPlugins = lib.mapAttrs (n: a: mkPlugin { name = n; } // a) (
lib.recursiveUpdate basePlugins pluginOverrides'
);
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (_: v: v.testPaths) disabledPlugins));
pluginWrapperBins = concatMap (p: p.wrapperBins) (attrValues enabledPlugins);
in
python3Packages.buildPythonApplication {
pname = "beets";
inherit src version;
pyproject = true;
patches = [
]
++ extraPatches;
build-system = [
python3Packages.poetry-core
python3Packages.poetry-dynamic-versioning
];
dependencies =
with python3Packages;
[
confuse
gst-python
jellyfish
mediafile
munkres
musicbrainzngs
platformdirs
pyyaml
unidecode
# Can be built without it, but is useful on btrfs systems, and doesn't
# add too much to the closure. See:
# https://github.com/NixOS/nixpkgs/issues/437308
reflink
typing-extensions
lap
]
++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins));
nativeBuildInputs = [
gobject-introspection
sphinxHook
python3Packages.pydata-sphinx-theme
python3Packages.sphinx-design
python3Packages.sphinx-copybutton
]
++ extraNativeBuildInputs;
buildInputs = [
]
++ (with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
]);
outputs = [
"out"
"doc"
"man"
];
sphinxBuilders = [
"html"
"man"
];
# Causes an installManPage error. Not clear why this directory gets generated
# with the manpages. The same directory is observed correctly in
# $doc/share/doc/beets-${version}/html
preInstallSphinx = ''
rm -r .sphinx/man/man/_sphinx_design_static
'';
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp extra/_beet $out/share/zsh/site-functions/
'';
makeWrapperArgs = [
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
"--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
"--prefix PATH : ${lib.makeBinPath pluginWrapperBins}"
];
nativeCheckInputs =
with python3Packages;
[
pytestCheckHook
pytest-cov-stub
mock
rarfile
responses
requests-mock
pillow
]
++ [
writableTmpDirAsHomeHook
]
++ pluginWrapperBins;
__darwinAllowLocalNetworking = true;
disabledTestPaths =
disabledTestPaths
++ [
# touches network
"test/plugins/test_aura.py"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Flaky: several tests fail randomly with:
# if not self._poll(timeout):
# raise Empty
# _queue.Empty
"test/plugins/test_bpd.py"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
# fail on Hydra with `RuntimeError: image cannot be obtained without artresizer backend`
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_percent_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_px_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_minwidth"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced_and_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_not_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_and_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_but_not_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize"
];
disabledTests = disabledTests ++ [
# https://github.com/beetbox/beets/issues/5880
"test_reject_different_art"
# touches network
"test_merge_duplicate_album"
# The existence of the dependency reflink (see comment above), causes this
# test to be run, and it fails in the sandbox.
"test_successful_reflink"
];
# Perform extra "sanity checks", before running pytest tests.
preCheck = ''
# Check for undefined plugins
find beetsplug -mindepth 1 \
\! -path 'beetsplug/__init__.py' -a \
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
| sort -u > plugins_available
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc"
env EDITOR="${writeScript "beetconfig.sh" ''
#!${runtimeShell}
cat > "$1" <<CFG
plugins: ${lib.concatStringsSep " " (attrNames enabledPlugins)}
CFG
''}" "$out/bin/beet" config -e
env EDITOR=true "$out/bin/beet" config -e
'';
passthru.plugins = allPlugins;
passthru.tests.gstreamer =
runCommand "beets-gstreamer-test"
{
meta.timeout = 60;
}
''
set -euo pipefail
export HOME=$(mktemp -d)
mkdir $out
cat << EOF > $out/config.yaml
replaygain:
backend: gstreamer
EOF
${beets}/bin/beet -c $out/config.yaml > /dev/null
'';
meta = {
description = "Music tagger and library organizer";
homepage = "https://beets.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
aszlig
doronbehar
lovesegfault
montchr
pjones
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "beet";
};
}

View file

@ -1,55 +0,0 @@
{
lib,
callPackage,
config,
fetchFromGitHub,
python3Packages,
}:
/*
** To customize the enabled beets plugins, use the pluginOverrides input to the
** derivation.
** Examples:
**
** Disabling a builtin plugin:
** beets.override { pluginOverrides = { beatport.enable = false; }; }
**
** Enabling an external plugin:
** beets.override { pluginOverrides = {
** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; };
** }; }
*/
let
extraPatches = [
# Bash completion fix for Nix
./patches/bash-completion-always-print.patch
];
in
lib.makeExtensible (
self:
{
beets = self.beets-stable;
beets-stable = callPackage ./common.nix rec {
inherit python3Packages extraPatches;
version = "2.5.1";
src = fetchFromGitHub {
owner = "beetbox";
repo = "beets";
tag = "v${version}";
hash = "sha256-H3jcEHyK13+RHVlV4zp+8M3LZ0Jc2FdmAbLpekGozLA=";
};
};
beets-minimal = self.beets.override { disableAllPlugins = true; };
alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; };
audible = callPackage ./plugins/audible.nix { beets = self.beets-minimal; };
copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; };
filetote = callPackage ./plugins/filetote.nix { beets = self.beets-minimal; };
}
// lib.optionalAttrs config.allowAliases {
beets-unstable = lib.warn "beets-unstable was aliased to beets, since upstream releases are frequent nowadays" self.beets;
extrafiles = throw "extrafiles is unmaintained since 2020 and broken since beets 2.0.0";
}
)

View file

@ -1,53 +0,0 @@
{
lib,
fetchFromGitHub,
beets,
python3Packages,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-alternatives";
version = "0.13.4";
pyproject = true;
src = fetchFromGitHub {
repo = "beets-alternatives";
owner = "geigerzaehler";
tag = "v${version}";
hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ=";
};
nativeBuildInputs = [
beets
];
dependencies = [
python3Packages.poetry-core
];
nativeCheckInputs =
with python3Packages;
[
pytestCheckHook
pytest-cov-stub
mock
pillow
tomli
typeguard
]
++ [
writableTmpDirAsHomeHook
];
meta = {
description = "Beets plugin to manage external files";
homepage = "https://github.com/geigerzaehler/beets-alternatives";
changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md";
maintainers = with lib.maintainers; [
aszlig
lovesegfault
];
license = lib.licenses.mit;
};
}

View file

@ -45,13 +45,13 @@ let
in
stdenv.mkDerivation rec {
pname = "fcitx5";
version = "5.1.14";
version = "5.1.16";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-wLJZyoWjf02+m8Kw+IcfbZY2NnjMGtCWur2+w141eS4=";
hash = "sha256-aedYDpxYeUXadJnV+u1cQrNGoiW8WZKAgP4eNcvkScI=";
};
prePatch = ''

View file

@ -13,11 +13,11 @@
stdenv.mkDerivation rec {
pname = "fcitx5-anthy";
version = "5.1.7";
version = "5.1.8";
src = fetchurl {
url = "https://download.fcitx-im.org/fcitx5/fcitx5-anthy/${pname}-${version}.tar.zst";
hash = "sha256-lY5GFbeIee7u1NsLbkYt6BvST9lidvZLpaylL0wE2+0=";
hash = "sha256-O/fpLWh5eE22lZEz4cyI60Xf/rTWpTCWjAib3y0Yac8=";
};
nativeBuildInputs = [

View file

@ -11,13 +11,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-chewing";
version = "5.1.8";
version = "5.1.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-On8lbZL7hyY399a/q6iCNkDvRljv3zirzEO1wIG+MNE=";
hash = "sha256-xl6jNC1tud121rnUFsphF0A739W16Vb9Qx4v1+vu99U=";
};
nativeBuildInputs = [

View file

@ -34,13 +34,13 @@ in
stdenv.mkDerivation rec {
pname = "fcitx5-chinese-addons";
version = "5.1.9";
version = "5.1.10";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-xHLd7X9IdYTsVyqbghVzdC2i9AVipFHKRxP2Zqq7zGw=";
hash = "sha256-kVBDfr8NKsQQQX69N3/fVqJgObRNSX2p0GNSUjbZvcg=";
};
nativeBuildInputs = [

View file

@ -31,13 +31,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-configtool";
version = "5.1.10";
version = "5.1.11";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-Py2UDBQRqvT7kwZeQIXKrIjGAbOjjxEyEfO5tdtizW4=";
hash = "sha256-SEQelUMigcqs0C+jY+A/dfncEogzU1e5tjP+wK+MylM=";
};
cmakeFlags = [

View file

@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-hangul";
version = "5.1.7";
version = "5.1.8";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-66VW/hzKMVwXd7ktPQHrVbsWazKedS+/giTLIh5fkwo=";
hash = "sha256-6aBn0muWbmdxqUCrrXDRd4MZP7QUMX1ZHcAUdTF9Kys=";
};
nativeBuildInputs = [

View file

@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-m17n";
version = "5.1.4";
version = "5.1.5";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-TJMJGjO9V6EOzxt6Z7rwOfIQWK38XolDhUKbjbNUGhA=";
hash = "sha256-gvR//H+Kf/pYv6Avr0No8PZO7hAnOHj16v6n+tDXgkU=";
};
nativeBuildInputs = [

View file

@ -10,38 +10,21 @@
qtwayland,
wrapQtAppsHook,
wayland,
fetchpatch2,
}:
let
majorVersion = lib.versions.major qtbase.version;
in
stdenv.mkDerivation rec {
pname = "fcitx5-qt${majorVersion}";
version = "5.1.10";
version = "5.1.11";
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx5-qt";
rev = version;
hash = "sha256-JhmaAAJ1fevCPItVnneUCAalnDDaCjjkAl9QRhSkBk4=";
hash = "sha256-Nr8WnEm6z16NrXxuGEP4uQ6mxe8sUYtOxVgWMmFrWVE=";
};
patches = [
# TODO: remove on next release
(fetchpatch2 {
url = "https://github.com/fcitx/fcitx5-qt/commit/46a07a85d191fd77a1efc39c8ed43d0cd87788d2.patch?full_index=1";
hash = "sha256-qv8Rj6YoFdMQLOB2R9LGgwCHKdhEji0Sg67W37jSIac=";
})
(fetchpatch2 {
url = "https://github.com/fcitx/fcitx5-qt/commit/6ac4fdd8e90ff9c25a5219e15e83740fa38c9c71.patch?full_index=1";
hash = "sha256-x0OdlIVmwVuq2TfBlgmfwaQszXLxwRFVf+gEU224uVA=";
})
(fetchpatch2 {
url = "https://github.com/fcitx/fcitx5-qt/commit/1d07f7e8d6a7ae8651eda658f87ab0c9df08bef4.patch?full_index=1";
hash = "sha256-22tKD7sbsTJcNqur9/Uf+XAvMvA7tzNQ9hUCMm+E+E0=";
})
];
postPatch = ''
substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix}

View file

@ -16,11 +16,11 @@
stdenv.mkDerivation rec {
pname = "fcitx5-rime";
version = "5.1.11";
version = "5.1.12";
src = fetchurl {
url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.zst";
hash = "sha256-cc/B99tdVVWnvdl7dYYQlIvk8F2xXUOr6sF36yxQZfY=";
hash = "sha256-A7x7PQiyPAprJRg1tdk1Amq7pAhe8ney2KX9+9F0mK4=";
};
cmakeFlags = [

View file

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-skk";
version = "5.1.7";
version = "5.1.8";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-WMkcZSocanhWMn9kiWyB07jEW4x84G07kAYvn5heenc=";
hash = "sha256-1omxT31hKe7gQ5BARJ+0tIp4RT5eM+Tjufd6s/PxBoY=";
};
nativeBuildInputs = [

View file

@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-table-extra";
version = "5.1.8";
version = "5.1.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-FrVkSDLH6lYQbhvcxtX/IQpRC3dphsHu7xVdgnDNcgg=";
hash = "sha256-ISfpS48J9gfnYTKCgfV0XQ30J/yYoX+HbyNQDIEHVdw=";
};
nativeBuildInputs = [

View file

@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "fcitx5-unikey";
version = "5.1.7";
version = "5.1.8";
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx5-unikey";
rev = version;
hash = "sha256-ve+vu/bK3GYgjn9KxuOsFZFi9eymi1TFlzUHu4fJAkk=";
hash = "sha256-Yeyk6c4bjsxTi8DvRBGip/gayKaOvO6R5PGYkc0uUdk=";
};
nativeBuildInputs = [

File diff suppressed because it is too large Load diff

View file

@ -2327,9 +2327,6 @@ with pkgs;
usePoppler = true;
};
beetsPackages = lib.recurseIntoAttrs (callPackage ../tools/audio/beets { });
inherit (beetsPackages) beets;
binlore = callPackage ../development/tools/analysis/binlore { };
birdfont = callPackage ../tools/misc/birdfont { };

View file

@ -110,6 +110,9 @@ mapAliases {
backports_weakref = throw "backports_weakref has been removed, since we no longer need to backport to python3.3"; # added 2023-07-28
bash_kernel = bash-kernel; # added 2023-11-10
beancount_docverif = beancount-docverif; # added 2023-10-08
beets-unstable = lib.warn "beets-unstable was aliased to beets, since upstream releases are frequent nowadays" self.beets; # added 2025-10-16;
beets-stable = lib.warn "beets-stable was aliased to beets, since upstream releases are frequent nowadays" self.beets; # added 2025-10-16;
beets-extrafiles = throw "beets-extrafiles is unmaintained since 2020 and broken since beets 2.0.0";
bedup = throw "bedup was removed because it was broken and abandoned upstream"; # added 2023-02-04
bip_utils = bip-utils; # 2023-10-08
bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15

View file

@ -1834,7 +1834,21 @@ self: super: with self; {
beetcamp = callPackage ../development/python-modules/beetcamp { };
beets = toPythonModule (pkgs.beets.override { python3Packages = self; });
beets = callPackage ../development/python-modules/beets {
inherit (pkgs) chromaprint;
};
beets-alternatives = callPackage ../development/python-modules/beets-alternatives { };
beets-audible = callPackage ../development/python-modules/beets-audible { };
beets-copyartifacts = callPackage ../development/python-modules/beets-copyartifacts { };
beets-filetote = callPackage ../development/python-modules/beets-filetote { };
beets-minimal = beets.override {
disableAllPlugins = true;
};
beewi-smartclim = callPackage ../development/python-modules/beewi-smartclim { };