Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (48 loc) · 2 KB
/
Copy pathflake.nix
File metadata and controls
57 lines (48 loc) · 2 KB
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
{
description = "A Linux Task Manager alternative built with Qt6, inspired by the Windows Task Manager but designed to go further - providing deep visibility into system processes, performance metrics, users, and services.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
formatter = pkgs.nixfmt-rfc-style;
packages.default = pkgs.stdenv.mkDerivation {
pname = "tux-manager";
version = "1.1.0";
src = ./.;
nativeBuildInputs = with pkgs.kdePackages; [ qmake qttools wrapQtAppsHook ];
buildInputs = with pkgs.kdePackages; [ qtbase ];
# qmake's qtPrepareTool() hardcodes tool lookups to qtbase's own store
# path at mkspecs-generation time, but nixpkgs ships lrelease in
# kdePackages.qttools instead. Point it at the real binary explicitly.
configurePhase = ''
qmake6 $src/src "QT_TOOL.lrelease.binary=${pkgs.kdePackages.qttools}/bin/lrelease"
'';
buildPhase = "make -j$NIX_BUILD_CORES";
installPhase = ''
mkdir -p $out/bin
cp tux-manager $out/bin/tux-manager
mkdir -p $out/share/icons/hicolor/scalable/apps/
cp ./src/tux_manager_icon.svg $out/share/icons/hicolor/scalable/apps/tux_manager_icon.svg
mkdir -p $out/share/applications
cp ./packaging/data/io.github.benapetr.TuxManager.desktop $out/share/applications/io.github.benapetr.TuxManager.desktop
'';
postFixup = ''
# fixes issue where nvml isn't found
wrapProgram $out/bin/tux-manager --prefix LD_LIBRARY_PATH = /run/opengl-driver/lib
'';
};
}
);
}