Skip to content

Commit 5191c60

Browse files
authored
v0.4.0 (#38)
This release mainly focuses on improving the packaging side. `isd` now provides a desktop file and uses a standard size for the icon (fixes #29). This release will also be available on PyPI. The main reason for publishing to PyPI is to better support packaging for distros as mentioned in #18. Due to a naming clash on PyPI, the Python project has been renamed to `isd-tui`. However, the project will continue to be named `isd` and the executable will continue to be called `isd`! The Python wheel only includes the necessary files, including the `.desktop` file and icon. The `nix` derivation propagates the `.desktop` file and the icon and makes them available for Desktops of `nix` users. Due to a bug in `isd-appimage`, identical `nixpkgs` pins cannot be used for `isd` (#37 is blocked). This release also introduces _EXPERIMENTAL_ arm support! I do _not_ have access to an arm-based machine, and as such, I cannot actually test the arm-based `AppImage`. The `AppImage` was created by cross-compiling. However, I cannot run a cross-platform `AppImage` (should fix #36). Please let me know if it works for you or not 🙏 At least the arm-based `nix` derivation can be run with QEMU, and it seems to work. PS: This release also includes a workaround for a `Zellij` bug (fixes #34). Though upstream already has a bug-fix available until a new version has been published, `isd` will work around the Zellij issue.
1 parent 369fd55 commit 5191c60

File tree

17 files changed

+310
-344
lines changed

17 files changed

+310
-344
lines changed

.github/workflows/nix.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-latest
9+
# runs-on: [ubuntu-latest, ubuntu-24.04-arm]
10+
# wait times for `-arm` are insane. Let's see how
11+
# good cross-compilation works with nix
12+
runs-on: [ubuntu-latest]
1013
permissions:
1114
contents: write # write required for action-gh-release
1215
id-token: write
@@ -17,19 +20,17 @@ jobs:
1720
uses: actions/checkout@v4
1821
- name: Run `nix fmt`
1922
run: nix fmt -- --check *
20-
- name: Run `flake checks`
23+
- name: Build all packages supported by the current architecture
2124
run: nix flake check -L
22-
- name: Create AppImage
23-
run: nix build .#isd-AppImage
2425
# Leads to:
2526
# `cannot write uid_map: Operation not permitted`
2627
# - name: Test appimage
2728
# run: ./result --help
28-
- name: Rename AppImage
29-
if: startsWith(github.ref, 'refs/tags/')
30-
run: cp ./result isd.AppImage
31-
- name: Release AppImage
32-
uses: softprops/action-gh-release@v2
33-
if: startsWith(github.ref, 'refs/tags/')
34-
with:
35-
files: isd.AppImage
29+
# - name: Rename AppImage
30+
# if: startsWith(github.ref, 'refs/tags/')
31+
# run: cp ./result isd.${{ runner.arch }}.AppImage
32+
# - name: Release AppImage
33+
# uses: softprops/action-gh-release@v2
34+
# if: startsWith(github.ref, 'refs/tags/')
35+
# with:
36+
# files: isd.${{ runner.arch}}.AppImage

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ schema.json
33
config.yaml
44
drafts/
55
result
6+
__pycache__
7+
squashfs-root/
8+
/_version.py
69
# config should be automatically generated when running vhs!
710
docs/config/*
811
# same for .cast/gif files!

.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!drafts/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# isd – *i*nteractive *s*ystem*d*
22

33
<center>
4-
<img src="./assets/isd.png" alt="isd logo" style="max-width: 50vh;">
4+
<img src="./share/icons/hicolor/512x512/isd.png" alt="isd logo" style="max-width: 50vh;">
55
</center>
66

77
<!-- --8<-- [start:tagline] -->

assets/isd.png

-177 KB
Binary file not shown.

docs/index.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ If you are interested, read on and take a look at the [recorded terminal session
4747
To install [uv] have a look at the [official uv installation documentation](https://docs.astral.sh/uv/).
4848

4949
After installing [uv], you can _try_ `isd` by running:
50-
`uvx --python=3.12 --from git+{{config['repo_url']}} isd`
50+
`uvx --python=3.12 isd-tui`
5151

5252
To install and manage `isd` via [uv], run:
53-
`uv tool install --python=3.12 git+{{config['repo_url']}}`
53+
`uv tool install --python=3.12 isd-tui`
54+
55+
After installing the tool, the program `isd` and its alias[^alias] `isd-tui`
56+
will be available.
5457

5558
`isd` requires `--python` to be set `>=3.12` and would fail
5659
if the default Python version is older.
@@ -308,3 +311,7 @@ Checkout the other sections as well:
308311
- [FAQ](./faq.md)
309312
- [Security](./security.md)
310313

314+
[^alias]: The reason why the `isd-tui` alias exists is due to a naming conflict
315+
on PyPI with a different package called `isd`. Providing the alias `isd-tui`
316+
allows `uv` users to try it without having to write `uvx --from isd-tui isd`.
317+

flake.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
description = "interactive systemd flake";
33

44
inputs = {
5+
# 24.11 does _not_ contain asciinema_3
6+
# nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
57
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
68

79
pyproject-nix = {
@@ -22,7 +24,8 @@
2224
inputs.nixpkgs.follows = "nixpkgs";
2325
};
2426

25-
systems.url = "github:nix-systems/x86_64-linux";
27+
# Supports linux x86_64 and aarch64.
28+
systems.url = "github:nix-systems/default-linux";
2629
nix-filter.url = "github:numtide/nix-filter";
2730
# pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
2831
systemd-nix = {
@@ -31,6 +34,9 @@
3134
};
3235
nix-appimage = {
3336
url = "github:ralismark/nix-appimage";
37+
# nix-appimage cannot track nixos-unstable until this issue is resolved:
38+
# - <https://github.com/ralismark/nix-appimage/issues/23>
39+
# inputs.nixpkgs.follows = "nixpkgs";
3440
};
3541
};
3642

@@ -143,23 +149,26 @@
143149
let
144150
# Package the virtual environment
145151
# Enable no optional dependencies for production build.
146-
venv = pythonSet.mkVirtualEnv "isd-env" workspace.deps.default;
152+
venv = pythonSet.mkVirtualEnv "isd-tui-env" workspace.deps.default;
147153
in
148154
pkgs.stdenvNoCC.mkDerivation {
149155
pname = "isd";
150156
inherit version;
151157
src = venv;
152158
meta = {
153159
mainProgram = "isd";
154-
license = pkgs.lib.getLicenseFromSpdxId "GPL-3.0";
160+
license = pkgs.lib.getLicenseFromSpdxId "GPL-3.0-or-later";
155161
};
156162
buildPhase = ''
157163
mkdir -p $out/bin
158164
ln -s $src/bin/isd $out/bin/
165+
ln -s $src/share $out/
159166
'';
160167
};
161168
isd = default;
162-
isd-AppImage = inputs.nix-appimage.lib.${system}.mkAppImage {
169+
isd-tui = isd;
170+
"isd-AppImage" = inputs.nix-appimage.lib.${system}.mkAppImage {
171+
pname = "isd.${system}";
163172
program = pkgs.lib.getExe (
164173
isd.overrideAttrs (oldAttrs: {
165174
buildInputs = oldAttrs.buildInputs or [ ] ++ [ pkgs.makeBinaryWrapper ];
@@ -279,7 +288,7 @@
279288
# Build virtual environment, with local packages being editable.
280289
#
281290
# Enable all optional dependencies for development.
282-
virtualenv = editablePythonSet.mkVirtualEnv "hello-world-dev-env" workspace.deps.all;
291+
virtualenv = editablePythonSet.mkVirtualEnv "isd-tui-env" workspace.deps.all;
283292
in
284293
pkgs.mkShell {
285294
packages = [

pyproject.toml

Lines changed: 105 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
[project]
2-
name = "isd"
3-
version = "0.3.0"
4-
description = "Interactive systemd TUI"
5-
readme = "README.md"
2+
name = "isd-tui"
63
requires-python = ">=3.12"
7-
license = "GPL-3.0"
4+
license = "GPL-3.0-or-later"
5+
license-files = ["LICENSE"]
6+
readme = "README.md"
7+
description = "Interactive systemd TUI"
8+
keywords = ["systemd", "tui", "service-manager"]
9+
classifiers = [
10+
"Environment :: Console",
11+
"Intended Audience :: End Users/Desktop",
12+
"Intended Audience :: System Administrators",
13+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
14+
"Operating System :: Unix",
15+
"Programming Language :: Python",
16+
"Topic :: System :: Monitoring",
17+
"Topic :: System :: Systems Administration",
18+
"Topic :: Terminals",
19+
"Topic :: Utilities",
20+
]
21+
822
dependencies = [
923
"xdg-base-dirs>=6.0.0",
1024
"pfzy>=0.3.4",
@@ -13,14 +27,26 @@ dependencies = [
1327
"pydantic>=2.10.4",
1428
"types-pyyaml>=6.0.12.20241221",
1529
]
30+
version = "0.4.0"
31+
32+
# # versioningit was great in theory
33+
# # but it comes with too many issues for packaging
34+
# # in other distros. :/
35+
# # https://github.com/jwodder/versioningit
36+
# dynamic = ["version"]
37+
# [tool.hatch.version]
38+
# source = "versioningit"
39+
# [tool.versioningit]
1640

1741
[dependency-groups]
1842
dev = [
19-
"pylsp-mypy>=0.6.9",
20-
"pylsp-rope>=0.1.17",
21-
"python-lsp-isort>=0.2.0",
22-
"python-lsp-ruff>=2.2.2",
23-
"python-lsp-server>=1.12.0",
43+
"bump-my-version>=0.30.1",
44+
# Remove LSP deps
45+
# "pylsp-mypy>=0.6.9",
46+
# "pylsp-rope>=0.1.17",
47+
# "python-lsp-isort>=0.2.0",
48+
# "python-lsp-ruff>=2.2.2",
49+
# "python-lsp-server>=1.12.0",
2450
"textual-dev>=1.7.0",
2551
]
2652
docs = [
@@ -31,8 +57,75 @@ docs = [
3157
]
3258

3359
[build-system]
34-
requires = ["hatchling"]
60+
requires = ["hatchling", "editables"]
3561
build-backend = "hatchling.build"
3662

3763
[project.scripts]
38-
isd = "isd.isd:main"
64+
isd = "isd_tui.isd:main"
65+
# only for compatibility when running
66+
# `uvx isd-tui`
67+
isd-tui = "isd_tui.isd:main"
68+
69+
[project.urls]
70+
Hompage = "https://github.com/isd-project/isd"
71+
Documentation = "https://isd-project.github.io/isd/"
72+
Repository = "https://github.com/isd-project/isd"
73+
"Bug Tracker" = "https://github.com/isd-project/isd/issues"
74+
75+
# build.hooks.<HOOK_NAME> is global
76+
# and applied to _all_ build targets
77+
# [tool.hatch.build.hooks.custom]
78+
79+
[tool.hatch.build]
80+
exclude = [
81+
"docs/",
82+
"docs_glossary/",
83+
"flake.nix",
84+
"flake.lock",
85+
"mkdocs.yml",
86+
"macros.py",
87+
"*.tape",
88+
"src/isd/*.md"
89+
]
90+
91+
[tool.hatch.build.targets.wheel.shared-data]
92+
"share/" = "share/"
93+
94+
[tool.bumpversion]
95+
current_version = "0.4.0"
96+
parse = """
97+
(?P<major>0|[1-9]\\d*)\\.
98+
(?P<minor>0|[1-9]\\d*)\\.
99+
(?P<patch>0|[1-9]\\d*)
100+
(?:
101+
- # dash separator for pre-release section
102+
(?P<pre_l>[a-zA-Z-]+) # pre-release label
103+
(?:0|[1-9]\\d*) # pre-release version number
104+
)? # pre-release section is optional
105+
"""
106+
serialize = [
107+
"{major}.{minor}.{patch}-{pre_l}{distance_to_latest_tag}",
108+
"{major}.{minor}.{patch}",
109+
]
110+
search = """version = "{current_version}""""
111+
replace = """version = "{new_version}""""
112+
regex = false
113+
ignore_missing_version = false
114+
ignore_missing_files = false
115+
# do not tag with bump, as I want to tag a merged PR on main
116+
# and not the PR commit that will probably be squashed.
117+
tag = false
118+
sign_tags = false
119+
tag_name = "v{new_version}"
120+
tag_message = "Bump version: {current_version} → {new_version}"
121+
allow_dirty = false
122+
commit = false
123+
message = "Bump version: {current_version} → {new_version}"
124+
moveable_tags = []
125+
commit_args = ""
126+
setup_hooks = []
127+
pre_commit_hooks = []
128+
post_commit_hooks = []
129+
130+
[[tool.bumpversion.files]]
131+
filename = "pyproject.toml"

share/applications/isd.desktop

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=isd
4+
GenericName=interactive systemd
5+
Comment=A better way to work with systemd units
6+
Icon=isd
7+
Exec=isd
8+
Terminal=true
9+
Categories=System;Monitor;ConsoleOnly;
10+
Keywords=systemd;tui;service-manager

0 commit comments

Comments
 (0)