Skip to content

Commit

Permalink
libretrack: init at 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
genga898 committed Jan 19, 2025
1 parent 9391aab commit f575c24
Show file tree
Hide file tree
Showing 2 changed files with 2,076 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkgs/by-name/li/libretrack/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
lib,
fetchFromGitHub,
flutterPackages-source,
libappindicator,
}:

flutterPackages-source.stable.buildFlutterApplication rec {
pname = "libretrack";
version = "1.7.0";

src = fetchFromGitHub {
owner = "proninyaroslav";
repo = "libretrack";
tag = version;
hash = "sha256-USZ243M/0SOvlYns66zkhDQCuq+kgEWYdBZN3iBF9SA=";
};

pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
"receive_sharing_intent" = "sha256-YsvnLOZvYZMyKx3J596Q3/hY2Fn/AFT6nhLTTHdMFOE=";
};

postPatch = ''
substituteInPlace linux/CMakeLists.txt \
--replace-fail 'find_library(APPINDICATOR_LIBRARY NAMES appindicator3)' 'find_library(${libappindicator} NAMES appindicator3)' \
--replace-fail 'target_link_libraries(''${BINARY_NAME} PRIVATE ''${APPINDICATOR_LIBRARY})' 'target_link_libraries(''${BINARY_NAME} PRIVATE ${libappindicator}/lib/libappindicator3.so)'
'';

nativeBuildInputs = [
libappindicator
];

postInstall = ''
substituteInPlace snap/gui/org.proninyaroslav.libretrack.desktop \
--replace-fail 'Icon=''${SNAP}/meta/gui/libretrack.png' 'Icon=libretrack' \
install -Dm644 snap/gui/org.proninyaroslav.libretrack.desktop -t $out/share/applications
install -Dm644 linux/icons/app-icon.svg $out/share/icons/hicolor/scalable/apps/libretrack.svg
'';

meta = {
description = "Private, cross-platform package tracking app";
homepage = "https://github.com/proninyaroslav/libretrack";
changelog = "https://github.com/proninyaroslav/libretrack/releases/tag/${version}";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ genga898 ];
mainProgram = "libretrack";
platforms = lib.platforms.linux;
};
}
Loading

0 comments on commit f575c24

Please sign in to comment.