uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
41
pkgs/applications/audio/plexamp/default.nix
Normal file
41
pkgs/applications/audio/plexamp/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, fetchurl, appimageTools, pkgs }:
|
||||
|
||||
let
|
||||
pname = "plexamp";
|
||||
version = "4.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://plexamp.plex.tv/plexamp.plex.tv/desktop/Plexamp-${version}.AppImage";
|
||||
name="${pname}-${version}.AppImage";
|
||||
sha512 = "S2/T+T24X6D0oTbGPMp2BVfWTvzsUCWS1xsigLT/vFr12PlZgPfOWgo987W3YE30WJJDdybLqnkTl+uhNndC+A==";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
inherit pname version src;
|
||||
};
|
||||
in appimageTools.wrapType2 {
|
||||
inherit pname version src;
|
||||
|
||||
multiPkgs = null; # no 32bit needed
|
||||
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
|
||||
|
||||
extraInstallCommands = ''
|
||||
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
|
||||
install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop
|
||||
install -m 444 -D ${appimageContents}/plexamp.png \
|
||||
$out/share/icons/hicolor/512x512/apps/plexamp.png
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update-plexamp.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A beautiful Plex music player for audiophiles, curators, and hipsters";
|
||||
homepage = "https://plexamp.com/";
|
||||
changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/44";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ killercup synthetica ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
54
pkgs/applications/audio/plexamp/update-plexamp.sh
Executable file
54
pkgs/applications/audio/plexamp/update-plexamp.sh
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -p yq bash curl bc ripgrep
|
||||
#! nix-shell -i bash
|
||||
|
||||
set -Eeuxo pipefail
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$TMPDIR"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
if [ ! -f "$ROOT/default.nix" ]; then
|
||||
echo "ERROR: cannot find default.nix in $ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(basename "$ROOT")" != plexamp ]; then
|
||||
echo "ERROR: folder not named plexamp"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
|
||||
VERSION_FILE="$TMPDIR/version.yml"
|
||||
VERSION_URL="https://plexamp.plex.tv/plexamp.plex.tv/desktop/latest-linux.yml"
|
||||
curl "$VERSION_URL" -o "$VERSION_FILE"
|
||||
|
||||
VERSION="$(yq -r .version "$VERSION_FILE")"
|
||||
SHA512="$(yq -r .sha512 "$VERSION_FILE")"
|
||||
|
||||
DEFAULT_NIX="$ROOT/default.nix"
|
||||
WORKING_NIX="$TMPDIR/default.nix"
|
||||
cp "$DEFAULT_NIX" "$WORKING_NIX"
|
||||
|
||||
sed -i "s@version = .*;@version = \"$VERSION\";@g" "$WORKING_NIX"
|
||||
|
||||
if diff "$DEFAULT_NIX" "$WORKING_NIX"; then
|
||||
echo "WARNING: no changes"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# update sha hash (convenietly provided)
|
||||
sed -i "s@sha.* = .*;@sha512 = \"$SHA512\";@g" "$WORKING_NIX"
|
||||
|
||||
# update the changelog ("just" increment the number)
|
||||
CHANGELOG_URL=$(rg --only-matching 'changelog = "(.+)";' --replace '$1' $WORKING_NIX)
|
||||
CHANGELOG_NUMBER=$(rg --only-matching '.*/([0-9]+)' --replace '$1' <<< $CHANGELOG_URL)
|
||||
NEXT_CHANGELOG=$(($CHANGELOG_NUMBER + 1))
|
||||
NEXT_URL=$(rg --only-matching '(.*)/[0-9]+' --replace "\$1/$NEXT_CHANGELOG" <<< $CHANGELOG_URL)
|
||||
sed -i "s@changelog = \".*\";@changelog = \"$NEXT_URL\";@" $WORKING_NIX
|
||||
|
||||
mv $WORKING_NIX $DEFAULT_NIX
|
||||
Loading…
Add table
Add a link
Reference in a new issue