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
43
pkgs/tools/backup/discordchatexporter-cli/default.nix
Normal file
43
pkgs/tools/backup/discordchatexporter-cli/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, buildDotnetModule
|
||||
, fetchFromGitHub
|
||||
, dotnetCorePackages
|
||||
, testers
|
||||
, discordchatexporter-cli
|
||||
}:
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "discordchatexporter-cli";
|
||||
version = "2.34.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tyrrrz";
|
||||
repo = "discordchatexporter";
|
||||
rev = version;
|
||||
sha256 = "U+AwxHvyLD2BwrJH3h0yKKHBsgBM/D657TuG9IgllPs=";
|
||||
};
|
||||
|
||||
projectFile = "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj";
|
||||
nugetDeps = ./deps.nix;
|
||||
|
||||
postFixup = ''
|
||||
ln -s $out/bin/DiscordChatExporter.Cli $out/bin/discordchatexporter-cli
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./updater.sh;
|
||||
tests.version = testers.testVersion {
|
||||
package = discordchatexporter-cli;
|
||||
version = "v${version}";
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to export Discord chat logs to a file";
|
||||
homepage = "https://github.com/Tyrrrz/DiscordChatExporter";
|
||||
license = licenses.gpl3Plus;
|
||||
changelog = "https://github.com/Tyrrrz/DiscordChatExporter/blob/${version}/Changelog.md";
|
||||
maintainers = [ maintainers.ivar ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
10
pkgs/tools/backup/discordchatexporter-cli/deps.nix
generated
Normal file
10
pkgs/tools/backup/discordchatexporter-cli/deps.nix
generated
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ fetchNuGet }: [
|
||||
(fetchNuGet { pname = "CliFx"; version = "2.2.5"; sha256 = "1bk716rdswy28h53qy68xywci8k1h2iqdy2iz1yf7v8g0sa2n79p"; })
|
||||
(fetchNuGet { pname = "Gress"; version = "2.0.1"; sha256 = "00xhyfkrlc38nbl6aymr7zwxc3kj0rxvx5gwk6fkfrvi1pzgq0wc"; })
|
||||
(fetchNuGet { pname = "JsonExtensions"; version = "1.2.0"; sha256 = "0g54hibabbqqfhxjlnxwv1rxagpali5agvnpymp2w3dk8h6q66xy"; })
|
||||
(fetchNuGet { pname = "MiniRazor.CodeGen"; version = "2.2.1"; sha256 = "1mrjw3vq59pbiqvayilazjgv6l87j20j8hmhcpbacz9p5bl1hvvr"; })
|
||||
(fetchNuGet { pname = "MiniRazor.Runtime"; version = "2.2.1"; sha256 = "18qx0rzp4xz4ng9yc0c2bcpa4ky6sfiz10828y4j9ymywas7yzxw"; })
|
||||
(fetchNuGet { pname = "Polly"; version = "7.2.3"; sha256 = "1iws4jd5iqj5nlfp16fg9p5vfqqas1si0cgh8xcj64y433a933cv"; })
|
||||
(fetchNuGet { pname = "Spectre.Console"; version = "0.44.0"; sha256 = "0f4q52rmib0q3vg7ij6z73mnymyas7c7wrm8dfdhrkdzn53zwl6p"; })
|
||||
(fetchNuGet { pname = "Superpower"; version = "3.0.0"; sha256 = "0p6riay4732j1fahc081dzgs9q4z3n2fpxrin4zfpj6q2226dhz4"; })
|
||||
]
|
||||
30
pkgs/tools/backup/discordchatexporter-cli/updater.sh
Executable file
30
pkgs/tools/backup/discordchatexporter-cli/updater.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_6
|
||||
set -eo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
deps_file="$(realpath "./deps.nix")"
|
||||
|
||||
new_version="$(curl -s "https://api.github.com/repos/tyrrrz/DiscordChatExporter/releases?per_page=1" | jq -r '.[0].name')"
|
||||
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
||||
if [[ "$new_version" == "$old_version" ]]; then
|
||||
echo "Up to date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd ../../../..
|
||||
update-source-version discordchatexporter-cli "$new_version"
|
||||
store_src="$(nix-build . -A discordchatexporter-cli.src --no-out-link)"
|
||||
src="$(mktemp -d /tmp/discordexporter-src.XXX)"
|
||||
cp -rT "$store_src" "$src"
|
||||
chmod -R +w "$src"
|
||||
|
||||
pushd "$src"
|
||||
|
||||
mkdir ./nuget_tmp.packages
|
||||
dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages
|
||||
|
||||
nuget-to-nix ./nuget_tmp.packages > "$deps_file"
|
||||
|
||||
popd
|
||||
rm -r "$src"
|
||||
Loading…
Add table
Add a link
Reference in a new issue