Compare commits
7 Commits
4e91264f0f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64676aca5d | ||
|
|
5f3418f061 | ||
|
|
0411765052 | ||
|
|
e40d6fc2bb | ||
|
|
b1ba215f4a | ||
|
|
6efd55712d | ||
|
|
b94855afb8 |
8
flake.lock
generated
8
flake.lock
generated
@@ -20,16 +20,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1762653957,
|
||||
"narHash": "sha256-3em63zYO+s0NxxKwPXyzV80fXfwZOg7/LjYF5ndZltc=",
|
||||
"lastModified": 1764521362,
|
||||
"narHash": "sha256-M101xMtWdF1eSD0xhiR8nG8CXRlHmv6V+VoY65Smwf4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c148fa0cf61fc3bb7b011f2d4f8d789964ea7dd0",
|
||||
"rev": "871b9fd269ff6246794583ce4ee1031e1da71895",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"ref": "25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
59
flake.nix
59
flake.nix
@@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "Nix flake for the activity logging script";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/25.11";
|
||||
sudoku-solver.url = "path:./src/sudoku-hs";
|
||||
};
|
||||
outputs =
|
||||
@@ -31,21 +31,68 @@
|
||||
{
|
||||
overlays.default = _final: prev: {
|
||||
python3Packages = prev.python3Packages.override {
|
||||
overrides = pyself: pysuper: {
|
||||
overrides = _pyself: _pysuper: {
|
||||
webcomix = prev.python3Packages.callPackage ./pkgs_pr/webcomix.nix { };
|
||||
download = prev.python3Packages.callPackage ./pkgs/download.nix {
|
||||
webcomix = _pyself.webcomix;
|
||||
};
|
||||
};
|
||||
};
|
||||
download = _final.python3Packages.download;
|
||||
# Fix curl-impersonate-ff build issue with CMake 4.0+ requiring CMake >= 3.5
|
||||
curl-impersonate-ff = prev.curl-impersonate-ff.overrideAttrs (oldAttrs: {
|
||||
# Patch before configure so Makefile.in is patched
|
||||
postPatch = (oldAttrs.postPatch or "") + ''
|
||||
# Patch Makefile.in to add CMAKE_POLICY_VERSION_MINIMUM flag
|
||||
if [ -f Makefile.in ]; then
|
||||
sed -i 's|cmake -DCMAKE_BUILD_TYPE=Release|cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release|g' Makefile.in
|
||||
fi
|
||||
'';
|
||||
# Patch after configure when Makefile exists and brotli is extracted
|
||||
postConfigure = (oldAttrs.postConfigure or "") + ''
|
||||
# Patch brotli CMakeLists.txt after extraction
|
||||
for brotli_dir in brotli-*/; do
|
||||
if [ -d "$brotli_dir" ] && [ -f "$brotli_dir/CMakeLists.txt" ]; then
|
||||
sed -i 's/cmake_minimum_required(VERSION [0-9.]\+)/cmake_minimum_required(VERSION 3.5)/g' "$brotli_dir/CMakeLists.txt"
|
||||
fi
|
||||
done
|
||||
# Also patch the generated Makefile
|
||||
if [ -f Makefile ]; then
|
||||
sed -i 's|cmake -DCMAKE_BUILD_TYPE=Release|cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release|g' Makefile
|
||||
fi
|
||||
'';
|
||||
});
|
||||
# Also fix curl-impersonate if it has the same issue
|
||||
curl-impersonate = prev.curl-impersonate.overrideAttrs (oldAttrs: {
|
||||
postPatch = (oldAttrs.postPatch or "") + ''
|
||||
if [ -f Makefile.in ]; then
|
||||
sed -i 's|cmake -DCMAKE_BUILD_TYPE=Release|cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release|g' Makefile.in
|
||||
fi
|
||||
'';
|
||||
postConfigure = (oldAttrs.postConfigure or "") + ''
|
||||
for brotli_dir in brotli-*/; do
|
||||
if [ -d "$brotli_dir" ] && [ -f "$brotli_dir/CMakeLists.txt" ]; then
|
||||
sed -i 's/cmake_minimum_required(VERSION [0-9.]\+)/cmake_minimum_required(VERSION 3.5)/g' "$brotli_dir/CMakeLists.txt"
|
||||
fi
|
||||
done
|
||||
if [ -f Makefile ]; then
|
||||
sed -i 's|cmake -DCMAKE_BUILD_TYPE=Release|cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release|g' Makefile
|
||||
fi
|
||||
'';
|
||||
});
|
||||
};
|
||||
packages.x86_64-linux =
|
||||
let
|
||||
scriptBin = path: name: pkgs.writeScriptBin name (builtins.readFile path);
|
||||
pkgsBin = path: _name:
|
||||
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 { };
|
||||
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"; };
|
||||
|
||||
70
pkgs/furtherance.nix
Normal file
70
pkgs/furtherance.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
fontconfig,
|
||||
libxkbcommon,
|
||||
openssl,
|
||||
pkg-config,
|
||||
xorg,
|
||||
vulkan-loader,
|
||||
wayland,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "furtherance";
|
||||
version = "25.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "unobserved-io";
|
||||
repo = "Furtherance";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-LyGO+fbsu16Us0+sK0T6HlGq7EwZWSetd+gCIKKEbkk=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-j/5O40k12rl/gmRc1obo9ImdkZ0Mdrke2PCf6tFCWIo=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fontconfig
|
||||
openssl
|
||||
libxkbcommon
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
vulkan-loader
|
||||
wayland
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# panicked at src/tests/timer_tests.rs:30:9
|
||||
"--skip=tests::timer_tests::timer_tests::test_split_task_input_basic"
|
||||
];
|
||||
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
patchelf $out/bin/${finalAttrs.pname} \
|
||||
--add-rpath ${
|
||||
lib.makeLibraryPath [
|
||||
vulkan-loader
|
||||
libxkbcommon
|
||||
wayland
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Track your time without being tracked";
|
||||
mainProgram = "furtherance";
|
||||
homepage = "https://github.com/unobserved-io/Furtherance";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [
|
||||
CaptainJawZ
|
||||
locnide
|
||||
];
|
||||
};
|
||||
})
|
||||
@@ -7,7 +7,7 @@
|
||||
xclip,
|
||||
ghostty,
|
||||
rmlint,
|
||||
callPackage,
|
||||
download,
|
||||
...
|
||||
}:
|
||||
writeShellApplication {
|
||||
@@ -21,6 +21,7 @@ writeShellApplication {
|
||||
xclip
|
||||
ghostty
|
||||
rmlint
|
||||
download
|
||||
];
|
||||
|
||||
text = builtins.readFile ../src/packaged_scripts/run.sh;
|
||||
|
||||
@@ -39,11 +39,11 @@ buildPythonApplication rec {
|
||||
click
|
||||
tqdm
|
||||
scrapy
|
||||
(scrapy-splash.overridePythonAttrs (oldAttrs: {
|
||||
(scrapy-splash.overridePythonAttrs (_oldAttrs: {
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [ ];
|
||||
}))
|
||||
(scrapy-fake-useragent.overridePythonAttrs (oldAttrs: {
|
||||
(scrapy-fake-useragent.overridePythonAttrs (_oldAttrs: {
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [ ];
|
||||
checkPhase = "";
|
||||
@@ -58,7 +58,7 @@ buildPythonApplication rec {
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
||||
# Skip runtime dependency check due to version mismatches with nixpkgs
|
||||
dontCheckRuntimeDeps = true;
|
||||
|
||||
|
||||
@@ -28,27 +28,36 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
gtk4
|
||||
libadwaita
|
||||
(python3.withPackages (ps: with ps; [
|
||||
pygobject3
|
||||
pycairo
|
||||
]))
|
||||
(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 \
|
||||
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
|
||||
'';
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
gtk4,
|
||||
libadwaita,
|
||||
wrapGAppsHook4,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
@@ -27,7 +27,7 @@ buildPythonApplication rec {
|
||||
pythonRemoveDeps = [
|
||||
"pyside6-essentials"
|
||||
];
|
||||
|
||||
|
||||
# Skip runtime dependency check for missing packages
|
||||
dontCheckRuntimeDeps = true;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ buildPythonApplication rec {
|
||||
slowapi
|
||||
uvicorn
|
||||
];
|
||||
|
||||
|
||||
# Skip runtime dependency check due to version mismatches with nixpkgs
|
||||
dontCheckRuntimeDeps = true;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
callPackage,
|
||||
setuptools,
|
||||
wheel,
|
||||
six,
|
||||
|
||||
@@ -57,66 +57,66 @@ convert_discord() {
|
||||
operation=$(gum choose mp4 av1 discord nitro gif enc265)
|
||||
|
||||
case $operation in
|
||||
1 | mp4)
|
||||
to_convert=()
|
||||
1 | mp4)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_mp4 "$file"
|
||||
done
|
||||
;;
|
||||
2 | av1)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_av1 "$file"
|
||||
done
|
||||
;;
|
||||
3 | discord)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_discord "$file" discord 96 8.0 "1280x720"
|
||||
done
|
||||
;;
|
||||
4 | nitro)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_discord "$file" nitro 128 500.0 "1920x1080"
|
||||
done
|
||||
;;
|
||||
5 | gif)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_gif "$file"
|
||||
done
|
||||
;;
|
||||
6 | enc265)
|
||||
to_convert=()
|
||||
extensions=(flv m4v mpg avi mov ts mkv mp4 webm)
|
||||
for ext in "${extensions[@]}"; do
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_mp4 "$file"
|
||||
done
|
||||
;;
|
||||
2 | av1)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_av1 "$file"
|
||||
done
|
||||
;;
|
||||
3 | discord)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_discord "$file" discord 96 8.0 "1280x720"
|
||||
done
|
||||
;;
|
||||
4 | nitro)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_discord "$file" nitro 128 50.0 "1920x1080"
|
||||
done
|
||||
;;
|
||||
5 | gif)
|
||||
to_convert=()
|
||||
while IFS= read -r file; do
|
||||
to_convert+=("$file")
|
||||
done < <(fd . "$(pwd)" -tf -aL | fzf --multi -i)
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_gif "$file"
|
||||
done
|
||||
;;
|
||||
6 | enc265)
|
||||
to_convert=()
|
||||
extensions=(flv m4v mpg avi mov ts mkv mp4 webm)
|
||||
for ext in "${extensions[@]}"; do
|
||||
while IFS= read -r file; do
|
||||
if ! (mediainfo "$file" | grep Writing\ library | grep -q x265); then
|
||||
to_convert+=("$file")
|
||||
fi
|
||||
done < <(fd . -e "$ext" -tf -aL)
|
||||
done
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_mp4 "$file"
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo -n "Please select a valid input"
|
||||
;;
|
||||
if ! (mediainfo "$file" | grep Writing\ library | grep -q x265); then
|
||||
to_convert+=("$file")
|
||||
fi
|
||||
done < <(fd . -e "$ext" -tf -aL)
|
||||
done
|
||||
for file in "${to_convert[@]}"; do
|
||||
convert_mp4 "$file"
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo -n "Please select a valid input"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p bash yt-dlp curl-impersonate
|
||||
#! nix-shell -i bash -p bash yt-dlp
|
||||
|
||||
minutes=5
|
||||
time_alive=60
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p bash trashy fd ripgrep file jq curl
|
||||
|
||||
directories=("$HOME/Pictures/unorganized/" "$HOME/Downloads/" "$HOME/Downloads/cache")
|
||||
screenshots_dir=$HOME/Pictures/screenshots/
|
||||
photos_dir=$HOME/Pictures/photos/camera/
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user