nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 wrapGAppsHook4,
7 gtk4-layer-shell,
8 hyprland,
9 gcc,
10 pixman,
11 libadwaita,
12}:
13
14rustPlatform.buildRustPackage (finalAttrs: {
15 pname = "hyprshell";
16 version = "4.9.2";
17
18 src = fetchFromGitHub {
19 owner = "H3rmt";
20 repo = "hyprshell";
21 tag = "v${finalAttrs.version}";
22 hash = "sha256-1nt+/cAtIsS/3O790W2aMUuPiMV6JEjC334Sw0SD804=";
23 };
24
25 cargoHash = "sha256-WnmK7eUjXqNUWXeaXqloYeRSp/uvg8QoYbcotm5uEt4=";
26
27 nativeBuildInputs = [
28 wrapGAppsHook4
29 pkg-config
30 ];
31
32 buildInputs = [
33 libadwaita
34 gtk4-layer-shell
35 ];
36
37 preFixup = ''
38 gappsWrapperArgs+=(
39 --prefix PATH : '${lib.makeBinPath [ gcc ]}'
40 --prefix CPATH : '${
41 lib.makeIncludePath (
42 hyprland.buildInputs
43 ++ [
44 hyprland
45 pixman
46 ]
47 )
48 }'
49 )
50 '';
51
52 meta = {
53 description = "Modern GTK4-based window switcher and application launcher for Hyprland";
54 mainProgram = "hyprshell";
55 homepage = "https://github.com/H3rmt/hyprshell";
56 license = lib.licenses.mit;
57 platforms = hyprland.meta.platforms;
58 maintainers = with lib.maintainers; [ arminius-smh ];
59 };
60})