blob: e8cb998b52c7774e0aba2347e2265a3ec1b16ef6 (
plain) (
blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{ lib
, buildPythonApplication
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, sphinx
, pluggy
, prettytable
, typeguard
, typing-extensions
, nixosTests
}:
buildPythonApplication rec {
pname = "nixops";
version = "unstable-2023-12-17";
pyproject = true;
src = fetchFromGitHub {
owner = "NixOS";
repo = "nixops";
rev = "053668e849bb369973cf265b7e8f38e66ef70138";
hash = "sha256-Kus1Ls1tT8fVGLX0NakRXmjuz5/J/tfqU4TLOkiZqvo=";
};
postPatch = ''
substituteInPlace nixops/args.py --replace "@version@" "${version}-pre-${lib.substring 0 7 src.rev or "dirty"}"
'';
nativeBuildInputs = [
poetry-core
sphinx
];
propagatedBuildInputs = [
pluggy
prettytable
typeguard
typing-extensions
];
postInstall = ''
doc_cache=$(mktemp -d)
sphinx-build -b man -d $doc_cache doc/ $out/share/man/man1
html=$(mktemp -d)
sphinx-build -b html -d $doc_cache doc/ $out/share/nixops/doc
'';
pythonImportsCheck = [ "nixops" ];
passthru = {
tests.nixops = nixosTests.nixops.unstable;
updateScript = unstableGitUpdater {};
};
meta = with lib; {
description = "A tool for deploying to NixOS machines in a network or cloud";
homepage = "https://github.com/NixOS/nixops";
license = licenses.lgpl3Only;
maintainers = with lib.maintainers; [ aminechikhaoui roberth ];
platforms = lib.platforms.unix;
mainProgram = "nixops";
};
}
|