-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathflake.nix
More file actions
90 lines (76 loc) · 2.39 KB
/
flake.nix
File metadata and controls
90 lines (76 loc) · 2.39 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
description = "A very basic flake for wkeys, by Yadobler";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
flake.overlays = rec {
default = wkeys;
wkeys = final: _: {
inherit (inputs.self.packages.${final.stdenv.hostPlatform.system}) wkeys;
};
};
perSystem =
{
pkgs,
...
}:
{
packages = rec {
default = wkeys;
wkeys = pkgs.callPackage (
{
lib,
rustPlatform,
pkg-config,
libcosmicAppHook,
gtk4-layer-shell,
gtkmm4,
libxkbcommon,
}:
let
cargoToml = lib.importTOML ./wkeys/Cargo.toml;
in
rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
inherit (cargoToml.package) version;
src = ./.;
# Update on change to Cargo.lock
cargoHash = "sha256-deAiMKHkPKDWM57IL1xOvcqEzm0cLC6SktbKCDXZPZE=";
nativeBuildInputs = [
pkg-config
libcosmicAppHook
];
buildInputs = [
gtk4-layer-shell
gtkmm4
libxkbcommon
];
preInstall = ''
mkdir -p $out/share/{applications,cosmic/net.pithos.applet.wkeys}
install -m644 $src/cosmic-applet/assets/wkeys-applet.desktop \
$out/share/applications/net.pithos.applet.wkeys.desktop
'';
meta = {
homepage = "https://github.com/ptazithos/wkeys";
description = "On-screen keyboard for the COSMIC Desktop Environment";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nanoyaki ];
platforms = lib.platforms.linux;
mainProgram = "wkeys";
};
}
) { };
};
};
};
}