Compare commits

..

15 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
37 changed files with 958 additions and 615 deletions

75
flake.lock generated
View File

@@ -1,24 +1,89 @@
{ {
"nodes": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1753345091, "lastModified": 1762653957,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", "narHash": "sha256-3em63zYO+s0NxxKwPXyzV80fXfwZOg7/LjYF5ndZltc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", "rev": "c148fa0cf61fc3bb7b011f2d4f8d789964ea7dd0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743576891,
"narHash": "sha256-vXiKURtntURybE6FMNFAVpRPr8+e8KoLPrYs9TGuAKc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44a69ed688786e98a101f02b712c313f1ade37ab",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "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"; description = "Nix flake for the activity logging script";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/master";
# sudoku-solver.url = "path:./src/sudoku-hs"; sudoku-solver.url = "path:./src/sudoku-hs";
}; };
outputs = outputs =
{ nixpkgs, ... }@inputs: { nixpkgs, ... }@inputs:
@@ -11,6 +11,7 @@
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ inputs.self.overlays.default ];
}; };
generatePackages = generatePackages =
args: args:
@@ -28,30 +29,30 @@
|> builtins.listToAttrs; |> builtins.listToAttrs;
in in
{ {
overlays.default = final: prev: { overlays.default = _final: prev: {
scrapy = prev.scrapy.overrideAttrs (old: rec { python3Packages = prev.python3Packages.override {
version = "2.11.2"; overrides = pyself: pysuper: {
src = prev.fetchFromGitHub { webcomix = prev.python3Packages.callPackage ./pkgs_pr/webcomix.nix { };
owner = "scrapy";
repo = "scrapy";
tag = version;
hash = "sha256-EaO1kQ3VSTwEW+r0kSKycOxHNTPwwCVjch1ZBrTU0qQ=";
}; };
}); };
}; };
packages.x86_64-linux = packages.x86_64-linux =
let let
scriptBin = path: name: pkgs.writeScriptBin name (builtins.readFile path); 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 in
{ {
citra = pkgs.callPackage ./pkgs/citra/default.nix { branch = "nightly"; }; citra = pkgs.callPackage ./pkgs/citra/default.nix { branch = "nightly"; };
torzu = pkgs.callPackage ./pkgs/torzu/package.nix { }; torzu = pkgs.callPackage ./pkgs/torzu/package.nix { };
pano = pkgs.callPackage ./pkgs/pano/default.nix { }; pano = pkgs.callPackage ./pkgs/pano/default.nix { };
mealie = pkgs.callPackage ./pkgs/mealie/package.nix { };
vdhcoapp = pkgs.callPackage ./pkgs/vdhcoapp/default.nix { }; vdhcoapp = pkgs.callPackage ./pkgs/vdhcoapp/default.nix { };
resilio = pkgs.callPackage ./pkgs/resilio/package.nix { }; sudoku-solver = inputs.sudoku-solver.packages.${system}.default;
# sudoku-solver = inputs.sudoku-solver.packages.${system}.default;
} }
// generatePackages { // generatePackages {
dir = "pkgs"; dir = "pkgs";

View File

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

View File

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

View File

@@ -95,7 +95,8 @@ let
cmakeFlags = [ cmakeFlags = [
"-GNinja" "-GNinja"
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qt6.qtbase.version}" "-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 = '' postPatch = ''
# hardcode jdk paths # hardcode jdk paths

View File

@@ -1,61 +0,0 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
libxcrypt-legacy,
}:
stdenv.mkDerivation rec {
pname = "resilio-sync";
version = "2.8.1.1390";
src =
{
x86_64-linux = fetchurl {
url = "https://download-cdn.resilio.com/${version}/linux/x64/0/resilio-sync_x64.tar.gz";
sha256 = "sha256-XrfE2frDxOS32MzO7gpJEsMd0WY+b7TS0h/H94M7Py4=";
};
i686-linux = fetchurl {
url = "https://download-cdn.resilio.com/${version}/linux/i386/0/resilio-sync_i386.tar.gz";
sha256 = "sha256-tWwb9DHLlXeyimzyo/yxVKqlkP3jlAxT2Yzs6h2bIgs=";
};
aarch64-linux = fetchurl {
url = "https://download-cdn.resilio.com/${version}/linux/arm64/0/resilio-sync_arm64.tar.gz";
sha256 = "sha256-b859DqxTfnBMMeiwXlGKTQ+Mpmr2Rpg24l/GNkxSWbA=";
};
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
sourceRoot = ".";
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
stdenv.cc.libc
libxcrypt-legacy
];
installPhase = ''
install -D rslsync "$out/bin/rslsync"
'';
meta = with lib; {
description = "Automatically sync files via secure, distributed technology";
homepage = "https://www.resilio.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfreeRedistributable;
platforms = platforms.linux;
maintainers = with maintainers; [
domenkozar
thoughtpolice
cwoac
];
mainProgram = "rslsync";
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,6 +2,11 @@
lib, lib,
stdenv, stdenv,
fetchFromGitLab, fetchFromGitLab,
makeWrapper,
python3,
gtk4,
libadwaita,
wrapGAppsHook4,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -15,6 +20,38 @@ stdenv.mkDerivation rec {
hash = "sha256-oPGC0D7sh+H25qg2ttRtIMjI+HjZImRieWmYw+I6sQE="; 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 = { meta = {
description = "A game where you need to find a color by guessing its hex code"; description = "A game where you need to find a color by guessing its hex code";
homepage = "https://gitlab.com/Krafting/hexcolordle-gtk"; homepage = "https://gitlab.com/Krafting/hexcolordle-gtk";

View File

@@ -15,17 +15,18 @@
gtk4, gtk4,
libadwaita, libadwaita,
wrapGAppsHook4, wrapGAppsHook4,
makeWrapper,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dosage"; pname = "dosage";
version = "1.7.5"; version = "1.9.11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "diegopvlk"; owner = "diegopvlk";
repo = "Dosage"; repo = "Dosage";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-dpmv9GbAgLAZJCifHssC0HQEBXHjrO0mquQd24pNMM0="; hash = "sha256-TS9niQd3jlALQrFu6H2SucZwwQp0k2BRHqZCYfbz+CI=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@@ -38,18 +39,30 @@ stdenv.mkDerivation rec {
glib glib
appstream-glib appstream-glib
appstream appstream
wrapGAppsHook4
];
buildInputs = [
gjs gjs
gtk4 gtk4
libadwaita 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 = { meta = {
description = "Medication tracker for Linux"; description = "Medication tracker for Linux";
homepage = "https://github.com/diegopvlk/Dosage"; homepage = "https://github.com/diegopvlk/Dosage";
license = lib.licenses.gpl3Only; license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ]; maintainers = with lib.maintainers; [ ];
mainProgram = "dosage"; mainProgram = "io.github.diegopvlk.Dosage";
platforms = lib.platforms.all; platforms = lib.platforms.all;
}; };
} }

View File

@@ -5,6 +5,11 @@
meson, meson,
ninja, ninja,
gettext, gettext,
pkg-config,
desktop-file-utils,
appstream-glib,
glib,
blueprint-compiler,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -23,8 +28,19 @@ stdenv.mkDerivation rec {
meson meson
ninja ninja
gettext 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 = { meta = {
description = "Girens is a Plex GTK client for playing movies, TV shows and music from your Plex library"; 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"; homepage = "https://gitlab.gnome.org/tijder/girens";

View File

@@ -17,24 +17,26 @@
pango, pango,
darwin, darwin,
alsa-lib, alsa-lib,
pulseaudio,
pipewire,
desktop-file-utils, desktop-file-utils,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "exercise-timer"; pname = "exercise-timer";
version = "1.8.1"; version = "1.8.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mfep"; owner = "mfep";
repo = "exercise-timer"; repo = "exercise-timer";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-6MBSUYFZ8nMZX7acam8T0uJWb9E2/L9vnKzJq14p4BY="; hash = "sha256-YZYAhG8xpXM1m1LrXgwxo3JF74QjOmbnuSbo4SYPBmg=";
}; };
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoVendor {
inherit src; inherit src;
name = "${pname}-${version}"; name = "${pname}-${version}";
hash = "sha256-mXHw87IUMq1qXQSTavI/ReKUyB0rNMXYld8vND38C30="; hash = "sha256-JObzeiQHEGIDjOung3o8dpaXVcOoJS2v1hyrcS1fqcI=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@@ -49,23 +51,22 @@ stdenv.mkDerivation rec {
desktop-file-utils desktop-file-utils
]; ];
buildInputs = buildInputs = [
[ cairo
cairo gdk-pixbuf
gdk-pixbuf glib
glib gtk4
gtk4 libadwaita
libadwaita pango
pango ]
] ++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreAudio
darwin.apple_sdk.frameworks.CoreAudio ]
] ++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.isLinux [ alsa-lib
alsa-lib pulseaudio
pulseaudio pipewire
pipewire ];
];
meta = { meta = {
description = "Timer app for high intensity interval training"; 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, lib,
python3Packages, buildPythonApplication,
fetchFromGitHub, fetchFromGitHub,
callPackage, callPackage,
setuptools,
pyside6,
pyxdg,
pyyaml,
requests,
vdf,
zstandard,
}: }:
python3Packages.buildPythonApplication rec { buildPythonApplication rec {
pname = "proton-up-qt"; pname = "proton-up-qt";
version = "2.10.2"; version = "2.14.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "DavidoTek"; owner = "DavidoTek";
repo = "ProtonUp-Qt"; repo = "ProtonUp-Qt";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-hf0ZLvn5mv0BlUgMvDwpdsa9ye3Bz47n0aSz+jgBrXg="; hash = "sha256-UiU2yLajMW5FnRSNS8TCg9Cqs8AkuXA+4FJTS2kfi6I=";
}; };
pythonRemoveDeps = [ pythonRemoveDeps = [
"pyside6-essentials" "pyside6-essentials"
]; ];
# Skip runtime dependency check for missing packages
dontCheckRuntimeDeps = true;
build-system = [ build-system = [
python3Packages.setuptools setuptools
]; ];
dependencies = dependencies = [
with python3Packages; pyside6
[ pyxdg
pyside6 pyyaml
pyxdg requests
pyyaml vdf
requests zstandard
vdf (callPackage ./inputs.nix { })
zstandard (callPackage ./steam-python.nix { })
] ];
++ [
(callPackage ./inputs.nix { })
(callPackage ./steam.nix { })
];
meta = { meta = {
description = "Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface"; 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"; homepage = "https://github.com/DavidoTek/ProtonUp-Qt";
license = lib.licenses.gpl3Only; license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ CaptainJawZ ]; maintainers = with lib.maintainers; [ CaptainJawZ ];
mainProgram = "proton-up-qt"; mainProgram = "protonup-qt";
}; };
} }

View File

@@ -1,20 +1,34 @@
{ {
lib, lib,
python3, buildPythonApplication,
fetchFromGitHub, 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"; pname = "qbit-manage";
version = "4.3.0"; version = "4.6.3";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "StuffAnThings"; owner = "StuffAnThings";
repo = "qbit_manage"; repo = "qbit_manage";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-Wj1s11PwHfH4hDGEn0jW/REO2gI7+AGyb2B/QKUhlyk="; hash = "sha256-cTxM3nHQQto7lpoNjShYcCbJCSYiwS9bKqw0DWAjw6A=";
}; };
postPatch = '' postPatch = ''
@@ -22,37 +36,28 @@ python3.pkgs.buildPythonApplication rec {
''; '';
build-system = [ build-system = [
python3.pkgs.setuptools setuptools
python3.pkgs.wheel wheel
]; ];
dependencies = with python3.pkgs; [ dependencies = [
argon2-cffi
bencode-py
croniter croniter
fastapi
gitpython gitpython
humanize humanize
pytimeparse2 pytimeparse2
bencode-py qbittorrent-api
requests requests
retrying retrying
ruamel-yaml ruamel-yaml
schedule slowapi
(callPackage ./qbittorrent-api.nix { uvicorn
inherit lib;
inherit (python3.pkgs)
buildPythonPackage
fetchPypi
# build-system
setuptools
setuptools-scm
# dependencies
packaging
requests
urllib3
;
})
]; ];
# Skip runtime dependency check due to version mismatches with nixpkgs
dontCheckRuntimeDeps = true;
meta = { 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"; 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

@@ -15,13 +15,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "qbittorrent-api"; pname = "qbittorrent-api";
version = "2025.5.0"; version = "2025.7.0";
pyproject = true; pyproject = true;
src = fetchPypi { src = fetchPypi {
pname = "qbittorrent_api"; pname = "qbittorrent_api";
inherit version; inherit version;
hash = "sha256-NKD5weGufhbeUOlGUXUsjZejz1TCo+GgXGqDdzmaDjA="; hash = "sha256-9GLygXVZzKpMbNwSaUoxU++s1Q+jKFpCVAGrMKvA3nY=";
}; };
build-system = [ build-system = [

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

View File

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

View File

@@ -1,10 +1,23 @@
{ {
lib, lib,
python3, buildPythonApplication,
fetchFromGitHub, 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"; pname = "torf";
version = "4.3.0"; version = "4.3.0";
pyproject = true; pyproject = true;
@@ -17,14 +30,14 @@ python3.pkgs.buildPythonApplication rec {
}; };
build-system = [ build-system = [
python3.pkgs.setuptools setuptools
]; ];
dependencies = with python3.pkgs; [ dependencies = [
flatbencode flatbencode
]; ];
optional-dependencies = with python3.pkgs; { optional-dependencies = {
dev = [ dev = [
coverage coverage
flake8 flake8

View File

@@ -33,6 +33,18 @@ class Gallery:
command += f" --dest {directory}" if self.dest or is_comic else "" command += f" --dest {directory}" if self.dest or is_comic else ""
command += f" --download-archive {database}" if self.archive else "" command += f" --download-archive {database}" if self.archive else ""
command += self.opt_args if self.opt_args 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: if self.link and not self.list:
command += f" {quote(self.link)}" command += f" {quote(self.link)}"

View File

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

View File

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

View File

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

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

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