-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
lib, | ||
fetchFromGitHub, | ||
substituteAll, | ||
python3Packages, | ||
testers, | ||
ansible-cmdb, | ||
}: | ||
let | ||
inherit (python3Packages) | ||
setuptools | ||
mako | ||
pyyaml | ||
jsonxs | ||
buildPythonApplication | ||
; | ||
|
||
pname = "ansible-cmdb"; | ||
version = "1.31"; | ||
in | ||
buildPythonApplication { | ||
inherit pname version; | ||
|
||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "fboender"; | ||
repo = "ansible-cmdb"; | ||
rev = version; | ||
hash = "sha256-HOFLX8fiid+xJOVYNyVbz5FunrhteAUPlvS3ctclVHo="; | ||
}; | ||
|
||
patches = [ | ||
(substituteAll { | ||
src = ./setup.patch; | ||
inherit version; | ||
}) | ||
]; | ||
|
||
build-system = [ setuptools ]; | ||
|
||
dependencies = [ | ||
mako | ||
pyyaml | ||
jsonxs | ||
]; | ||
|
||
passthru.tests.version = testers.testVersion { | ||
package = ansible-cmdb; | ||
version = "v${version}"; | ||
}; | ||
|
||
meta = { | ||
description = "Generate host overview from ansible fact gathering output"; | ||
homepage = "https://github.com/fboender/ansible-cmdb"; | ||
license = lib.licenses.gpl3Only; | ||
maintainers = [ lib.maintainers.tie ]; | ||
mainProgram = "ansible-cmdb"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/src/ansible-cmdb.py b/bin/ansible-cmdb | ||
similarity index 100% | ||
rename from src/ansible-cmdb.py | ||
rename to bin/ansible-cmdb | ||
diff --git a/setup.py b/setup.py | ||
index a8db25d..c1670f1 100755 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -42,17 +42,16 @@ setup( | ||
package_dir={'': 'src'}, | ||
packages=find_packages('src'), | ||
include_package_data=True, | ||
- data_files=\ | ||
- get_data_files( | ||
- 'src/ansiblecmdb/data', | ||
- strip='src', | ||
- prefix='lib' | ||
- ) + | ||
- [['lib/ansiblecmdb/', ['src/ansible-cmdb.py']]], | ||
+ data_files=get_data_files( | ||
+ 'src/ansiblecmdb/data', | ||
+ strip='src', | ||
+ prefix='lib', | ||
+ ), | ||
zip_safe=False, | ||
- install_requires=['mako', 'pyyaml', 'ushlex', 'jsonxs'], | ||
+ install_requires=['mako', 'pyyaml'], | ||
+ extras_require={'jsonxs_templates': ['jsonxs']}, | ||
scripts=[ | ||
- 'src/ansible-cmdb', | ||
+ 'bin/ansible-cmdb', | ||
], | ||
|
||
classifiers=[ | ||
diff --git a/src/ansiblecmdb/data/VERSION b/src/ansiblecmdb/data/VERSION | ||
index 79d94e6..14d2ff6 100644 | ||
--- a/src/ansiblecmdb/data/VERSION | ||
+++ b/src/ansiblecmdb/data/VERSION | ||
@@ -1 +1 @@ | ||
-MASTER | ||
+@version@ |