generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
47 lines (43 loc) · 1.11 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, fetchFromGitHub
, buildPythonApplication
, requests
, tqdm
, img2pdf
}:
buildPythonApplication rec {
pname = "archive-org-downloader";
version = "2023.01.16";
propagatedBuildInputs = [
requests
tqdm
img2pdf
];
src = fetchFromGitHub {
repo = "Archive.org-Downloader";
owner = "MiniGlome";
rev = "8575c86156eacb7fc1e3096ec164455232b23a0c";
sha256 = "sha256-/QM11tFvNYXTnl3oRRkZRRoSdiYnd5TZj51CpO/8qqk=";
};
setup-py = ''
from setuptools import setup, find_packages
setup(
name='archive-org-downloader',
version='${version}',
packages=find_packages(),
scripts=["archive-org-downloader.py"],
)
'';
postPatch = ''
echo ${lib.escapeShellArg setup-py} >setup.py
sed -i 's/\r//' archive-org-downloader.py
sed -i '1 i\#!/usr/bin/env python3\n' archive-org-downloader.py
chmod +x archive-org-downloader.py
'';
meta = with lib; {
description = "download books from archive.org";
homepage = "https://github.com/MiniGlome/Archive.org-Downloader";
#license = licenses.mit; # no license
platforms = platforms.all;
};
}