Skip to content

Commit 7a7e76e

Browse files
authored
Merge pull request #12 from stackabletech/feat/nixify
Add nix build configs
2 parents 542116f + fad6b34 commit 7a7e76e

File tree

5 files changed

+80
-12
lines changed

5 files changed

+80
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.env
22
build
33
dist
4+
result
45
src/beku_stackabletech.egg-info
56
examples/suites/tests/_work

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## Added
8+
9+
- Nix build files ([#12])
10+
11+
[#12]: https://github.com/stackabletech/beku.py/pull/12
12+
713
## [0.0.9] - 2023-08-23
814

915
### Added

README.md

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,59 @@ Version: 0.0.9
66

77
We recommend to use [pipx](https://pypa.github.io/pipx/):
88

9-
pipx install beku-stackabletech
9+
```sh
10+
pipx install beku-stackabletech
11+
```
1012

1113
But you can also use `pip`:
1214

13-
# from PyPI
14-
pip install beku-stackabletech
15-
# from GitHub
16-
pip install git+https://github.com/stackabletech/beku.py.git@master
15+
```sh
16+
# from PyPI
17+
pip install beku-stackabletech
18+
# from GitHub
19+
pip install git+https://github.com/stackabletech/beku.py.git@master
20+
```
21+
22+
Or via NixOS and Nix Shell:
23+
24+
```nix
25+
{ lib, pkgs, ... }:
26+
with lib;
27+
let
28+
beku = pkgs.callPackage(pkgs.fetchFromGitHub {
29+
owner = "stackabletech";
30+
repo = "beku.py";
31+
rev = "145e8210f5786b8128e3af43f60b61f065cc2c39";
32+
hash = "sha256-hLaIY4BE+VIMeKmS3JLOZy87OC2VuQtbX/NCIbQr2p4="; # use lib.fakeHash to find new hashes when upgrading
33+
} + "/beku.nix") {};
34+
in
35+
{
36+
packages = with pkgs; [
37+
beku
38+
# ...
39+
];
40+
41+
// ...
42+
}
43+
```
1744

1845
## Usage
1946

20-
cd <stackable operator directory>
21-
rm -rf tests/_work && beku
22-
cd tests/_work && kubectl kuttl test
47+
```sh
48+
cd <stackable operator directory>
49+
rm -rf tests/_work && beku
50+
cd tests/_work && kubectl kuttl test
51+
```
2352

2453
Also see the `examples` folder.
2554

2655
## Description
2756

2857
Fast Kuttl tests expander for Stackable integration tests.
2958

30-
beku -i tests/test-definition.yaml -t tests/templates/kuttl -k tests/kuttl-test.yaml.jinja2 -o tests/_work
59+
```sh
60+
beku -i tests/test-definition.yaml -t tests/templates/kuttl -k tests/kuttl-test.yaml.jinja2 -o tests/_work
61+
```
3162

3263
## Release a new version
3364

@@ -41,6 +72,8 @@ Update the CHANGELOG.
4172
Commit and tag.
4273
Build and publish:
4374

44-
rm -rf dist/
45-
python -m build --wheel .
46-
twine upload dist/*
75+
```sh
76+
rm -rf dist/
77+
python -m build --wheel .
78+
twine upload dist/*
79+
```

beku.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{ python3 }:
2+
3+
python3.pkgs.buildPythonApplication {
4+
pname = "beku-stackabletech";
5+
version = "0.0.9";
6+
7+
format = "pyproject";
8+
9+
src = builtins.path {
10+
path = ./.;
11+
name = "beku-stackabletech";
12+
};
13+
14+
nativeBuildInputs = [
15+
python3.pkgs.setuptools
16+
];
17+
18+
propagatedBuildInputs = [
19+
python3.pkgs.jinja2
20+
python3.pkgs.pyyaml
21+
];
22+
}
23+

default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
{
4+
beku = pkgs.callPackage ./beku.nix {};
5+
}

0 commit comments

Comments
 (0)