intiface-central: refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
flutterPackages,
|
||||
flutter327,
|
||||
corrosion,
|
||||
rustPlatform,
|
||||
cargo,
|
||||
@@ -10,15 +10,18 @@
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
}:
|
||||
flutterPackages.stable.buildFlutterApplication rec {
|
||||
|
||||
flutter327.buildFlutterApplication rec {
|
||||
pname = "intiface-central";
|
||||
version = "2.6.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intiface";
|
||||
repo = "intiface-central";
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-goN0750EvGw5G8cb4jy6wWnjlLwlwMeTz4GQEilbwpY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./corrosion.patch
|
||||
];
|
||||
@@ -29,8 +32,9 @@ flutterPackages.stable.buildFlutterApplication rec {
|
||||
name = "${pname}-${version}-cargo-deps";
|
||||
inherit src;
|
||||
sourceRoot = "${src.name}/intiface-engine-flutter-bridge";
|
||||
hash = "sha256-goN0750EvGw5G8cb4jy6wWnjlLwlwMeTz4GQEilbwpY=";
|
||||
hash = "sha256-z9i0xT0e8G9spOmXpI2yFee/y3ZEh69YqL+7zRWszzA=";
|
||||
};
|
||||
|
||||
cargoRoot = "intiface-engine-flutter-bridge";
|
||||
|
||||
preConfigure = ''
|
||||
@@ -45,19 +49,14 @@ flutterPackages.stable.buildFlutterApplication rec {
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
udev
|
||||
];
|
||||
buildInputs = [ udev ];
|
||||
|
||||
# without this, only the splash screen will be shown and the logs will contain the
|
||||
# line `Failed to load dynamic library 'lib/libintiface_engine_flutter_bridge.so'`
|
||||
# Environmental variables don't quite eval outside of hooks so use pname and
|
||||
# version directly.
|
||||
extraWrapProgramArgs = "--chdir $out/app/${pname}";
|
||||
extraWrapProgramArgs = "--chdir $out/app/intiface-central";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/pixmaps
|
||||
cp $out/app/$pname/data/flutter_assets/assets/icons/intiface_central_icon.png $out/share/pixmaps/intiface-central.png
|
||||
install -Dm644 $out/app/intiface-central/data/flutter_assets/assets/icons/intiface_central_icon.png $out/share/pixmaps/intiface-central.png
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
@@ -70,12 +69,12 @@ flutterPackages.stable.buildFlutterApplication rec {
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
mainProgram = "intiface_central";
|
||||
description = "Intiface Central (Buttplug Frontend) Application for Desktop";
|
||||
homepage = "https://intiface.com/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ _999eagle ];
|
||||
platforms = platforms.linux;
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ _999eagle ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user