Files
chiasson-nix/modules/wisdom/browsers/flow.nix
T
Olivier 548a438f6a refactor(wisdom): rename wisdomSimpleSlice to wisdomSlice
Rename the helper function `wisdomSimpleSlice` to `wisdomSlice` across
the codebase and update documentation to reflect the new naming
convention. This change simplifies the API for creating trivial
single-package slices.
2026-07-17 11:44:56 -03:00

58 lines
2.2 KiB
Nix

{ self, ... }: {
flake.homeManagerModules.wisdomBrowsersFlow = self.lib.wisdomSlice {
path = "browsers.flow";
default = false;
description = "[Flow](https://github.com/MultiboxLabs/flow-browser) — upstream AppImage wrapped for NixOS.";
packages =
pkgs:
let
pname = "flow-browser";
version = "0.11.0";
suffix = if pkgs.stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64";
hash =
if pkgs.stdenv.hostPlatform.isAarch64 then
"sha256-rTRKbNyVRJAw7ZyDR6kx+XJ4rWmErZqA0b6LP9t5eOA="
else
"sha256-/Tca4uUBfgbZQEeXdYkCz6CWxqvCl40CQpACFry1k9s=";
src = pkgs.fetchurl {
url = "https://github.com/MultiboxLabs/flow-browser/releases/download/v${version}/flow-browser-${version}-${suffix}.AppImage";
inherit hash;
};
appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; };
in
[
(pkgs.appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ pkgs.makeWrapper ];
extraInstallCommands = ''
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
install -m 444 -D ${appimageContents}/flow-browser.desktop -t $out/share/applications
substituteInPlace $out/share/applications/flow-browser.desktop \
--replace-fail 'Exec=AppRun --ozone-platform-hint=auto' 'Exec=${pname} --ozone-platform-hint=auto'
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/flow-browser.png \
$out/share/icons/hicolor/512x512/apps/flow-browser.png
'';
meta = {
description = "Chromium-based browser (upstream AppImage)";
homepage = "https://github.com/MultiboxLabs/flow-browser";
license = pkgs.lib.licenses.gpl3Plus;
sourceProvenance = with pkgs.lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
mainProgram = pname;
maintainers = [ ];
};
})
];
};
}