Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,18 @@ jobs:
run: |
FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox -mount-sandbox -usersandbox -userpriv" \
ebuild /var/db/repos/localrepo/app-misc/lsu/lsu-9999.ebuild fetch unpack compile test

nix:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Build Nix package
run: |
docker run --rm \
-v "${{ github.workspace }}":/repo \
-w /repo \
nixpkgs/nix-flakes \
sh -c 'git config --global --add safe.directory /repo && nix build .#'
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
[![Codecov](https://codecov.io/gh/l5yth/lsu/graph/badge.svg)](https://codecov.io/gh/l5yth/lsu)
[![GitHub Release](https://img.shields.io/github/v/release/l5yth/lsu)](https://github.com/l5yth/lsu/releases)
[![Crates.io](https://img.shields.io/crates/v/lsu.svg)](https://crates.io/crates/lsu)
[![AUR Version](https://img.shields.io/aur/version/lsu-bin)](https://aur.archlinux.org/packages/lsu-bin)
[![AUR Version](https://img.shields.io/aur/version/lsu-bin?logo=archlinux)](https://aur.archlinux.org/packages/lsu-bin)
[![Nix Flake](https://img.shields.io/badge/nix-flake-5277C3?logo=nixos)](https://github.com/l5yth/lsu/blob/main/flake.nix)
[![Gentoo](https://img.shields.io/badge/gentoo-ebuild-54487A?logo=gentoo)](https://github.com/l5yth/lsu/tree/main/packaging/gentoo)
[![Top Language](https://img.shields.io/github/languages/top/l5yth/lsu)](https://github.com/l5yth/lsu)
[![License: Apache-2.0](https://img.shields.io/github/license/l5yth/lsu)](https://github.com/l5yth/lsu/blob/main/LICENSE)

Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2026 l5yth
# SPDX-License-Identifier: Apache-2.0
{
description = "Terminal UI for systemd services and their journal";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"armv6l-linux"
"armv7l-linux"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems f;
in {
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.callPackage ./packaging/nix/default.nix { };
});

devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
packages = [ pkgs.cargo pkgs.rustfmt pkgs.clippy ];
};
});
};
}
26 changes: 26 additions & 0 deletions packaging/nix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2026 l5yth
# SPDX-License-Identifier: Apache-2.0
#
# Standalone derivation for lsu.
# Can be called directly from a flake or from nixpkgs:
# pkgs.callPackage ./packaging/nix/default.nix { }
{ lib, rustPlatform }:

rustPlatform.buildRustPackage {
pname = "lsu";
version = (lib.importTOML ../../Cargo.toml).package.version;

src = lib.cleanSource ../..;

cargoLock.lockFile = ../../Cargo.lock;

meta = {
description = "Terminal UI for systemd services and their journal";
homepage = "https://github.com/l5yth/lsu";
license = lib.licenses.asl20;
maintainers = [ ];
# lsu shells out to systemctl/journalctl; systemd is Linux-only.
platforms = lib.platforms.linux;
mainProgram = "lsu";
};
}