nixpkgs/pkgs/by-name/si/simple-dlna-browser/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

70 lines
1.8 KiB
Nix

{
# Derivation stuff
fetchFromGitHub,
lib,
makeWrapper,
stdenv,
# Dependencies
# Add these to the wrapper
curl,
gawk,
gnugrep,
gnused,
socat,
wget,
}:
stdenv.mkDerivation {
pname = "simple-dlna-browser";
version = "unstable-2023-01-09";
src = fetchFromGitHub {
owner = "javier-lopez";
repo = "learn";
sparseCheckout = [
"sh/tools/simple-dlna-browser"
];
rev = "666e2c402723251ba19ce9d7c11b83b06c15a2c5";
hash = "sha256-jwPAEgti5DrjNnNVW/61GGTP+QedGAjz9kPwYhMAdTk=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
outputWrapper="$out/bin/simple-dlna-browser"
outputWrapped="$out/bin/wrapped-simple-dlna-browser"
mkdir -p $out/bin
cp sh/tools/simple-dlna-browser $outputWrapped
makeWrapper $outputWrapped $outputWrapper \
--prefix PATH : ${
lib.makeBinPath [
curl
gawk
gnugrep
gnused
socat
wget
]
}
# Set the program name to a fixed value
# Normally it is guessed by the filename, but we don't want it to be the name of the wrapper
sed -i -e 's/PROGNAME=".*"/PROGNAME="simple-dlna-browser"/' $outputWrapped
'';
meta = {
description = "Query dlna media servers";
longDescription = ''
A bash script that allows simple interactions with [DLNA] media servers.
It is a light-weight, CLI alternative to [VLC], [Kodi], and other players.
[DLNA]: https://en.wikipedia.org/wiki/Digital_Living_Network_Alliance
[Kodi]: https://kodi.tv/
[VLC]: https://www.videolan.org/vlc/
'';
homepage = "https://github.com/javier-lopez/learn/blob/master/sh/tools/simple-dlna-browser";
license = lib.licenses.fair;
maintainers = with lib.maintainers; [ ];
};
}