config/packages/nixpak/wike/default.nix

42 lines
1,000 B
Nix
Raw Permalink Normal View History

2023-04-22 19:12:44 +03:00
{ mkNixPak, wike, python3Packages }:
mkNixPak {
config = { sloth, ... }: {
imports = [
../modules/gui-base.nix
../modules/network.nix
];
flatpak.appId = "com.github.hugolabe.Wike";
bubblewrap = {
bind.rw = [
[
(sloth.mkdir (sloth.concat' sloth.appCacheDir "/wike"))
(sloth.concat' sloth.xdgCacheHome "/wike")
]
];
};
app = {
# upstream wike is a bit broken
package = wike.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
python3Packages.dbus-python
];
# fix double wrapping
dontWrapGApps = true;
makeWrapperArgs = [
"\${gappsWrapperArgs[@]}"
];
# properly wrap wike-sp
postFixup = (old.postFixup or "") + ''
wrapPythonProgramsIn $out/share/wike "$out $propagatedBuildInputs"
'';
});
extraEntrypoints = [
"/share/wike/wike-sp"
];
};
};
}