Added package for Jellyfin-tui, attempt to fix qutebrowser, attempt at working quickgui
This commit is contained in:
parent
f8ba5af5ac
commit
d40cab3aba
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
linux-pam,
|
||||
rustPlatform,
|
||||
testers,
|
||||
lemurs,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "jellyfin-tui";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dhonus";
|
||||
repo = "jellyfin-tui";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-jHjTckdyPMJO1INF1AdJvvWTJ0ZJJGOxkBc0YZx9HWI=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-H6JTupGh1ec6/RIkoAPMl2agNSbF9B5CuJlxDNEwDc4=";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
mpv
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
openssl
|
||||
openssl.dev
|
||||
];
|
||||
|
||||
desktopItems =
|
||||
let
|
||||
desktopEntry = pkgs.makeDesktopItem {
|
||||
name = "siyuan";
|
||||
desktopName = "SiYuan";
|
||||
comment = "Refactor your thinking";
|
||||
terminal = true;
|
||||
exec = "jellyfin-tui";
|
||||
};
|
||||
in
|
||||
[
|
||||
desktopEntry
|
||||
];
|
||||
|
||||
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Jellyfin TUI music client written in Rust";
|
||||
homepage = "https://github.com/dhonus/jellyfin-tui";
|
||||
license = with licenses; [
|
||||
gpl3
|
||||
];
|
||||
maintainers = with maintainers; [ ];
|
||||
mainProgram = "jellyfin-tui";
|
||||
};
|
||||
}
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
nixpkgs.config.packageOverrides = pkgs: rec {
|
||||
nixpkgs.config = {
|
||||
android_sdk.accept_license = true;
|
||||
packageOverrides = pkgs: {
|
||||
dina-vector = pkgs.callPackage ./fonts/dina-vector.nix { };
|
||||
wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { };
|
||||
wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix { };
|
||||
wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix { };
|
||||
temp-quickgui = pkgs.callPackage ./temp/quickgui.nix { };
|
||||
# qutebrowser = pkgs.callPackage ./fixes/qutebrowser/default.nix { };
|
||||
jellyfin-tui = pkgs.callPackage ./custom/jellyfin-tui.nix { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
{
|
||||
pkgs,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
fetchzip,
|
||||
python3,
|
||||
glib-networking,
|
||||
asciidoc,
|
||||
docbook_xml_dtd_45,
|
||||
docbook_xsl,
|
||||
libxml2,
|
||||
libxslt,
|
||||
withPdfReader ? true,
|
||||
pipewireSupport ? stdenv.hostPlatform.isLinux,
|
||||
pipewire,
|
||||
enableWideVine ? false,
|
||||
widevine-cdm,
|
||||
# can cause issues on some graphics chips
|
||||
enableVulkan ? false,
|
||||
vulkan-loader,
|
||||
}:
|
||||
|
||||
let
|
||||
# Load in Qt packages.
|
||||
qtbase = pkgs.kdePackages.qtbase;
|
||||
qtwebengine = pkgs.kdePackages.qtwebengine;
|
||||
qtwayland = pkgs.kdePackages.qtwayland;
|
||||
wrapQtAppsHook = pkgs.kdePackages.wrapQtAppsHook;
|
||||
|
||||
isQt6 = lib.versions.major qtbase.version == "6";
|
||||
pdfjs =
|
||||
let
|
||||
version = "4.2.67";
|
||||
in
|
||||
fetchzip {
|
||||
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/pdfjs-${version}-dist.zip";
|
||||
hash = "sha256-7kfT3+ZwoGqZ5OwkO9h3DIuBFd0v8fRlcufxoBdcy8c=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
version = "3.2.1";
|
||||
in
|
||||
|
||||
python3.pkgs.buildPythonApplication {
|
||||
pname = "qutebrowser" + lib.optionalString (!isQt6) "-qt5";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/qutebrowser-${version}.tar.gz";
|
||||
hash = "sha256-AqevKmxds42HsiWwuEEsgNmDgzXzLQ6KOPbX+804iX0=";
|
||||
};
|
||||
|
||||
# Needs tox
|
||||
doCheck = false;
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
qtbase
|
||||
glib-networking
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
qtwayland
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
asciidoc
|
||||
docbook_xml_dtd_45
|
||||
docbook_xsl
|
||||
libxml2
|
||||
libxslt
|
||||
];
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
colorama
|
||||
pyyaml
|
||||
(if isQt6 then pyqt6-webengine else pyqtwebengine)
|
||||
jinja2
|
||||
pygments
|
||||
# scripts and userscripts libs
|
||||
tldextract
|
||||
beautifulsoup4
|
||||
readability-lxml
|
||||
pykeepass
|
||||
stem
|
||||
pynacl
|
||||
# extensive ad blocking
|
||||
adblock
|
||||
# for the qute-bitwarden user script to be able to copy the TOTP token to clipboard
|
||||
pyperclip
|
||||
];
|
||||
|
||||
patches = [
|
||||
./fix-restart.patch
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
|
||||
|
||||
sed -i "s,/usr,$out,g" qutebrowser/utils/standarddir.py
|
||||
''
|
||||
+ lib.optionalString withPdfReader ''
|
||||
sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
make -f misc/Makefile \
|
||||
PYTHON=${(python3.pythonOnBuildForHost.withPackages (ps: with ps; [ setuptools ])).interpreter} \
|
||||
PREFIX=. \
|
||||
DESTDIR="$out" \
|
||||
DATAROOTDIR=/share \
|
||||
install
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Patch python scripts
|
||||
buildPythonPath "$out $propagatedBuildInputs"
|
||||
scripts=$(grep -rl python "$out"/share/qutebrowser/{user,}scripts/)
|
||||
for i in $scripts; do
|
||||
patchPythonScript "$i"
|
||||
done
|
||||
'';
|
||||
|
||||
preFixup =
|
||||
let
|
||||
libPath = lib.makeLibraryPath [ pipewire ];
|
||||
in
|
||||
''
|
||||
makeWrapperArgs+=(
|
||||
# Force the app to use QT_PLUGIN_PATH values from wrapper
|
||||
--unset QT_PLUGIN_PATH
|
||||
"''${qtWrapperArgs[@]}"
|
||||
# avoid persistant warning on starup
|
||||
--set QT_STYLE_OVERRIDE Fusion
|
||||
${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''}
|
||||
${lib.optionalString (enableVulkan) ''
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}
|
||||
--set-default QSG_RHI_BACKEND vulkan
|
||||
''}
|
||||
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
|
||||
--set QTWEBENGINE_RESOURCES_PATH "${qtwebengine}/resources"
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/qutebrowser/qutebrowser";
|
||||
changelog = "https://github.com/qutebrowser/qutebrowser/blob/v${version}/doc/changelog.asciidoc";
|
||||
description = "Keyboard-focused browser with a minimal GUI";
|
||||
license = licenses.gpl3Plus;
|
||||
mainProgram = "qutebrowser";
|
||||
platforms = if enableWideVine then [ "x86_64-linux" ] else qtwebengine.meta.platforms;
|
||||
maintainers = with maintainers; [
|
||||
jagajaga
|
||||
rnhmjoj
|
||||
ebzzry
|
||||
dotlambda
|
||||
nrdxp
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/quitter.py b/quitter.py
|
||||
index a42b9d0..f544ccb 100644
|
||||
--- a/qutebrowser/misc/quitter.py
|
||||
+++ b/qutebrowser/misc/quitter.py
|
||||
@@ -112,13 +112,7 @@ class Quitter(QObject):
|
||||
Return:
|
||||
The commandline as a list of strings.
|
||||
"""
|
||||
- if os.path.basename(sys.argv[0]) == 'qutebrowser':
|
||||
- # Launched via launcher script
|
||||
- args = [sys.argv[0]]
|
||||
- elif hasattr(sys, 'frozen'):
|
||||
- args = [sys.executable]
|
||||
- else:
|
||||
- args = [sys.executable, '-m', 'qutebrowser']
|
||||
+ args = ['@qutebrowser@']
|
||||
|
||||
# Add all open pages so they get reopened.
|
||||
page_args = [] # type: typing.MutableSequence[str]
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "dina-font";
|
||||
version = "1.0.0";
|
||||
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
# # hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||
# };
|
||||
|
||||
unpackPhase = "true";
|
||||
|
||||
buildInputs = [
|
||||
pkgs.fontforge
|
||||
pkgs.dina-font
|
||||
pkgs.wqy-bitmapsong
|
||||
pkgs.tree
|
||||
];
|
||||
buildPhase = ''
|
||||
tree > debug.txt
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dm644 $out/debug.txt
|
||||
'';
|
||||
}
|
|
@ -11,7 +11,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
#hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||
# hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
lib,
|
||||
flutter,
|
||||
quickemu,
|
||||
zenity,
|
||||
}:
|
||||
flutter.buildFlutterApplication rec {
|
||||
pname = "quickgui";
|
||||
version = "1.2.10";
|
||||
src = fetchFromGitHub {
|
||||
owner = "quickemu-project";
|
||||
repo = "quickgui";
|
||||
rev = version;
|
||||
hash = "sha256-M2Qy66RqsjXg7ZpHwaXCN8qXRIsisnIyaENx3KqmUfQ=";
|
||||
};
|
||||
|
||||
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
||||
|
||||
gitHashes = {
|
||||
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
|
||||
};
|
||||
|
||||
extraWrapProgramArgs = "--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
quickemu
|
||||
zenity
|
||||
]
|
||||
}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
for SIZE in 16 32 48 64 128 256 512; do
|
||||
mkdir -p $out/share/icons/hicolor/$SIZEx$SIZE/apps/
|
||||
cp -av assets/resources/quickgui_$SIZE.png $out/share/icons/hicolor/$SIZEx$SIZE/apps/quickgui.png
|
||||
done
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "quickgui";
|
||||
exec = "quickgui";
|
||||
icon = "quickgui";
|
||||
desktopName = "Quickgui";
|
||||
comment = "An elegant virtual machine manager for the desktop";
|
||||
categories = [
|
||||
"Development"
|
||||
"System"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Elegant virtual machine manager for the desktop";
|
||||
homepage = "https://github.com/quickemu-project/quickgui";
|
||||
changelog = "https://github.com/quickemu-project/quickgui/releases/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [
|
||||
flexiondotorg
|
||||
heyimnova
|
||||
];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "quickgui";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue