Add default.nix, allow for nix run
.
This commit is contained in:
parent
3e3687b700
commit
06dcf34160
5 changed files with 25 additions and 0 deletions
12
default.nix
Normal file
12
default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
|
@ -11,5 +11,6 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.x86_64-linux.default = ( import ./shell.nix { inherit pkgs; });
|
devShells.x86_64-linux.default = ( import ./shell.nix { inherit pkgs; });
|
||||||
|
packages.x86_64-linux.default = ( import ./default.nix { inherit pkgs; });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
requests
|
11
setup.py
Normal file
11
setup.py
Normal file
|
@ -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',],
|
||||||
|
)
|
Loading…
Add table
Add a link
Reference in a new issue