diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index c76b2ba..262e7a2 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -25,6 +25,7 @@ jobs: cache: ${{ secrets.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - run: nix build '.#anonymous-overflow' + - run: nix build '.#bulk-downloader-for-reddit' - run: nix build '.#fennel-ls' - run: nix build '.#headscale-ui' - run: nix build '.#lexical' @@ -34,7 +35,6 @@ jobs: - run: nix build '.#rimgo' - run: nix build '.#rexit' - run: nix build '.#vuetorrent' - - run: nix build '.#bdfr-browser' build-arm64-linux: runs-on: ubuntu-latest-arm64 diff --git a/flake.nix b/flake.nix index dc54b31..449a78c 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,7 @@ in { anonymous-overflow = import ./packages/anonymous-overflow.nix { inherit pkgs lib; }; + bulk-downloader-for-reddit = import ./packages/bulk-downloader-for-reddit.nix { inherit pkgs lib; }; fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; }; headscale-ui = import ./packages/headscale-ui.nix { inherit pkgs lib; }; lexical = import ./packages/lexical.nix { inherit pkgs lib; }; @@ -46,7 +47,6 @@ rimgo = import ./packages/rimgo.nix { inherit pkgs lib; }; vuetorrent = import ./packages/vuetorrent.nix { inherit pkgs lib; }; - bdfr-browser = import ./packages/bdfr-browser.nix { inherit pkgs lib; }; weewx-proxy = import ./packages/weewx-proxy.nix { inherit pkgs lib; }; } // darwinPackages; diff --git a/packages/bdfr-browser.nix b/packages/bdfr-browser.nix deleted file mode 100644 index 324e9af..0000000 --- a/packages/bdfr-browser.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ pkgs, lib, ... }: - -let - erlang = pkgs.beam.interpreters.erlangR26; - beamPackagesPrev = pkgs.beam.packagesWith erlang; - elixir = beamPackagesPrev.elixir_1_15; - - beamPackages = beamPackagesPrev // rec { - inherit erlang elixir; - hex = beamPackagesPrev.hex.override { inherit elixir; }; - buildMix = beamPackagesPrev.buildMix.override { inherit elixir erlang hex; }; - mixRelease = beamPackagesPrev.mixRelease.override { inherit erlang elixir; }; - }; -in -beamPackages.mixRelease rec { - pname = "bdfr-browser"; - version = "0.0.1"; - - src = pkgs.fetchFromGitea { - domain = "git.kempkens.io"; - owner = "daniel"; - repo = pname; - rev = "7359b6f84910d2742fef0f8ce45fdd6e3cd39594"; - hash = "sha256-scR7DWDpUdtt74IHLuJzaRbwAtdqscVEVBfOiGRuxZY="; - }; - - mixNixDeps = import "${src}/mix.nix" { inherit lib beamPackages; }; - - meta = with lib; { - description = "Bulk Downloader for Reddit Web UI"; - homepage = "https://git.kempkens.io/daniel/bdfr-browser"; - license = [ licenses.isc ]; - platforms = [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "x86_64-linux" ]; - }; -} diff --git a/packages/bulk-downloader-for-reddit.nix b/packages/bulk-downloader-for-reddit.nix new file mode 100644 index 0000000..7fac9c3 --- /dev/null +++ b/packages/bulk-downloader-for-reddit.nix @@ -0,0 +1,31 @@ +{ pkgs, lib }: + +pkgs.python3.pkgs.buildPythonApplication rec { + pname = "bulk-downloader-for-reddit"; + version = "2023-10-02"; + pyproject = true; + + src = pkgs.fetchFromGitHub { + owner = "aliparlakci"; + repo = pname; + rev = "8e6103952c4be3ccadfe29d3a0cae7a4d0b2c426"; + hash = "sha256-kxCDtOywDSMxI+h8Ad2eziAGcZLbZHJFpDD/87BIbZY="; + }; + + nativeBuildInputs = with pkgs.python3.pkgs; [ + setuptools + wheel + ]; + + propagatedBuildInputs = with pkgs.python3.pkgs; [ + appdirs + beautifulsoup4 + cachetools + click + dict2xml + praw + pyyaml + requests + yt-dlp + ]; +}