mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
Made with
```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
typos --no-check-filenames --write-changes "$1"
git diff --exit-code "$1" && exit
#( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
[[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```
and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`
I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
meson,
|
|
ninja,
|
|
makeWrapper,
|
|
pkg-config,
|
|
dleyna-core,
|
|
dleyna-connector-dbus,
|
|
gssdp,
|
|
gupnp,
|
|
gupnp-av,
|
|
gupnp-dlna,
|
|
libsoup_2_4,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dleyna-server";
|
|
version = "0.7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "phako";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-jlF9Lr/NG+Fsy/bB7aLb7xOLqel8GueJK5luo9rsDME=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix build with meson 1.2. We use the gentoo patch instead of the
|
|
# usptream one because the latter only applies on the libsoup_3 based
|
|
# merged dLeyna project.
|
|
# https://gitlab.gnome.org/World/dLeyna/-/merge_requests/6
|
|
(fetchpatch {
|
|
url = "https://github.com/gentoo/gentoo/raw/2e3a1f4f7a1ef0c3e387389142785d98b5834e60/net-misc/dleyna-server/files/meson-1.2.0.patch";
|
|
sha256 = "sha256-/p2OaPO5ghWtPotwIir2TtcFF5IDFN9FFuyqPHevuFI=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
dleyna-core
|
|
dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
|
|
gssdp
|
|
gupnp
|
|
gupnp-av
|
|
gupnp-dlna
|
|
libsoup_2_4
|
|
];
|
|
|
|
preFixup = ''
|
|
wrapProgram "$out/libexec/dleyna-server-service" \
|
|
--set DLEYNA_CONNECTOR_PATH "$DLEYNA_CONNECTOR_PATH"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Library to discover, browse and manipulate Digital Media Servers";
|
|
homepage = "https://github.com/phako/dleyna-server";
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
platforms = platforms.unix;
|
|
license = licenses.lgpl21Only;
|
|
};
|
|
}
|