Skip to content

Commit

Permalink
parabolic: init at 2023.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EwuUwe committed Jan 7, 2024
1 parent 46ae021 commit c4bcf93
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pkgs/by-name/pa/parabolic/deps.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions pkgs/by-name/pa/parabolic/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, gtk4
, libadwaita
, pkg-config
, wrapGAppsHook4
, glib
, shared-mime-info
, gdk-pixbuf
, blueprint-compiler
, python311
, ffmpeg
}:

buildDotnetModule rec {
pname = "parabolic";
version = "2023.12.0";

src = fetchFromGitHub {
owner = "NickvisionApps";
repo = "Parabolic";
rev = version;
hash = "sha256-mbGByw/wgovo81l2LDtDE5p+Mh6aJ5DOcZCNzVfmAtA=";
fetchSubmodules = true;
};

dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
pythonEnv = python311.withPackages( ps: with ps;[ yt-dlp ] );

projectFile = "NickvisionTubeConverter.GNOME/NickvisionTubeConverter.GNOME.csproj";
nugetDeps = ./deps.nix;
executables = "NickvisionTubeConverter.GNOME";

nativeBuildInputs = [
pkg-config
wrapGAppsHook4
glib
shared-mime-info
gdk-pixbuf
blueprint-compiler
];

buildInputs = [ gtk4 libadwaita ];

runtimeDeps = [
gtk4
libadwaita
glib
gdk-pixbuf
];

postInstall = ''
substituteInPlace NickvisionTubeConverter.Shared/Linux/org.nickvision.tubeconverter.desktop.in --replace '@EXEC@' "NickvisionTubeConverter.GNOME"
install -Dm444 NickvisionTubeConverter.Shared/Resources/org.nickvision.tubeconverter.svg -t $out/share/icons/hicolor/scalable/apps/
install -Dm444 NickvisionTubeConverter.Shared/Resources/org.nickvision.tubeconverter-symbolic.svg -t $out/share/icons/hicolor/symbolic/apps/
install -Dm444 NickvisionTubeConverter.Shared/Linux/org.nickvision.tubeconverter.desktop.in -T $out/share/applications/org.nickvision.tubeconverter.desktop
'';

makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ pythonEnv ffmpeg ]}" ];

passthru.updateScript = ./update.sh;

meta = with lib; {
description = "Download web video and audio";
homepage = "https://github.com/NickvisionApps/Parabolic";
license = licenses.mit;
maintainers = with maintainers; [ ewuuwe ];
mainProgram = "parabolic";
platforms = platforms.linux;
};
}
18 changes: 18 additions & 0 deletions pkgs/by-name/pa/parabolic/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
#shellcheck shell=bash

set -eu -o pipefail

version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
https://api.github.com/repos/NickvisionApps/Parabolic/releases/latest | jq -e -r .tag_name)
old_version=$(nix-instantiate --eval -A parabolic.version | jq -e -r)

if [[ $version == "$old_version" ]]; then
echo "New version same as old version, nothing to do." >&2
exit 0
fi

update-source-version parabolic "$version"

$(nix-build -A parabolic.fetch-deps --no-out-link) "$(dirname -- "${BASH_SOURCE[0]}")/deps.nix"

0 comments on commit c4bcf93

Please sign in to comment.