feat: started to create polycule package
This commit is contained in:
parent
6dfe3ac326
commit
c10c610034
6 changed files with 2646 additions and 0 deletions
|
@ -70,6 +70,8 @@ in {
|
||||||
noisetorch.enable = true;
|
noisetorch.enable = true;
|
||||||
tor-browser.enable = true;
|
tor-browser.enable = true;
|
||||||
gdx-liftoff.enable = true;
|
gdx-liftoff.enable = true;
|
||||||
|
# polycule package is currently broken
|
||||||
|
polycule.enable = false;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,5 +38,8 @@
|
||||||
# Override h3 C library to version 4.3.0
|
# Override h3 C library to version 4.3.0
|
||||||
h3 = pkgs.callPackage ./h3-c-lib.nix {};
|
h3 = pkgs.callPackage ./h3-c-lib.nix {};
|
||||||
})
|
})
|
||||||
|
(final: prev: {
|
||||||
|
polycule = pkgs.callPackage ./polycule {};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
149
modules/common-modules/pkgs/polycule/default.nix
Normal file
149
modules/common-modules/pkgs/polycule/default.nix
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
flutter329,
|
||||||
|
fetchFromGitLab,
|
||||||
|
pkg-config,
|
||||||
|
wrapGAppsHook,
|
||||||
|
gtk3,
|
||||||
|
glib,
|
||||||
|
glib-networking,
|
||||||
|
webkitgtk_4_1,
|
||||||
|
libsecret,
|
||||||
|
libnotify,
|
||||||
|
dbus,
|
||||||
|
sqlcipher,
|
||||||
|
openssl,
|
||||||
|
mpv,
|
||||||
|
alsa-lib,
|
||||||
|
libass,
|
||||||
|
ffmpeg-full,
|
||||||
|
libplacebo,
|
||||||
|
libunwind,
|
||||||
|
shaderc,
|
||||||
|
vulkan-headers,
|
||||||
|
vulkan-loader,
|
||||||
|
lcms2,
|
||||||
|
libdovi,
|
||||||
|
libdvdnav,
|
||||||
|
libdvdread,
|
||||||
|
mujs,
|
||||||
|
libbluray,
|
||||||
|
lua,
|
||||||
|
rubberband,
|
||||||
|
libuchardet,
|
||||||
|
zimg,
|
||||||
|
openal,
|
||||||
|
pipewire,
|
||||||
|
libpulseaudio,
|
||||||
|
libcaca,
|
||||||
|
libdrm,
|
||||||
|
libdisplay-info,
|
||||||
|
libgbm,
|
||||||
|
xorg,
|
||||||
|
nv-codec-headers-11,
|
||||||
|
libva,
|
||||||
|
libvdpau,
|
||||||
|
}:
|
||||||
|
flutter329.buildFlutterApplication rec {
|
||||||
|
pname = "polycule";
|
||||||
|
version = "0.3.0";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "polycule_client";
|
||||||
|
repo = "polycule";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-kY1vJiDXh0rSCJNOAkO8JGiMR8kXwDHuc3T+S4MkOWY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pubspecLock = lib.importJSON ./polycule-pubspec.lock.json;
|
||||||
|
|
||||||
|
gitHashes = {
|
||||||
|
matrix = "sha256-e1HGC2yZyqqYB5YAGKmUkkdDbuSzhiUenJMKJgQYIi8=";
|
||||||
|
media_kit = "sha256-1sVX+aHFLFJBtrNZrR6tWkb80vFELW2N9EejyQKlBPg=";
|
||||||
|
media_kit_libs_android_video = "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gtk3
|
||||||
|
glib
|
||||||
|
glib-networking
|
||||||
|
webkitgtk_4_1
|
||||||
|
libsecret
|
||||||
|
libnotify
|
||||||
|
dbus
|
||||||
|
sqlcipher
|
||||||
|
openssl
|
||||||
|
mpv
|
||||||
|
alsa-lib
|
||||||
|
libass
|
||||||
|
ffmpeg-full
|
||||||
|
libplacebo
|
||||||
|
libunwind
|
||||||
|
shaderc
|
||||||
|
vulkan-headers
|
||||||
|
vulkan-loader
|
||||||
|
lcms2
|
||||||
|
libdovi
|
||||||
|
libdvdnav
|
||||||
|
libdvdread
|
||||||
|
mujs
|
||||||
|
libbluray
|
||||||
|
lua
|
||||||
|
rubberband
|
||||||
|
libuchardet
|
||||||
|
zimg
|
||||||
|
openal
|
||||||
|
pipewire
|
||||||
|
libpulseaudio
|
||||||
|
libcaca
|
||||||
|
libdrm
|
||||||
|
libdisplay-info
|
||||||
|
libgbm
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libXpresent
|
||||||
|
nv-codec-headers-11
|
||||||
|
libva
|
||||||
|
libvdpau
|
||||||
|
];
|
||||||
|
|
||||||
|
flutterBuildFlags = [
|
||||||
|
"--release"
|
||||||
|
"--target"
|
||||||
|
"lib/main.dart"
|
||||||
|
"--dart-define=POLYCULE_VERSION=v${version}"
|
||||||
|
"--dart-define=POLYCULE_IS_STABLE=true"
|
||||||
|
"--no-tree-shake-icons"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Install desktop files and icons from the source
|
||||||
|
install -Dm644 linux/business.braid.polycule.desktop $out/share/applications/polycule.desktop
|
||||||
|
install -Dm644 assets/logo/logo-circle.png $out/share/pixmaps/polycule.png
|
||||||
|
|
||||||
|
# Update desktop file to use correct executable name
|
||||||
|
substituteInPlace $out/share/applications/polycule.desktop \
|
||||||
|
--replace 'Exec=business.braid.polycule' 'Exec=polycule'
|
||||||
|
|
||||||
|
# Create a symlink with the expected name
|
||||||
|
ln -sf $out/bin/polycule $out/bin/business.braid.polycule
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A geeky and efficient [matrix] client for power users";
|
||||||
|
longDescription = ''
|
||||||
|
Polycule is a modern Matrix client built with Flutter, designed for power users
|
||||||
|
who want a fast, efficient, and feature-rich Matrix experience.
|
||||||
|
'';
|
||||||
|
homepage = "https://polycule.im/";
|
||||||
|
license = licenses.eupl12;
|
||||||
|
maintainers = [];
|
||||||
|
platforms = ["x86_64-linux" "aarch64-linux"];
|
||||||
|
sourceProvenance = with sourceTypes; [fromSource];
|
||||||
|
mainProgram = "polycule";
|
||||||
|
};
|
||||||
|
}
|
2459
modules/common-modules/pkgs/polycule/polycule-pubspec.lock.json
Normal file
2459
modules/common-modules/pkgs/polycule/polycule-pubspec.lock.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -38,5 +38,6 @@
|
||||||
./davinci-resolve.nix
|
./davinci-resolve.nix
|
||||||
./gdx-liftoff.nix
|
./gdx-liftoff.nix
|
||||||
./tor-browser.nix
|
./tor-browser.nix
|
||||||
|
./polycule.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
32
modules/home-manager-modules/programs/polycule.nix
Normal file
32
modules/home-manager-modules/programs/polycule.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options.programs.polycule = {
|
||||||
|
enable = lib.mkEnableOption "enable polycule matrix client";
|
||||||
|
package = lib.mkPackageOption pkgs "polycule" {};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.programs.polycule.enable (lib.mkMerge [
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
config.programs.polycule.package
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(
|
||||||
|
lib.mkIf osConfig.host.impermanence.enable {
|
||||||
|
home.persistence."/persist${config.home.homeDirectory}" = {
|
||||||
|
# TODO: check that these are actually the correct folders
|
||||||
|
# directories = [
|
||||||
|
# "${config.xdg.configHome}/polycule"
|
||||||
|
# "${config.xdg.dataHome}/polycule"
|
||||||
|
# "${config.xdg.cacheHome}/polycule"
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue