tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
lact: init at 0.4.3
https://github.com/ilya-zlobintsev/LACT
figsoda
2 years ago
543cfd9f
3079a556
+92
3 changed files
expand all
collapse all
unified
split
pkgs
tools
system
lact
default.nix
pci-ids.patch
top-level
all-packages.nix
+80
pkgs/tools/system/lact/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, rustPlatform
3
+
, fetchFromGitHub
4
+
, pkg-config
5
+
, wrapGAppsHook
6
+
, gdk-pixbuf
7
+
, gtk4
8
+
, libdrm
9
+
, vulkan-loader
10
+
, coreutils
11
+
, hwdata
12
+
}:
13
+
14
+
rustPlatform.buildRustPackage rec {
15
+
pname = "lact";
16
+
version = "0.4.3";
17
+
18
+
src = fetchFromGitHub {
19
+
owner = "ilya-zlobintsev";
20
+
repo = "LACT";
21
+
rev = "v${version}";
22
+
hash = "sha256-zSQqR5AxdqcSwgapSwXYn/36F6SQna8+RS6UTQJySrg=";
23
+
};
24
+
25
+
cargoHash = "sha256-DDBYfafLg2fH+HsC5VZzVyRCyVSwcMydUGBe7NQRwEk=";
26
+
27
+
nativeBuildInputs = [
28
+
pkg-config
29
+
wrapGAppsHook
30
+
];
31
+
32
+
buildInputs = [
33
+
gdk-pixbuf
34
+
gtk4
35
+
libdrm
36
+
vulkan-loader
37
+
];
38
+
39
+
checkFlags = [
40
+
# tries and fails to initialize gtk
41
+
"--skip=app::root_stack::thermals_page::fan_curve_frame::tests::set_get_curve"
42
+
];
43
+
44
+
postPatch = ''
45
+
substituteInPlace lact-daemon/src/server/system.rs \
46
+
--replace 'Command::new("uname")' 'Command::new("${coreutils}/bin/uname")'
47
+
48
+
substituteInPlace res/lactd.service \
49
+
--replace ExecStart={lact,$out/bin/lact}
50
+
51
+
substituteInPlace res/io.github.lact-linux.desktop \
52
+
--replace Exec={lact,$out/bin/lact}
53
+
54
+
pushd $cargoDepsCopy/pciid-parser
55
+
oldHash=$(sha256sum src/lib.rs | cut -d " " -f 1)
56
+
sed 's|@hwdata@|${hwdata}|g' < ${./pci-ids.patch} | patch -p1
57
+
substituteInPlace .cargo-checksum.json \
58
+
--replace $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1)
59
+
popd
60
+
'';
61
+
62
+
postInstall = ''
63
+
install -Dm444 res/lactd.service -t $out/lib/systemd/system
64
+
install -Dm444 res/io.github.lact-linux.desktop -t $out/share/applications
65
+
install -Dm444 res/io.github.lact-linux.png -t $out/share/pixmaps
66
+
'';
67
+
68
+
postFixup = ''
69
+
patchelf $out/bin/.lact-wrapped \
70
+
--add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
71
+
'';
72
+
73
+
meta = with lib; {
74
+
description = "Linux AMDGPU Controller";
75
+
homepage = "https://github.com/ilya-zlobintsev/LACT";
76
+
license = licenses.mit;
77
+
maintainers = with maintainers; [ figsoda ];
78
+
platforms = platforms.linux;
79
+
};
80
+
}
+10
pkgs/tools/system/lact/pci-ids.patch
···
0
0
0
0
0
0
0
0
0
0
···
1
+
--- a/src/lib.rs
2
+
+++ b/src/lib.rs
3
+
@@ -18,7 +18,7 @@ use std::{
4
+
};
5
+
use tracing::trace;
6
+
7
+
-const DB_PATHS: &[&str] = &["/usr/share/hwdata/pci.ids", "/usr/share/misc/pci.ids"];
8
+
+const DB_PATHS: &[&str] = &["@hwdata@/share/hwdata/pci.ids"];
9
+
#[cfg(feature = "online")]
10
+
const URL: &str = "https://pci-ids.ucw.cz/v2.2/pci.ids";
+2
pkgs/top-level/all-packages.nix
···
9719
9720
leatherman = callPackage ../development/libraries/leatherman { };
9721
0
0
9722
ledit = callPackage ../tools/misc/ledit {
9723
inherit (ocaml-ng.ocamlPackages_4_12) ocaml camlp5;
9724
};
···
9719
9720
leatherman = callPackage ../development/libraries/leatherman { };
9721
9722
+
lact = callPackage ../tools/system/lact { };
9723
+
9724
ledit = callPackage ../tools/misc/ledit {
9725
inherit (ocaml-ng.ocamlPackages_4_12) ocaml camlp5;
9726
};