diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..38a0925 --- /dev/null +++ b/default.nix @@ -0,0 +1,12 @@ +{ pkgs ? import {} }: + +with pkgs.python3Packages; +buildPythonPackage rec { + name = "hb-downloader"; + src = ./.; + propagatedBuildInputs = [ requests pkgs.aria2 ]; + meta.mainProgram = "hb-downloader"; + postInstall = '' + mv -v $out/bin/hb-downloader.py $out/bin/hb-downloader + ''; +} diff --git a/flake.nix b/flake.nix index d19f1fe..80b5453 100644 --- a/flake.nix +++ b/flake.nix @@ -11,5 +11,6 @@ in { devShells.x86_64-linux.default = ( import ./shell.nix { inherit pkgs; }); + packages.x86_64-linux.default = ( import ./default.nix { inherit pkgs; }); }; } diff --git a/hb-downloader b/hb-downloader.py similarity index 100% rename from hb-downloader rename to hb-downloader.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f229360 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..52f3b22 --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from setuptools import setup + +with open('requirements.txt') as f: + install_requires = f.read().splitlines() + +setup( + name = 'hb-downloader', + version = '0.1', + install_requires=install_requires, + scripts=['hb-downloader.py',], +)