3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #265961 from 999eagle/feat/intiface-central

intiface-central: init at 2.5.3
This commit is contained in:
Ilan Joselevich 2023-12-12 02:43:31 +02:00 committed by GitHub
commit 729bd7499f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1863 additions and 0 deletions

View file

@ -0,0 +1,23 @@
diff --git a/linux/rust.cmake b/linux/rust.cmake
index a96586c..f9b8677 100644
--- a/linux/rust.cmake
+++ b/linux/rust.cmake
@@ -2,17 +2,7 @@
# many dependencies we would need to install Corrosion on the system.
# See instructions on https://github.com/AndrewGaspar/corrosion#cmake-install
# Once done, uncomment this line:
-# find_package(Corrosion REQUIRED)
-
-include(FetchContent)
-
-FetchContent_Declare(
- Corrosion
- GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git
- GIT_TAG origin/master # Optionally specify a version tag or branch here
-)
-
-FetchContent_MakeAvailable(Corrosion)
+find_package(Corrosion REQUIRED)
corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml)

1761
pkgs/by-name/in/intiface-central/deps.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,79 @@
{ lib
, fetchFromGitHub
, flutter
, corrosion
, rustPlatform
, cargo
, rustc
, udev
, copyDesktopItems
, makeDesktopItem
}:
flutter.buildFlutterApplication rec {
pname = "intiface-central";
version = "2.5.3";
src = fetchFromGitHub {
owner = "intiface";
repo = pname;
rev = "v${version}";
hash = "sha256-i0G3wCfJ9Q7DEmVMrQv2K6fy4YRWsEMNns9zMZkJxvY=";
};
patches = [
./corrosion.patch
];
depsListFile = ./deps.json;
vendorHash = "sha256-06I9ugwUmMT16A6l5Is5v35Fu7pyE8+1mnDDPKxCYxM=";
cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${version}-cargo-deps";
inherit src;
sourceRoot = "source/intiface-engine-flutter-bridge";
hash = "sha256-0sCHa3rMaLYaUG3E3fmsLi0dSdb9vGyv7qNR3JQkXuU=";
};
cargoRoot = "intiface-engine-flutter-bridge";
preConfigure = ''
export CMAKE_PREFIX_PATH="${corrosion}:$CMAKE_PREFIX_PATH"
'';
nativeBuildInputs = [
corrosion
rustPlatform.cargoSetupHook
cargo
rustc
copyDesktopItems
];
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'`
extraWrapProgramArgs = "--chdir $out/app";
postInstall = ''
mkdir -p $out/share/pixmaps
cp $out/app/data/flutter_assets/assets/icons/intiface_central_icon.png $out/share/pixmaps/intiface-central.png
'';
desktopItems = [
(makeDesktopItem {
name = "intiface-central";
exec = "intiface_central";
icon = "intiface-central";
comment = "Intiface Central (Buttplug Frontend) Application for Desktop";
desktopName = "Intiface Central";
})
];
meta = with lib; {
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;
};
}