Compare commits

..

5 Commits

6 changed files with 51 additions and 39 deletions

8
flake.lock generated
View File

@@ -20,16 +20,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1761173472, "lastModified": 1762653957,
"narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", "narHash": "sha256-3em63zYO+s0NxxKwPXyzV80fXfwZOg7/LjYF5ndZltc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", "rev": "c148fa0cf61fc3bb7b011f2d4f8d789964ea7dd0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "master",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@@ -1,7 +1,7 @@
{ {
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 =
@@ -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:
@@ -29,15 +30,11 @@
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

View File

@@ -1,14 +1,19 @@
{ {
python3Packages, buildPythonApplication,
setuptools,
pyyaml,
types-pyyaml,
yt-dlp,
gallery-dl, gallery-dl,
ffmpeg, ffmpeg,
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 {
@@ -18,18 +23,14 @@ python3Packages.buildPythonApplication {
pyproject = true; pyproject = true;
build-system = [ python3Packages.setuptools ]; build-system = [ setuptools ];
dependencies = [ dependencies = [
ffmpeg ffmpeg
gallery-dl gallery-dl
# (callPackage ../pkgs_pr/webcomix.nix { }) pyyaml
] types-pyyaml
++ builtins.attrValues { yt-dlp
inherit (python3Packages) webcomix
pyyaml ];
types-pyyaml
yt-dlp
;
};
} }

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

@@ -1,23 +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;
build-system = [ setuptools ];
dependencies = [ dependencies = [
sqlite sqlite
] beautifulsoup4
++ builtins.attrValues { requests
inherit (python3Packages) matplotlib
beautifulsoup4 ];
requests
matplotlib
;
};
} }

View File

@@ -39,8 +39,16 @@ buildPythonApplication rec {
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
]; ];