Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (53 loc) · 1.63 KB
/
Copy pathflake.nix
File metadata and controls
55 lines (53 loc) · 1.63 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
{
description = "A kitten-panel based desktop panel for your desktop";
inputs = {
self.submodules = true;
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
resvg = pkgs.rustPlatform.buildRustPackage {
pname = "pawbar-resvg";
version = "0.1.0";
src = ./native/resvg;
cargoLock.lockFile = ./native/resvg/Cargo.lock;
doCheck = false;
# the stock install hook only picks up binaries and shared libs
installPhase = ''
runHook preInstall
install -Dm644 target/*/release/libpawbar_resvg.a -t $out/lib
runHook postInstall
'';
};
in
{
packages.default = pkgs.buildGoModule (finalAttrs: {
pname = "pawbar";
version = "0-unstable-2025-08-31";
src = ./.;
subPackages = [ "." ];
# pawbar only ever runs inside a kitty it spawned itself, so the
# terminal compatibility layer in vaxis is dead weight
# netgo: pure go resolver, pawbar does no dns and libresolv goes away
tags = [
"kittyonly"
"netgo"
];
vendorHash = "sha256-7++BBl6TtjfZKhupTuhQXkLgPuhGbaAJm+xCWU92v/M=";
# through the env, not a #cgo line: see internal/svg
env.CGO_LDFLAGS = "${resvg}/lib/libpawbar_resvg.a";
});
}
);
}