From f7f2e41dd177d0adb25978f9211e4ec34aa84a94 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Thu, 21 Jul 2022 00:00:00 +1000 Subject: [PATCH] siglo: init at 0.9.9 --- pkgs/applications/misc/siglo/default.nix | 70 +++++++++++++++++++ .../misc/siglo/siglo-no-user-install.patch | 13 ++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 85 insertions(+) create mode 100644 pkgs/applications/misc/siglo/default.nix create mode 100644 pkgs/applications/misc/siglo/siglo-no-user-install.patch diff --git a/pkgs/applications/misc/siglo/default.nix b/pkgs/applications/misc/siglo/default.nix new file mode 100644 index 00000000000..ad849bf6992 --- /dev/null +++ b/pkgs/applications/misc/siglo/default.nix @@ -0,0 +1,70 @@ +{ stdenv +, lib +, fetchFromGitHub +, glib +, meson +, ninja +, wrapGAppsHook +, desktop-file-utils +, gobject-introspection +, gtk3 +, python3 +}: + +stdenv.mkDerivation rec { + pname = "siglo"; + version = "0.9.9"; + + src = fetchFromGitHub { + owner = "theironrobin"; + repo = "siglo"; + rev = "v${version}"; + hash = "sha256-4jKsRpzuyHH31LXndC3Ua4TYcI0G0v9qqe0cbvLuCDA="; + }; + + patches = [ + ./siglo-no-user-install.patch + ]; + + postPatch = '' + chmod +x build-aux/meson/postinstall.py # patchShebangs requires an executable file + patchShebangs build-aux/meson/postinstall.py + ''; + + nativeBuildInputs = [ + glib + meson + ninja + wrapGAppsHook + python3.pkgs.wrapPython + python3 + desktop-file-utils + gtk3 + ]; + + buildInputs = [ + gtk3 + python3.pkgs.gatt + gobject-introspection + ]; + + pythonPath = with python3.pkgs; [ + gatt + pybluez + requests + ]; + + preFixup = '' + buildPythonPath "$out $pythonPath" + gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH") + ''; + + meta = with lib; { + description = "GTK app to sync InfiniTime watch with PinePhone"; + homepage = "https://github.com/theironrobin/siglo"; + changelog = "https://github.com/theironrobin/siglo/tags/v${version}"; + license = licenses.mpl20; + maintainers = with maintainers; [ tomfitzhenry ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/siglo/siglo-no-user-install.patch b/pkgs/applications/misc/siglo/siglo-no-user-install.patch new file mode 100644 index 00000000000..11cd472d7eb --- /dev/null +++ b/pkgs/applications/misc/siglo/siglo-no-user-install.patch @@ -0,0 +1,13 @@ +diff --git a/data/meson.build b/data/meson.build +index 62a00fe..5319974 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -18,8 +18,6 @@ install_data(join_paths('icons', 'com.github.alexr4535.siglo.svg'), + install_dir: join_paths(get_option('datadir'), 'icons') + ) + +-install_data('siglo.service', install_dir: '/etc/systemd/user/') +- + appstream_file = i18n.merge_file( + input: 'com.github.alexr4535.siglo.appdata.xml.in', + output: 'com.github.alexr4535.siglo.appdata.xml', diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 49772490ff0..3e5702a9092 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4429,6 +4429,8 @@ with pkgs; shisho = callPackage ../tools/security/shisho { }; + siglo = callPackage ../applications/misc/siglo { }; + simg2img = callPackage ../tools/filesystems/simg2img { }; snazy = callPackage ../development/tools/snazy { };