diff options
Diffstat (limited to 'nixpkgs/pkgs/by-name/pa/parabolic/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/pa/parabolic/package.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/pa/parabolic/package.nix b/nixpkgs/pkgs/by-name/pa/parabolic/package.nix new file mode 100644 index 000000000000..b386b09dd40a --- /dev/null +++ b/nixpkgs/pkgs/by-name/pa/parabolic/package.nix @@ -0,0 +1,77 @@ +{ lib +, buildDotnetModule +, fetchFromGitHub +, dotnetCorePackages +, gtk4 +, libadwaita +, pkg-config +, wrapGAppsHook4 +, glib +, shared-mime-info +, gdk-pixbuf +, blueprint-compiler +, python3 +, 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 = python3.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 + ]; + + postPatch = '' + substituteInPlace NickvisionTubeConverter.Shared/Linux/org.nickvision.tubeconverter.desktop.in --replace '@EXEC@' "NickvisionTubeConverter.GNOME" + ''; + + postInstall = '' + 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 = "NickvisionTubeConverter.GNOME"; + platforms = platforms.linux; + }; +} |