Compare commits

..

25 Commits

Author SHA1 Message Date
Danilo Reyes
4e91264f0f tuh fix 2025-11-08 21:44:16 -06:00
Danilo Reyes
093ccf90cb webcomix patched for 25.11 2025-11-08 20:21:19 -06:00
Danilo Reyes
07daae7770 Add rmlint to Nix package dependencies in run.nix for improved functionality 2025-10-29 00:48:37 -06:00
Danilo Reyes
df61132974 Refactor Nix package definition for tuh-activity-logger to utilize buildPythonApplication, streamline dependencies, and include additional packages such as beautifulsoup4, requests, and matplotlib. 2025-10-29 00:37:20 -06:00
Danilo Reyes
cd60c3ad69 Update Nix package definitions to include webcomix and enhance overlays. Refactor download.nix to utilize buildPythonApplication and streamline dependencies, ensuring proper integration of new packages. 2025-10-29 00:33:25 -06:00
Danilo Reyes
d1f011ba1f Enhance Nix package definitions by adding new packages for inputs and steam-python, updating build inputs for colordle and dosage, and improving installation scripts. Notable changes include the addition of desktop and metainfo files for colordle, and ensuring proper GResource handling in dosage. 2025-10-25 20:00:10 -06:00
Danilo Reyes
a8e7517e9a Refactor Nix package definitions to use buildPythonApplication, update package versions, and enhance dependencies across multiple packages. Notable changes include version updates for dosage, hiit, qbittorrent-api, protonup-qt, and torf, as well as the addition of new dependencies and build inputs for colordle and qbit-manage. 2025-10-25 19:28:39 -06:00
Danilo Reyes
b827ffab8f Refactor Nix package definitions to use buildPythonPackage and buildPythonApplication, update dependencies, and remove obsolete packages including pureref, rmlint, steam, and talk. Update webcomix to version 3.12.0 with new dependencies and runtime checks. 2025-10-25 18:52:33 -06:00
Danilo Reyes
bf9c1796d4 flake update 2025-10-24 21:58:18 -06:00
Danilo Reyes
5c13b806a0 Add authentication options for various extractors in gallery.py 2025-10-09 23:19:14 -06:00
Danilo Reyes
6aea101721 stashapp & stashapi 2025-10-04 17:26:10 -06:00
9ab256ded7 updated tasks to new paths 2025-10-02 21:31:13 -06:00
e9fc085de1 Refactor Nix package definitions for improved clarity and consistency, including updates to overlays, dependencies, and build inputs across multiple packages. 2025-10-02 14:45:13 -06:00
38959dc37b add gaytorss script for downloading and uploading torrent files via RSS feed 2025-09-30 00:30:50 -06:00
64a81ca78d cleanup 2025-09-23 23:55:16 -06:00
4f5049f3ab deleted old faulty rust file 2025-09-17 22:08:36 -06:00
6deea63497 download_rust init 2025-08-21 18:46:37 -06:00
ee6c1f367f added elasticwind to the nextcloud sync 2025-08-06 20:59:11 -06:00
6324aaa7b8 run now downloads locally 2025-07-27 11:28:49 -06:00
6384d8ad17 using nixos 25.05 channel 2025-07-13 18:37:27 -06:00
0c137aaef5 discord chatlogs fix 2025-07-13 18:37:21 -06:00
1b35e46f1e get nextcloud uid and gid 2025-06-06 08:48:42 -06:00
597d0bfca2 nextcloud new uuid 2025-06-06 08:39:27 -06:00
4d9eaa65a2 soy ass qbit-manage patch 2025-05-31 19:26:35 -06:00
4eef0b8578 resilio old 2025-05-28 08:54:06 -06:00
40 changed files with 1044 additions and 544 deletions

73
flake.lock generated
View File

@@ -1,12 +1,46 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1746557022,
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
"lastModified": 1762653957,
"narHash": "sha256-3em63zYO+s0NxxKwPXyzV80fXfwZOg7/LjYF5ndZltc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
"rev": "c148fa0cf61fc3bb7b011f2d4f8d789964ea7dd0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743576891,
"narHash": "sha256-vXiKURtntURybE6FMNFAVpRPr8+e8KoLPrYs9TGuAKc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44a69ed688786e98a101f02b712c313f1ade37ab",
"type": "github"
},
"original": {
@@ -18,7 +52,38 @@
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"sudoku-solver": "sudoku-solver"
}
},
"sudoku-solver": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"path": "./src/sudoku-hs",
"type": "path"
},
"original": {
"path": "./src/sudoku-hs",
"type": "path"
},
"parent": []
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

View File

@@ -1,8 +1,8 @@
{
description = "Nix flake for the activity logging script";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
# sudoku-solver.url = "path:./src/sudoku-hs";
nixpkgs.url = "github:NixOS/nixpkgs/master";
sudoku-solver.url = "path:./src/sudoku-hs";
};
outputs =
{ nixpkgs, ... }@inputs:
@@ -11,6 +11,7 @@
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ inputs.self.overlays.default ];
};
generatePackages =
args:
@@ -28,29 +29,30 @@
|> builtins.listToAttrs;
in
{
overlays.default = final: prev: {
scrapy = prev.scrapy.overrideAttrs (old: rec {
version = "2.11.2";
src = prev.fetchFromGitHub {
owner = "scrapy";
repo = "scrapy";
tag = version;
hash = "sha256-EaO1kQ3VSTwEW+r0kSKycOxHNTPwwCVjch1ZBrTU0qQ=";
overlays.default = _final: prev: {
python3Packages = prev.python3Packages.override {
overrides = pyself: pysuper: {
webcomix = prev.python3Packages.callPackage ./pkgs_pr/webcomix.nix { };
};
});
};
};
packages.x86_64-linux =
let
scriptBin = path: name: pkgs.writeScriptBin name (builtins.readFile path);
pkgsBin = path: name: pkgs.callPackage path { };
pkgsBin = path: _name:
let
content = builtins.readFile path;
in
if builtins.match ".*(buildPythonPackage|buildPythonApplication).*" content != null
then pkgs.python3Packages.callPackage path { }
else pkgs.callPackage path { };
in
{
citra = pkgs.callPackage ./pkgs/citra/default.nix { branch = "nightly"; };
torzu = pkgs.callPackage ./pkgs/torzu/package.nix { };
pano = pkgs.callPackage ./pkgs/pano/default.nix { };
mealie = pkgs.callPackage ./pkgs/mealie/package.nix { };
vdhcoapp = pkgs.callPackage ./pkgs/vdhcoapp/default.nix { };
# sudoku-solver = inputs.sudoku-solver.packages.${system}.default;
sudoku-solver = inputs.sudoku-solver.packages.${system}.default;
}
// generatePackages {
dir = "pkgs";

View File

@@ -45,47 +45,46 @@ stdenv.mkDerivation {
glslang
pkg-config
python3
] ++ lib.optionals enableQt [ wrapQtAppsHook ];
]
++ lib.optionals enableQt [ wrapQtAppsHook ];
buildInputs =
[
boost
libusb1
]
++ lib.optionals enableQt [
qtbase
qtmultimedia
]
++ lib.optional enableSdl2 SDL2
++ lib.optional enableQtTranslation qttools
++ lib.optionals enableCubeb cubeb.passthru.backendLibs
++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg_4
++ lib.optional useDiscordRichPresence rapidjson
++ lib.optional enableFdk fdk_aac;
buildInputs = [
boost
libusb1
]
++ lib.optionals enableQt [
qtbase
qtmultimedia
]
++ lib.optional enableSdl2 SDL2
++ lib.optional enableQtTranslation qttools
++ lib.optionals enableCubeb cubeb.passthru.backendLibs
++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg_4
++ lib.optional useDiscordRichPresence rapidjson
++ lib.optional enableFdk fdk_aac;
cmakeFlags =
[
"-DUSE_SYSTEM_BOOST=ON"
"-DCITRA_WARNINGS_AS_ERRORS=OFF"
"-DCITRA_USE_BUNDLED_FFMPEG=OFF"
"-DCITRA_USE_BUNDLED_QT=OFF"
"-DUSE_SYSTEM_SDL2=ON"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
cmakeFlags = [
"-DUSE_SYSTEM_BOOST=ON"
"-DCITRA_WARNINGS_AS_ERRORS=OFF"
"-DCITRA_USE_BUNDLED_FFMPEG=OFF"
"-DCITRA_USE_BUNDLED_QT=OFF"
"-DUSE_SYSTEM_SDL2=ON"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
# We dont want to bother upstream with potentially outdated compat reports
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON"
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
]
++ lib.optional (!enableSdl2) "-DENABLE_SDL2=OFF"
++ lib.optional (!enableQt) "-DENABLE_QT=OFF"
++ lib.optional enableQtTranslation "-DENABLE_QT_TRANSLATION=ON"
++ lib.optional (!enableWebService) "-DENABLE_WEB_SERVICE=OFF"
++ lib.optional (!enableCubeb) "-DENABLE_CUBEB=OFF"
++ lib.optional enableFfmpegAudioDecoder "-DENABLE_FFMPEG_AUDIO_DECODER=ON"
++ lib.optional enableFfmpegVideoDumper "-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON"
++ lib.optional enableFdk "-DENABLE_FDK=ON";
# We dont want to bother upstream with potentially outdated compat reports
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON"
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
]
++ lib.optional (!enableSdl2) "-DENABLE_SDL2=OFF"
++ lib.optional (!enableQt) "-DENABLE_QT=OFF"
++ lib.optional enableQtTranslation "-DENABLE_QT_TRANSLATION=ON"
++ lib.optional (!enableWebService) "-DENABLE_WEB_SERVICE=OFF"
++ lib.optional (!enableCubeb) "-DENABLE_CUBEB=OFF"
++ lib.optional enableFfmpegAudioDecoder "-DENABLE_FFMPEG_AUDIO_DECODER=ON"
++ lib.optional enableFfmpegVideoDumper "-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON"
++ lib.optional enableFdk "-DENABLE_FDK=ON";
postPatch =
let

View File

@@ -1,15 +1,19 @@
{
python3Packages,
buildPythonApplication,
setuptools,
pyyaml,
types-pyyaml,
yt-dlp,
gallery-dl,
ffmpeg,
callPackage,
webcomix,
...
}:
let
pname = "download";
version = "2.6";
in
python3Packages.buildPythonApplication {
buildPythonApplication {
inherit pname version;
src = builtins.path {
@@ -19,19 +23,14 @@ python3Packages.buildPythonApplication {
pyproject = true;
build-system = [ python3Packages.setuptools ];
build-system = [ setuptools ];
dependencies =
[
ffmpeg
gallery-dl
# (callPackage ../pkgs_pr/webcomix.nix { })
]
++ builtins.attrValues {
inherit (python3Packages)
pyyaml
types-pyyaml
yt-dlp
;
};
dependencies = [
ffmpeg
gallery-dl
pyyaml
types-pyyaml
yt-dlp
webcomix
];
}

View File

@@ -95,7 +95,8 @@ let
cmakeFlags = [
"-GNinja"
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qt6.qtbase.version}"
] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
]
++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
postPatch = ''
# hardcode jdk paths

View File

@@ -6,6 +6,7 @@
gum,
xclip,
ghostty,
rmlint,
callPackage,
...
}:
@@ -19,7 +20,7 @@ writeShellApplication {
gum
xclip
ghostty
(callPackage ../pkgs_pr/rmlint.nix { })
rmlint
];
text = builtins.readFile ../src/packaged_scripts/run.sh;

View File

@@ -22,7 +22,6 @@
lz4,
python3,
unzip,
nix-update-script,
nlohmann_json,
nv-codec-headers-12,
pkg-config,
@@ -30,7 +29,6 @@
vulkan-headers,
vulkan-loader,
yasm,
simpleini,
zlib,
vulkan-memory-allocator,
zstd,

View File

@@ -1,24 +1,28 @@
{ python3Packages, sqlite, ... }:
{
buildPythonApplication,
setuptools,
beautifulsoup4,
requests,
matplotlib,
sqlite,
...
}:
let
pname = "tuh-activity-logger";
version = "1.0";
in
python3Packages.buildPythonApplication {
buildPythonApplication {
inherit pname version;
src = builtins.path {
path = ../src/tuhmayto/.;
name = "${pname}-${version}";
};
build-system = [ python3Packages.setuptools ];
dependencies =
[
sqlite
]
++ builtins.attrValues {
inherit (python3Packages)
beautifulsoup4
requests
matplotlib
;
};
pyproject = true;
build-system = [ setuptools ];
dependencies = [
sqlite
beautifulsoup4
requests
matplotlib
];
}

View File

@@ -1,10 +1,13 @@
{
lib,
python3Packages,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
gevent,
}:
python3Packages.buildPythonPackage rec {
buildPythonPackage rec {
pname = "gevent-eventemitter";
version = "2.1";
pyproject = true;
@@ -16,12 +19,12 @@ python3Packages.buildPythonPackage rec {
hash = "sha256-aW4OsQi3N5yAMdbTd8rxbb2qYMfFJBR4WQFIXvxpiMw=";
};
build-system = with python3Packages; [
build-system = [
setuptools
wheel
];
dependencies = with python3Packages; [
dependencies = [
gevent
];

View File

@@ -1,10 +1,12 @@
{
lib,
fetchFromGitHub,
python3Packages,
buildPythonPackage,
setuptools,
wheel,
}:
python3Packages.buildPythonPackage rec {
buildPythonPackage rec {
pname = "inputs";
version = "0.5";
pyproject = true;
@@ -17,8 +19,8 @@ python3Packages.buildPythonPackage rec {
};
build-system = [
python3Packages.setuptools
python3Packages.wheel
setuptools
wheel
];
pythonImportsCheck = [

View File

@@ -1,67 +0,0 @@
{
lib,
appimageTools,
runCommand,
curl,
gnugrep,
cacert,
fetchurl,
copyDesktopItems,
makeDesktopItem,
}:
appimageTools.wrapType1 rec {
pname = "pureref";
version = "2.0.3";
src =
runCommand "PureRef-${version}_x64.Appimage"
{
nativeBuildInputs = [
curl
gnugrep
cacert
];
outputHash = "sha256-0iR1cP2sZvWWqKwRAwq6L/bmIBSYHKrlI8u8V2hANfM=";
}
''
key="$(curl -A 'nixpkgs/Please contact maintainer if there is an issue' "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
curl -L "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
'';
icon = fetchurl {
url = "https://raw.githubusercontent.com/nextcloud/talk-desktop/refs/tags/v1.0.0/img/icons/icon.png";
hash = "sha256-DteSSuxIs0ukIJrvUO/3Mrh5F2GG5UAVvGRZUuZonkg=";
};
nativeBuildInputs = [
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
type = "Application";
name = "pureref";
desktopName = "PureRef";
# comment = finalAttrs.meta.description;
# exec = finalAttrs.meta.mainProgram;
icon = "pureref";
categories = [
"Graphics"
"2DGraphics"
"RasterGraphics"
];
})
];
meta = with lib; {
description = "Reference Image Viewer";
homepage = "https://www.pureref.com";
license = licenses.unfree;
maintainers = with maintainers; [
elnudev
husjon
];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}

View File

@@ -1,108 +0,0 @@
{
lib,
stdenv,
cairo,
elfutils,
fetchFromGitHub,
fetchpatch,
glib,
gobject-introspection,
gtksourceview3,
json-glib,
makeWrapper,
pango,
pkg-config,
polkit,
python3,
scons,
sphinx,
util-linux,
wrapGAppsHook3,
withGui ? false,
}:
assert withGui -> !stdenv.hostPlatform.isDarwin;
stdenv.mkDerivation rec {
pname = "rmlint";
version = "2.10.2";
src = fetchFromGitHub {
owner = "sahib";
repo = "rmlint";
rev = "v${version}";
sha256 = "sha256-pOo1YfeqHUU6xyBRFbcj2lX1MHJ+a5Hi31BMC1nYZGo=";
};
patches = [
# pass through NIX_* environment variables to scons.
./rmlint/scons-nix-env.patch
# fix #664
(fetchpatch {
url = "https://github.com/sahib/rmlint/commit/f0ca57ec907f7199e3670038d60b4702d1e1d8e2.patch";
hash = "sha256-715X+R2BcQIaUV76hoO+EXPfNheOfw4OIHsqSoruIUI=";
})
];
nativeBuildInputs =
[
pkg-config
sphinx
scons
]
++ lib.optionals withGui [
makeWrapper
wrapGAppsHook3
gobject-introspection
];
buildInputs =
[
glib
json-glib
util-linux
]
++ lib.optionals withGui [
cairo
gtksourceview3
pango
polkit
python3
python3.pkgs.pygobject3
]
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
elfutils
];
prePatch = ''
# remove sources of nondeterminism
substituteInPlace lib/cmdline.c \
--replace "__DATE__" "\"Jan 1 1970\"" \
--replace "__TIME__" "\"00:00:00\""
substituteInPlace docs/SConscript \
--replace "gzip -c " "gzip -cn "
'';
# Otherwise tries to access /usr.
prefixKey = "--prefix=";
sconsFlags = lib.optionals (!withGui) [ "--without-gui" ];
# in GUI mode, this shells out to itself, and tries to import python modules
postInstall = lib.optionalString withGui ''
gappsWrapperArgs+=(--prefix PATH : "$out/bin")
gappsWrapperArgs+=(--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${python3.pkgs.pygobject3}):$(toPythonPath ${python3.pkgs.pycairo})")
'';
meta = with lib; {
description = "Extremely fast tool to remove duplicates and other lint from your filesystem";
homepage = "https://rmlint.readthedocs.org";
platforms = platforms.unix;
license = licenses.gpl3;
maintainers = with maintainers; [
aaschmid
koral
];
mainProgram = "rmlint";
};
}

View File

@@ -1,19 +0,0 @@
scons does not use os environment by default:
https://scons.org/doc/2.1.0/HTML/scons-user/x1750.html
nixpkgs' cc-wrapper on the other hand relies on various NIX_* variables
to be passed through like NIX_CFLAGS_COMPILE_BEFORE.
--- a/SConstruct
+++ b/SConstruct
@@ -559,10 +559,7 @@ options = dict(
SHLINKCOMSTR=link_shared_library_message,
LINKCOMSTR=link_program_message,
PREFIX=GetOption('prefix'),
- ENV = dict([ (key, os.environ[key])
- for key in os.environ
- if key in ['PATH', 'TERM', 'HOME', 'PKG_CONFIG_PATH']
- ])
+ ENV = os.environ,
)
if ARGUMENTS.get('VERBOSE') == "1":

View File

@@ -1,114 +0,0 @@
{
lib,
stdenv,
fetchurl,
fetchzip,
autoPatchelfHook,
copyDesktopItems,
makeDesktopItem,
nss,
cairo,
xorg,
libxkbcommon,
alsa-lib,
at-spi2-core,
mesa,
pango,
libdrm,
vivaldi-ffmpeg-codecs,
gtk3,
libGL,
libglvnd,
systemd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nextcloud-talk-desktop";
version = "1.0.0";
# Building from source would require building also building Server and Talk components
# See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites
src = fetchzip {
url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64.zip";
hash = "sha256-XQa4Fa9eEaFlYrWa00S9aMWKJOPPFGSo4NAlRqE23jM=";
stripRoot = false;
};
icon = fetchurl {
url = "https://raw.githubusercontent.com/nextcloud/talk-desktop/refs/tags/v1.0.0/img/icons/icon.png";
hash = "sha256-DteSSuxIs0ukIJrvUO/3Mrh5F2GG5UAVvGRZUuZonkg=";
};
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
];
buildInputs =
[
nss
cairo
alsa-lib
at-spi2-core
pango
libdrm
libxkbcommon
gtk3
vivaldi-ffmpeg-codecs
mesa
libGL
libglvnd
]
++ (with xorg; [
libX11
libXcomposite
libXdamage
libXrandr
libXfixes
libXcursor
]);
# Required to launch the application and proceed past the zygote_linux fork() process
# Fixes `Zygote could not fork`
runtimeDependencies = [ systemd ];
desktopItems = [
(makeDesktopItem {
type = "Application";
name = "nextcloud-talk-desktop";
desktopName = "Nextcloud Talk";
comment = finalAttrs.meta.description;
exec = finalAttrs.meta.mainProgram;
icon = "nextcloud-talk-desktop";
categories = [ "Chat" ];
})
];
preInstall = ''
mkdir -p $out/bin
mkdir -p $out/opt
cp -r $src/* $out/opt/
'';
installPhase = ''
runHook preInstall
# Link the application in $out/bin away from contents of `preInstall`
ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/nextcloud-talk-desktop
mkdir -p $out/share/icons/hicolor/512x512/apps
cp $icon $out/share/icons/hicolor/512x512/apps/nextcloud-talk-desktop.png
runHook postInstall
'';
meta = with lib; {
description = "Nextcloud Talk Desktop Client";
homepage = "https://github.com/nextcloud/talk-desktop";
changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md";
license = licenses.agpl3Only;
maintainers = with maintainers; [ kashw2 ];
mainProgram = "nextcloud-talk-desktop";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
})

View File

@@ -1,19 +1,27 @@
{
lib,
fetchFromGitHub,
python3Packages,
buildPythonApplication,
poetry-core,
click,
tqdm,
scrapy,
scrapy-splash,
scrapy-fake-useragent,
pytest-rerunfailures,
docker,
}:
python3Packages.buildPythonApplication rec {
buildPythonApplication rec {
pname = "webcomix";
version = "3.11.1";
version = "3.12.0";
pyproject = true;
src = fetchFromGitHub {
owner = "J-CPelletier";
repo = "webcomix";
rev = version;
hash = "sha256-vs7IE1IQ6/2uOYqLUskW4vGFdoz8z/ZBYQPteTcdOR0=";
hash = "sha256-Vsn6Ju4+SG8iOCxnqixnpi9apr8Nc4/mFjpjipPud6g=";
};
postPatch = ''
@@ -24,15 +32,23 @@ python3Packages.buildPythonApplication rec {
'';
build-system = [
python3Packages.poetry-core
poetry-core
];
dependencies = with python3Packages; [
dependencies = [
click
tqdm
scrapy
scrapy-splash
scrapy-fake-useragent
(scrapy-splash.overridePythonAttrs (oldAttrs: {
doCheck = false;
nativeCheckInputs = [ ];
}))
(scrapy-fake-useragent.overridePythonAttrs (oldAttrs: {
doCheck = false;
nativeCheckInputs = [ ];
checkPhase = "";
preCheck = "";
}))
pytest-rerunfailures
docker
];
@@ -42,6 +58,9 @@ python3Packages.buildPythonApplication rec {
'';
doCheck = false;
# Skip runtime dependency check due to version mismatches with nixpkgs
dontCheckRuntimeDeps = true;
meta = {
description = "Webcomic downloader";

View File

@@ -2,7 +2,6 @@
stdenv,
lib,
python3,
python3Packages,
fetchFromGitHub,
meson,
appstream-glib,
@@ -16,7 +15,7 @@
gtk4,
}:
stdenv.mkDerivation (finaAttrs: rec {
stdenv.mkDerivation (_finaAttrs: rec {
pname = "aviator";
version = "0.6.0";
pyproject = true;
@@ -35,7 +34,7 @@ stdenv.mkDerivation (finaAttrs: rec {
pkg-config
desktop-file-utils
ninja
python3Packages.pygobject3
python3.pkgs.pygobject3
gobject-introspection
];

View File

@@ -2,6 +2,11 @@
lib,
stdenv,
fetchFromGitLab,
makeWrapper,
python3,
gtk4,
libadwaita,
wrapGAppsHook4,
}:
stdenv.mkDerivation rec {
@@ -15,6 +20,38 @@ stdenv.mkDerivation rec {
hash = "sha256-oPGC0D7sh+H25qg2ttRtIMjI+HjZImRieWmYw+I6sQE=";
};
nativeBuildInputs = [
makeWrapper
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
(python3.withPackages (ps: with ps; [
pygobject3
pycairo
]))
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/hexcolordle-gtk $out/share/applications $out/share/metainfo
cp -r * $out/share/hexcolordle-gtk/
# Install desktop file and metainfo
cp net.krafting.HexColordle.desktop $out/share/applications/
cp net.krafting.HexColordle.metainfo.xml $out/share/metainfo/
# Create wrapper for the main Python file
makeWrapper ${python3.withPackages (ps: with ps; [pygobject3 pycairo])}/bin/python3 $out/bin/hexcolordle-gtk \
--add-flags "$out/share/hexcolordle-gtk/HexColordle.py" \
--prefix PYTHONPATH : "$out/share/hexcolordle-gtk"
runHook postInstall
'';
meta = {
description = "A game where you need to find a color by guessing its hex code";
homepage = "https://gitlab.com/Krafting/hexcolordle-gtk";

View File

@@ -15,17 +15,18 @@
gtk4,
libadwaita,
wrapGAppsHook4,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "dosage";
version = "1.7.5";
version = "1.9.11";
src = fetchFromGitHub {
owner = "diegopvlk";
repo = "Dosage";
rev = "v${version}";
hash = "sha256-dpmv9GbAgLAZJCifHssC0HQEBXHjrO0mquQd24pNMM0=";
hash = "sha256-TS9niQd3jlALQrFu6H2SucZwwQp0k2BRHqZCYfbz+CI=";
};
nativeBuildInputs = [
@@ -38,18 +39,30 @@ stdenv.mkDerivation rec {
glib
appstream-glib
appstream
wrapGAppsHook4
];
buildInputs = [
gjs
gtk4
libadwaita
wrapGAppsHook4
glib
];
# Ensure GResource files are properly accessible
postInstall = ''
# The GResource files should be automatically handled by wrapGAppsHook4
# but let's make sure the GResource path is correct
wrapProgram $out/bin/io.github.diegopvlk.Dosage \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
description = "Medication tracker for Linux";
homepage = "https://github.com/diegopvlk/Dosage";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ];
mainProgram = "dosage";
mainProgram = "io.github.diegopvlk.Dosage";
platforms = lib.platforms.all;
};
}

View File

@@ -5,6 +5,11 @@
meson,
ninja,
gettext,
pkg-config,
desktop-file-utils,
appstream-glib,
glib,
blueprint-compiler,
}:
stdenv.mkDerivation rec {
@@ -23,8 +28,19 @@ stdenv.mkDerivation rec {
meson
ninja
gettext
pkg-config
desktop-file-utils
appstream-glib
glib
blueprint-compiler
];
# Override the post-install script to avoid sandbox issues
postInstall = ''
# The original postinstall.py tries to run glib-compile-schemas which fails in sandbox
echo "Skipping glib-compile-schemas and other post-install steps"
'';
meta = {
description = "Girens is a Plex GTK client for playing movies, TV shows and music from your Plex library";
homepage = "https://gitlab.gnome.org/tijder/girens";

View File

@@ -17,24 +17,26 @@
pango,
darwin,
alsa-lib,
pulseaudio,
pipewire,
desktop-file-utils,
}:
stdenv.mkDerivation rec {
pname = "exercise-timer";
version = "1.8.1";
version = "1.8.5";
src = fetchFromGitHub {
owner = "mfep";
repo = "exercise-timer";
rev = "v${version}";
hash = "sha256-6MBSUYFZ8nMZX7acam8T0uJWb9E2/L9vnKzJq14p4BY=";
hash = "sha256-YZYAhG8xpXM1m1LrXgwxo3JF74QjOmbnuSbo4SYPBmg=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
name = "${pname}-${version}";
hash = "sha256-mXHw87IUMq1qXQSTavI/ReKUyB0rNMXYld8vND38C30=";
hash = "sha256-JObzeiQHEGIDjOung3o8dpaXVcOoJS2v1hyrcS1fqcI=";
};
nativeBuildInputs = [
@@ -49,23 +51,22 @@ stdenv.mkDerivation rec {
desktop-file-utils
];
buildInputs =
[
cairo
gdk-pixbuf
glib
gtk4
libadwaita
pango
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreAudio
]
++ lib.optionals stdenv.isLinux [
alsa-lib
pulseaudio
pipewire
];
buildInputs = [
cairo
gdk-pixbuf
glib
gtk4
libadwaita
pango
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreAudio
]
++ lib.optionals stdenv.isLinux [
alsa-lib
pulseaudio
pipewire
];
meta = {
description = "Timer app for high intensity interval training";

38
pkgs_wip/inputs.nix Normal file
View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
setuptools,
wheel,
}:
buildPythonPackage rec {
pname = "inputs";
version = "0.5";
pyproject = true;
src = fetchFromGitHub {
owner = "zeth";
repo = "inputs";
rev = "v${version}";
hash = "sha256-tU1R6lhSMZj3Y6XdrT/Yfbte/BdLDvo6TzvLbnr+1vo=";
};
build-system = [
setuptools
wheel
];
pythonImportsCheck = [
"inputs"
];
meta = {
description = "Cross-platform Python support for keyboards, mice and gamepads";
homepage = "https://github.com/zeth/inputs";
changelog = "https://github.com/zeth/inputs/blob/${src.rev}/CHANGELOG.rst";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ CaptainJawZ ];
mainProgram = "inputs";
};
}

View File

@@ -1,50 +1,56 @@
{
lib,
python3Packages,
buildPythonApplication,
fetchFromGitHub,
callPackage,
setuptools,
pyside6,
pyxdg,
pyyaml,
requests,
vdf,
zstandard,
}:
python3Packages.buildPythonApplication rec {
buildPythonApplication rec {
pname = "proton-up-qt";
version = "2.10.2";
version = "2.14.0";
pyproject = true;
src = fetchFromGitHub {
owner = "DavidoTek";
repo = "ProtonUp-Qt";
rev = "v${version}";
hash = "sha256-hf0ZLvn5mv0BlUgMvDwpdsa9ye3Bz47n0aSz+jgBrXg=";
hash = "sha256-UiU2yLajMW5FnRSNS8TCg9Cqs8AkuXA+4FJTS2kfi6I=";
};
pythonRemoveDeps = [
"pyside6-essentials"
];
# Skip runtime dependency check for missing packages
dontCheckRuntimeDeps = true;
build-system = [
python3Packages.setuptools
setuptools
];
dependencies =
with python3Packages;
[
pyside6
pyxdg
pyyaml
requests
vdf
zstandard
]
++ [
(callPackage ./inputs.nix { })
(callPackage ./steam.nix { })
];
dependencies = [
pyside6
pyxdg
pyyaml
requests
vdf
zstandard
(callPackage ./inputs.nix { })
(callPackage ./steam-python.nix { })
];
meta = {
description = "Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface";
homepage = "https://github.com/DavidoTek/ProtonUp-Qt";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ CaptainJawZ ];
mainProgram = "proton-up-qt";
mainProgram = "protonup-qt";
};
}

View File

@@ -1,29 +1,50 @@
{
lib,
python3,
buildPythonApplication,
fetchFromGitHub,
callPackage,
setuptools,
wheel,
argon2-cffi,
bencode-py,
croniter,
fastapi,
gitpython,
humanize,
pytimeparse2,
qbittorrent-api,
requests,
retrying,
ruamel-yaml,
slowapi,
uvicorn,
}:
python3.pkgs.buildPythonApplication rec {
buildPythonApplication rec {
pname = "qbit-manage";
version = "4.1.14";
version = "4.6.3";
pyproject = true;
src = fetchFromGitHub {
owner = "StuffAnThings";
repo = "qbit_manage";
rev = "v${version}";
hash = "sha256-JTQZlJ2d0oOpT8lIf9mgQ/onTs5jiWfvzFx0XBjbCQo=";
hash = "sha256-cTxM3nHQQto7lpoNjShYcCbJCSYiwS9bKqw0DWAjw6A=";
};
postPatch = ''
rm LICENSE
'';
build-system = [
python3.pkgs.setuptools
python3.pkgs.wheel
setuptools
wheel
];
dependencies = with python3.pkgs; [
dependencies = [
argon2-cffi
bencode-py
croniter
fastapi
gitpython
humanize
pytimeparse2
@@ -31,9 +52,12 @@ python3.pkgs.buildPythonApplication rec {
requests
retrying
ruamel-yaml
schedule
(callPackage ./bencodepy.nix { })
slowapi
uvicorn
];
# Skip runtime dependency check due to version mismatches with nixpkgs
dontCheckRuntimeDeps = true;
meta = {
description = "This tool will help manage tedious tasks in qBittorrent and automate them. Tag, categorize, remove Orphaned data, remove unregistered torrents and much much more";

View File

@@ -0,0 +1,25 @@
diff --git a/modules/logs.py b/modules/logs.py
index 1234567..abcdef0 100644
--- a/modules/logs.py
+++ b/modules/logs.py
@@ class MyLogger:
def __init__(
self, logger_name, log_file, log_level, default_dir, screen_width, separating_character, ignore_ghost, log_size, log_count
):
- self.log_dir = os.path.join(default_dir, LOG_DIR)
- self.main_log = log_file if os.path.exists(os.path.dirname(log_file)) else os.path.join(self.log_dir, log_file)
+ self.log_dir = None
+ self.main_log = log_file
self.main_handler = None
self.save_errors = False
self.saved_errors = []
self.config_handlers = {}
self.secrets = set()
self.spacing = 0
self.log_size = log_size
self.log_count = log_count
- os.makedirs(self.log_dir, exist_ok=True)
self._logger = logging.getLogger(self.logger_name)
logging.DRYRUN = DRYRUN
logging.addLevelName(DRYRUN, "DRYRUN")

View File

@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchPypi,
# build-system
setuptools,
setuptools-scm,
# dependencies
packaging,
requests,
urllib3,
}:
buildPythonPackage rec {
pname = "qbittorrent-api";
version = "2025.7.0";
pyproject = true;
src = fetchPypi {
pname = "qbittorrent_api";
inherit version;
hash = "sha256-9GLygXVZzKpMbNwSaUoxU++s1Q+jKFpCVAGrMKvA3nY=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
packaging
requests
urllib3
];
# Tests require internet access
doCheck = false;
pythonImportsCheck = [ "qbittorrentapi" ];
meta = {
description = "Python client implementation for qBittorrent's Web API";
homepage = "https://github.com/rmartin16/qbittorrent-api";
changelog = "https://github.com/rmartin16/qbittorrent-api/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ savyajha ];
};
}

43
pkgs_wip/stashapi.nix Normal file
View File

@@ -0,0 +1,43 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatch-vcs,
hatchling,
requests,
typing-extensions,
}:
buildPythonPackage rec {
pname = "stashapi";
version = "0.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "stg-annon";
repo = "stashapi";
rev = "v${version}";
hash = "sha256-zwDkT8Y6iftq/OxrBzIBvyJ3po4Pfna4xyRKu5KtJco=";
};
build-system = [
hatch-vcs
hatchling
];
dependencies = [
requests
typing-extensions
];
pythonImportsCheck = [
"stashapi"
];
meta = {
description = "Api wrapper";
homepage = "https://github.com/stg-annon/stashapi";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
requests,
}:
buildPythonPackage rec {
pname = "stashapp-tools";
version = "0.2.59";
pyproject = true;
src = fetchFromGitHub {
owner = "stg-annon";
repo = "stashapp-tools";
rev = "v${version}";
hash = "sha256-1IkFQrdfEAVldr6QHcPkYuKUutc4uvRPTpHyz0gp768=";
fetchSubmodules = true;
};
build-system = [
setuptools
wheel
];
postPatch = ''
substituteInPlace setup.py \
--replace 'version="main"' 'version="${version}"'
'';
dependencies = [
requests
];
pythonImportsCheck = [
"stashapi"
];
meta = {
description = "Tools to interface with stashapps API";
homepage = "https://github.com/stg-annon/stashapp-tools";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
};
}

59
pkgs_wip/steam-python.nix Normal file
View File

@@ -0,0 +1,59 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
callPackage,
setuptools,
wheel,
six,
pycryptodomex,
requests,
urllib3,
vdf,
gevent,
protobuf,
cachetools,
cryptography,
}:
buildPythonPackage rec {
pname = "steam-python";
version = "1.4.4";
pyproject = true;
src = fetchFromGitHub {
owner = "ValvePython";
repo = "steam";
rev = version;
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
};
build-system = [
setuptools
wheel
];
dependencies = [
six
pycryptodomex
requests
urllib3
vdf
gevent
protobuf
cachetools
cryptography
(callPackage ../pkgs_pr/gevent-eventemitter.nix { })
];
pythonImportsCheck = [
"steam"
];
meta = {
description = "Python package for interacting with Steam";
homepage = "https://github.com/ValvePython/steam";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ CaptainJawZ ];
};
}

View File

@@ -1,12 +1,24 @@
{
lib,
python3Packages,
buildPythonPackage,
fetchFromGitHub,
callPackage,
setuptools,
wheel,
six,
pycryptodomex,
requests,
urllib3,
vdf,
gevent,
protobuf,
cachetools,
cryptography,
gevent-eventemitter,
}:
python3Packages.buildPythonPackage rec {
pname = "steam";
buildPythonPackage rec {
pname = "steam-python";
version = "1.4.4";
pyproject = true;
@@ -17,25 +29,23 @@ python3Packages.buildPythonPackage rec {
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
};
build-system = with python3Packages; [
build-system = [
setuptools
wheel
];
dependencies =
with python3Packages;
[
six
pycryptodomex
requests
urllib3
vdf
gevent
protobuf
cachetools
cryptography
]
++ [ (callPackage ./gevent-eventemitter.nix { }) ];
dependencies = [
six
pycryptodomex
requests
urllib3
vdf
gevent
protobuf
cachetools
cryptography
gevent-eventemitter
];
pythonImportsCheck = [
"steam"

View File

@@ -1,10 +1,20 @@
{
lib,
python3,
buildPythonApplication,
fetchFromGitHub,
setuptools,
pyxdg,
torf,
coverage,
flake8,
isort,
pytest,
pytest-cov,
ruff,
tox,
}:
python3.pkgs.buildPythonApplication rec {
buildPythonApplication rec {
pname = "torf-cli";
version = "5.2.1";
pyproject = true;
@@ -17,15 +27,15 @@ python3.pkgs.buildPythonApplication rec {
};
build-system = [
python3.pkgs.setuptools
setuptools
];
dependencies = with python3.pkgs; [
dependencies = [
pyxdg
torf
];
optional-dependencies = with python3.pkgs; {
optional-dependencies = {
dev = [
coverage
flake8

View File

@@ -1,10 +1,23 @@
{
lib,
python3,
buildPythonApplication,
fetchFromGitHub,
setuptools,
flatbencode,
coverage,
flake8,
isort,
mypy,
pytest,
pytest-cov,
pytest-httpserver,
pytest-mock,
pytest-xdist,
ruff,
tox,
}:
python3.pkgs.buildPythonApplication rec {
buildPythonApplication rec {
pname = "torf";
version = "4.3.0";
pyproject = true;
@@ -17,14 +30,14 @@ python3.pkgs.buildPythonApplication rec {
};
build-system = [
python3.pkgs.setuptools
setuptools
];
dependencies = with python3.pkgs; [
dependencies = [
flatbencode
];
optional-dependencies = with python3.pkgs; {
optional-dependencies = {
dev = [
coverage
flake8

View File

@@ -33,6 +33,18 @@ class Gallery:
command += f" --dest {directory}" if self.dest or is_comic else ""
command += f" --download-archive {database}" if self.archive else ""
command += self.opt_args if self.opt_args else ""
# Add authentication options from environment variables
command += ' -o "extractor.pixiv.refresh-token=${GALLERY_DL_PIXIV_REFRESH_TOKEN}"'
command += ' -o "extractor.bluesky.password=${GALLERY_DL_BLUESKY_PASSWORD}"'
command += ' -o "extractor.deviantart.refresh-token=${GALLERY_DL_DEVIANTART_REFRESH_TOKEN}"'
command += ' -o "extractor.flickr.access-token=${GALLERY_DL_FLICKR_ACCESS_TOKEN}"'
command += ' -o "extractor.flickr.access-token-secret=${GALLERY_DL_FLICKR_ACCESS_TOKEN_SECRET}"'
command += ' -o "extractor.reddit.refresh-token=${GALLERY_DL_REDDIT_REFRESH_TOKEN}"'
command += ' -o "extractor.tumblr.access-token=${GALLERY_DL_TUMBLR_ACCESS_TOKEN}"'
command += ' -o "extractor.tumblr.access-token-secret=${GALLERY_DL_TUMBLR_ACCESS_TOKEN_SECRET}"'
command += ' -o "extractor.tumblr.api-key=${GALLERY_DL_TUMBLR_API_KEY}"'
command += ' -o "extractor.tumblr.api-secret=${GALLERY_DL_TUMBLR_API_SECRET}"'
if self.link and not self.list:
command += f" {quote(self.link)}"

View File

@@ -3,17 +3,16 @@
}:
pkgs.mkShell {
packages =
[
(pkgs.python3.withPackages (
ps:
builtins.attrValues {
inherit (ps) setuptools pyyaml types-pyyaml;
}
))
]
++ builtins.attrValues {
inherit (pkgs) yt-dlp gallery-dl ffmpeg;
};
packages = [
(pkgs.python3.withPackages (
ps:
builtins.attrValues {
inherit (ps) setuptools pyyaml types-pyyaml;
}
))
]
++ builtins.attrValues {
inherit (pkgs) yt-dlp gallery-dl ffmpeg;
};
buildInputs = [ ];
}

11
src/not flake/deprecated-rewrite/discord_chatlogs Normal file → Executable file
View File

@@ -1,14 +1,15 @@
#!/usr/bin/env fish
#! /usr/bin/env nix-shell
#! nix-shell -i fish -p fish discordchatexporter-cli
read -gP "Insert Token: " token
read -gP "Insert an after date: " dateInput
set afterDate (date "+%F %H:%M:%S" --date="$dateInput")
set beforeDate (date "+%F %H:%M:%S")
set guildIDs 828901086722785281 659186066724749312 \
618655243554521089 111912780377985024
set guildNames 'The fattest pussy club' CreativeCringeCorner \
'Bound Art With Lore and Less Minors' 'Webcomic Land'
# set guildIDs 828901086722785281 659186066724749312 \
# 618655243554521089 111912780377985024
# set guildNames 'The fattest pussy club' CreativeCringeCorner \
# 'Bound Art With Lore and Less Minors' 'Webcomic Land'
set dmIDs 808310797004308500 539621978504560640 810121293818363934 816078347972116491
set dmNames Hurricane DeftBeck Tomayto Weenie
set baseDir $HOME/Temp/Discord

View File

@@ -1,12 +1,18 @@
let pkgs = import <nixpkgs> { };
in pkgs.haskellPackages.developPackage {
let
pkgs = import <nixpkgs> { };
in
pkgs.haskellPackages.developPackage {
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages; [
cabal-install
ghcid
haskell-language-server
fourmolu
regex
]);
modifier =
drv:
pkgs.haskell.lib.addBuildTools drv (
with pkgs.haskellPackages;
[
cabal-install
ghcid
haskell-language-server
fourmolu
regex
]
);
}

View File

@@ -1,18 +1,21 @@
{ pkgs ? import <nixpkgs> { } }:
{
pkgs ? import <nixpkgs> { },
}:
with pkgs;
mkShell {
packages = [
geckodriver
(python3.withPackages (ps:
with ps; [
(python3.withPackages (
ps: with ps; [
tweepy
requests
beautifulsoup4
selenium
webdriver-manager
]))
]
))
];
buildInputs = [ ];
}

View File

@@ -15,7 +15,7 @@ download)
--add-entry="Link:" \
--entry-text "$(xclip -o -sel clip)")
if [ -n "$ENTRY" ]; then
cmd="ssh server \"download -u jawz"
cmd="download -u jawz"
if ! zenity --question --text "Use archive database?" \
--ok-label="Yes" --cancel-label="Cancel"; then
@@ -26,7 +26,7 @@ download)
cmd+=" -s"
fi
cmd+=" -i \"$ENTRY\" \""
cmd+=" -i \"$ENTRY\" "
ghostty -e "$cmd"
else
zenity --error --width=250 \

302
src/scripts/gaytorss.sh Executable file
View File

@@ -0,0 +1,302 @@
#! /usr/bin/env nix-shell
#!nix-shell -i bash -p curl wget lftp xmlstarlet coreutils gnugrep gnused openssh sshpass
set -euo pipefail
IFS=$'\n\t'
## CONFIG (edit if you must)
RSS_URL='https://www.gaytor.rent/rss.php?num=10&feed=dl&cat=69,62,29,46,30,43,19,17,59,44,50,9,7,48,5,67,66,34,68,27,32,63,12,33,53,57,35,36,58,37,54,38,39,64,56,40,61,60,45,47,70,1,41,42,51,65,28&passkey=c8babd3026b740b6bb80c1811cc3fdbb'
REMOTE_HOST='67.lw.itsby.design'
REMOTE_PATH='/home/crouton6368z/watch'
TMPDIR="$(mktemp -d /tmp/rss-torrents.XXXXXX)"
LOGFILE="${TMPDIR}/rss-to-ftps.log"
KEEP_LOCAL=false # set to true if you want to keep local .torrent files
HISTORY_FILE="${HOME}/.rss-to-ftps.history"
touch "$HISTORY_FILE"
cleanup() {
rc=$?
if [[ $rc -ne 0 ]]; then
echo "ERROR: script failed (exit $rc). See $LOGFILE" >&2
fi
if [[ "${KEEP_LOCAL}" = false ]]; then
rm -rf "$TMPDIR"
else
echo "Local files kept in $TMPDIR"
fi
}
trap cleanup EXIT
echo "Working in $TMPDIR" | tee "$LOGFILE"
# FTP credentials
COOKIE_FILE="${HOME}/.librewolf/cookies.txt"
# Check if cookie file exists
if [ ! -f "$COOKIE_FILE" ]; then
echo "WARNING: Cookie file not found at $COOKIE_FILE" | tee -a "$LOGFILE"
echo "This may cause authentication issues. Make sure you are logged into gaytor.rent in LibreWolf." | tee -a "$LOGFILE"
else
echo "Using cookies from: $COOKIE_FILE" | tee -a "$LOGFILE"
# Check if we need to convert cookies to curl format
if [ -f "$COOKIE_FILE" ]; then
# Check if it's in Netscape format (which curl can use directly)
if head -1 "$COOKIE_FILE" | grep -q "# Netscape HTTP Cookie File"; then
echo "Using Netscape format cookies directly" | tee -a "$LOGFILE"
else
echo "Converting cookies to curl format..." | tee -a "$LOGFILE"
# Convert to curl format if needed
CURL_COOKIES="${TMPDIR}/curl_cookies.txt"
grep -v "^#" "$COOKIE_FILE" | grep -v "^$" | while IFS=$'\t' read -r domain flag path secure expiration name value; do
if [ -n "$domain" ] && [ -n "$name" ] && [ -n "$value" ]; then
echo "$domain\t$flag\t$path\t$secure\t$expiration\t$name\t$value" >> "$CURL_COOKIES"
fi
done
COOKIE_FILE="$CURL_COOKIES"
fi
fi
fi
FTP_USER='crouton6368z'
FTP_PASS='PGR7HoxZK8F4Npuh'
cd "$TMPDIR"
# Fetch RSS
RSS_XML="${TMPDIR}/feed.xml"
echo "Downloading RSS feed..." | tee -a "$LOGFILE"
# Validate passkey by checking if RSS feed contains valid content
if grep -q "You don't have access\|Access denied\|Authentication failed\|Invalid passkey" "$RSS_XML" 2>/dev/null; then
echo "ERROR: RSS feed indicates authentication failure. Your passkey may be invalid or expired." | tee -a "$LOGFILE"
echo "Please check your passkey and try again." | tee -a "$LOGFILE"
exit 1
fi
# Check if RSS feed has any items
if ! grep -q "<item>" "$RSS_XML" 2>/dev/null; then
echo "WARNING: RSS feed appears to be empty or invalid. This might indicate an authentication issue." | tee -a "$LOGFILE"
fi
curl -fsS --max-time 60 -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" -b "$COOKIE_FILE" -o "$RSS_XML" "$RSS_URL" || {
echo "Failed to download RSS feed" | tee -a "$LOGFILE"
exit 1
}
# Try robust XML extraction of enclosure URLs
echo "Extracting .torrent URLs from feed..." | tee -a "$LOGFILE"
mapfile -t URLs < <(
xmlstarlet sel -N x="http://purl.org/rss/1.0/" -t \
-m "//enclosure" -v "@url" -n "$RSS_XML" 2>/dev/null || true
)
# Also try common RSS nodes: <link>, <guid>, media:content/@url
mapfile -t EXTRA < <(
xmlstarlet sel -t -m "//*[(local-name()='link' or local-name()='guid' or local-name()='content' )]" \
-v "." -n "$RSS_XML" 2>/dev/null || true
)
# Aggregate and filter for .torrent urls (absolute and containing .torrent)
allurls=()
for u in "${URLs[@]}"; do
[[ -z "$u" ]] && continue
allurls+=("$u")
done
for u in "${EXTRA[@]}"; do
[[ "$u" =~ \.torrent ]] || continue
allurls+=("$u")
done
# Fallback: a conservative grep for http(s) links ending with .torrent
if [ "${#allurls[@]}" -eq 0 ]; then
echo "XML extraction returned nothing; falling back to regex grep." | tee -a "$LOGFILE"
mapfile -t GREPURLS < <(grep -oE 'https?://[^"'\''<> ]+\.torrent[^"'\''<> ]*' "$RSS_XML" | sed 's/&amp;/\&/g' | sort -u)
for u in "${GREPURLS[@]}"; do
allurls+=("$u")
done
fi
# Deduplicate and sanitize
declare -A seen
final_urls=()
for u in "${allurls[@]}"; do
# trim whitespace and decode HTML entities
u="$(echo "$u" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e 's/&amp;/\&/g' -e 's/&lt;/</g' -e 's/&gt;/>/g' -e 's/&quot;/"/g' -e "s/&#039;/'/g")"
[[ -z "$u" ]] && continue
if [[ -z "${seen[$u]:-}" ]]; then
seen[$u]=1
final_urls+=("$u")
fi
done
# Filter out URLs we've already downloaded
urls_to_fetch=()
for url in "${final_urls[@]}"; do
if ! grep -Fxq "$url" "$HISTORY_FILE"; then
urls_to_fetch+=("$url")
else
echo "Skipping already-seen URL: $url" | tee -a "$LOGFILE"
fi
done
if [ "${#final_urls[@]}" -eq 0 ]; then
echo "No .torrent URLs found in feed. Exiting." | tee -a "$LOGFILE"
exit 0
fi
if [ "${#urls_to_fetch[@]}" -eq 0 ]; then
echo "All ${#final_urls[@]} URLs already downloaded. Nothing to do." | tee -a "$LOGFILE"
exit 0
fi
echo "Found ${#final_urls[@]} candidate URLs (${#urls_to_fetch[@]} new). Downloading..." | tee -a "$LOGFILE"
# Download each .torrent (skip if already downloaded)
for url in "${urls_to_fetch[@]}"; do
# guess filename
fname="$(basename "${url%%\?*}")"
# fallback if basename weird
if [[ ! "$fname" =~ \.torrent$ ]]; then
fname="$(echo "$url" | md5sum | awk '{print $1}').torrent"
fi
if [[ -f "$fname" ]]; then
echo "Skipping existing $fname" | tee -a "$LOGFILE"
continue
fi
echo "DEBUG: Attempting to download from URL: $url" | tee -a "$LOGFILE"
echo "DEBUG: URL length: ${#url}" | tee -a "$LOGFILE"
echo "DEBUG: URL contains .torrent: $([[ "$url" =~ .torrent ]] && echo "YES" || echo "NO")" | tee -a "$LOGFILE"
# Test the URL first with a HEAD request
echo "DEBUG: Testing URL with HEAD request..." | tee -a "$LOGFILE"
if curl -I --max-time 30 -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" -b "$COOKIE_FILE" "$url" 2>&1 | tee -a "$LOGFILE"; then
echo "DEBUG: HEAD request successful" | tee -a "$LOGFILE"
else
echo "DEBUG: HEAD request failed" | tee -a "$LOGFILE"
fi
echo "Downloading: $url -> $fname" | tee -a "$LOGFILE"
# try curl then wget as fallback
if ! curl -fsSL --max-time 120 -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" -b "$COOKIE_FILE" -o "$fname" "$url"; then
echo "curl failed for $url, trying wget..." | tee -a "$LOGFILE"
if ! wget -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" --load-cookies="$COOKIE_FILE" -O "$fname" "$url"; then
echo "Failed to download $url, skipping." | tee -a "$LOGFILE"
rm -f "$fname" || true
continue
fi
fi
# sanity check file is .torrent-ish (contains bencoded data)
# Check if file was actually downloaded and is not an HTML error page
if [ ! -s "$fname" ]; then
echo "Warning: $fname is empty, removing..." | tee -a "$LOGFILE"
rm -f "$fname" || true
continue
fi
# Check if file is HTML (error page)
# Check for authentication errors
if grep -q "You don't have access to this torrent\|Download failed\|Access denied\|Authentication failed" "$fname" 2>/dev/null; then
echo "ERROR: Authentication failed for $url - you don't have access to this torrent" | tee -a "$LOGFILE"
echo "This suggests your passkey may be invalid or expired, or you don't have the required permissions." | tee -a "$LOGFILE"
rm -f "$fname" || true
continue
fi
if head -c 100 "$fname" | grep -q "<html|<HTML|<!DOCTYPE"; then
echo "Warning: $fname appears to be an HTML error page, removing..." | tee -a "$LOGFILE"
rm -f "$fname" || true
continue
fi
if ! (head -c 20 "$fname" | grep -q "^d" && grep -a -q "info" "$fname") 2>/dev/null; then
echo "Warning: $fname doesn't look like a valid torrent file; keeping it but check manually." | tee -a "$LOGFILE"
# Check if it's an HTML error page
if grep -q "<html\|<HTML" "$fname" 2>/dev/null; then
echo "File appears to be HTML (possibly an error page). URL may be invalid or require authentication." | tee -a "$LOGFILE"
fi
fi
# Add to history file to avoid re-downloading
echo "$url" >> "$HISTORY_FILE"
done
# Collect .torrent files in tmpdir
torrents=(*.torrent)
# handle case where glob doesn't match
if [[ ${#torrents[@]} -eq 1 && "${torrents[0]}" == '*.torrent' ]]; then
echo "No .torrent files present after download. Exiting." | tee -a "$LOGFILE"
exit 0
fi
echo "Uploading ${#torrents[@]} .torrent file(s) to ${REMOTE_HOST}:${REMOTE_PATH}" | tee -a "$LOGFILE"
# Try SFTP first (SSH File Transfer Protocol on port 22)
echo "Attempting SFTP upload..." | tee -a "$LOGFILE"
if timeout 300 sshpass -p "${FTP_PASS}" sftp -o StrictHostKeyChecking=no -o ConnectTimeout=60 -P 22 "${FTP_USER}@${REMOTE_HOST}" <<EOF 2>&1 | tee -a "$LOGFILE"
mkdir ${REMOTE_PATH}
cd ${REMOTE_PATH}
mput *.torrent
bye
EOF
then
echo "SFTP upload successful." | tee -a "$LOGFILE"
else
upload_rc=$?
echo "SFTP upload failed (exit $upload_rc). Trying FTPS..." | tee -a "$LOGFILE"
# Fallback to FTPS
timeout 300 lftp -u "${FTP_USER},${FTP_PASS}" "ftps://${REMOTE_HOST}" <<EOF 2>&1 | tee -a "$LOGFILE"
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ftp:use-feat true
set ssl:verify-certificate false
set ftp:passive-mode true
set net:timeout 60
set net:max-retries 3
set net:reconnect-interval-base 5
set ftp:prefer-epsv false
debug 3
# Make remote dir if needed, then upload
mkdir -p "${REMOTE_PATH}" || true
cd "${REMOTE_PATH}" || exit 1
mput -- *.torrent
bye
EOF
ftps_rc=${PIPESTATUS[0]:-0}
if [[ $ftps_rc -ne 0 ]]; then
echo "FTPS also failed (exit $ftps_rc). Trying regular FTP..." | tee -a "$LOGFILE"
# Final fallback to regular FTP
timeout 300 lftp -u "${FTP_USER},${FTP_PASS}" "ftp://${REMOTE_HOST}" <<EOF 2>&1 | tee -a "$LOGFILE"
set ftp:passive-mode true
set net:timeout 60
set net:max-retries 3
set net:reconnect-interval-base 5
set ftp:prefer-epsv false
debug 3
# Make remote dir if needed, then upload
mkdir -p "${REMOTE_PATH}" || true
cd "${REMOTE_PATH}" || exit 1
mput -- *.torrent
bye
EOF
ftp_rc=${PIPESTATUS[0]:-0}
if [[ $ftp_rc -ne 0 ]]; then
echo "All upload methods failed (SFTP, FTPS, FTP). See $LOGFILE" | tee -a "$LOGFILE"
exit $ftp_rc
fi
echo "FTP fallback upload successful." | tee -a "$LOGFILE"
else
echo "FTPS upload successful." | tee -a "$LOGFILE"
fi
fi
# optional cleanup
if [[ "${KEEP_LOCAL}" = false ]]; then
echo "Removing local torrent files..." | tee -a "$LOGFILE"
rm -f -- *.torrent || true
fi
echo "Done. Log: $LOGFILE"
exit 0

View File

@@ -10,7 +10,7 @@ fi
root=/srv/pool/scrapping
cd $root || exit
set -- Aqp Ghekre
set -- Aqp ElasticWind
for user in "$@"; do
originDir=$root/$user
destDir=/srv/pool/nextcloud/$user/files/Requested
@@ -44,12 +44,12 @@ for user in "$@"; do
find ./ -mindepth 1 -type d -empty -delete
chown 987:988 -R "$destDir"
chown "$(id -u nextcloud)":"$(id -g nextcloud)" -R "$destDir"
find "$destDir" -type d -exec chmod -R 755 {} \;
find "$destDir" -type f -exec chmod -R 644 {} \;
if [ -d "$destDirDup" ]; then
chown 987:988 -R "$destDirDup"
chown "$(id -u nextcloud)":"$(id -g nextcloud)" -R "$destDir"
find "$destDirDup" -type d -exec chmod -R 755 {} \;
find "$destDirDup" -type f -exec chmod -R 644 {} \;
fi

View File

@@ -1,7 +1,9 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash trashy fd ripgrep file jq curl
directories=("$HOME/Pictures/To Organize/" "$HOME/Downloads/" "$HOME/Downloads/cache")
directories=("$HOME/Pictures/unorganized/" "$HOME/Downloads/" "$HOME/Downloads/cache")
screenshots_dir=$HOME/Pictures/screenshots/
photos_dir=$HOME/Pictures/photos/camera/
replace_extension() {
local file_basename
@@ -45,12 +47,11 @@ while IFS= read -r file; do
if ! basename "$file" | rg -q 'Screenshot_\d{8}'; then
continue
fi
echo "moving screenshot $file into $HOME/Pictures/Screenshots/"
command mv -n "$file" "$HOME/Pictures/Screenshots/"
echo "moving screenshot $file into $screenshots_dir"
command mv -n "$file" "$screenshots_dir"
done < <(fd . "${directories[@]}" -d 1 -tf --absolute-path)
# screenshots=$HOME/Pictures/Screenshots
classify_directories=("$HOME/Pictures/Screenshots" "$HOME/Pictures/Photos/Camera")
classify_directories=("$screenshots_dir" "$photos_dir")
if (($(fd . "${classify_directories[@]}" -tf -d 1 | wc -l) > 0)); then
while IFS= read -r file; do
date=$(stat -c "%y" "$file" | rg -o "\d{4}-\d{2}-\d{2}")
@@ -101,7 +102,7 @@ while IFS= read -r game_dir; do
continue
fi
# Modify this to store your screenshots somewhere else
dir_dest=$(realpath "$HOME/Pictures/Screenshots/Games")/"$game_name"
dir_dest=$(realpath "$screenshots_dir/Games")/"$game_name"
dir_game=$(realpath "$dir_steam")/"$game_id"/screenshots
# If there are not screenshots currently stored, why bother lol
if ! [[ -d $dir_game ]]; then
@@ -120,7 +121,7 @@ cyberpunk_dir=$HOME/Games/gog/cyberpunk-2077/drive_c/users/jawz/Pictures/"Cyberp
if [[ -d $cyberpunk_dir ]]; then
while IFS= read -r file; do
echo "Moving cyberpunk screenshots $(basename "$file")"
command mv -n "$file" "$HOME/Pictures/Screenshots/Games/Cyberpunk 2077/"
command mv -n "$file" "$screenshots_dir/Games/Cyberpunk 2077/"
done < <(fd . "$cyberpunk_dir" -tf)
fi