77 lines
2.0 KiB
Nix
77 lines
2.0 KiB
Nix
{ lib
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
, wrapGAppsHook3
|
|
, fetchFromGitHub
|
|
, flutter
|
|
}:
|
|
|
|
let
|
|
desktopFile = makeDesktopItem rec {
|
|
name = "Invoice Ninja";
|
|
desktopName = name;
|
|
exec = "invoiceninja";
|
|
icon = "invoiceninja";
|
|
startupWMClass = "invoiceninja";
|
|
categories = [ "Office" ];
|
|
terminal = false;
|
|
extraConfig = {
|
|
X-MultipleArgs = "false";
|
|
};
|
|
};
|
|
|
|
in flutter.buildFlutterApplication rec {
|
|
version = "5.0.172";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "invoiceninja";
|
|
repo = "admin-portal";
|
|
tag = "v${version}";
|
|
hash = "sha256-yYGGmF0XiixDi/OuLdlKwN685BUsxcIFzIqXkJi4KMs=";
|
|
};
|
|
|
|
pname = "invoiceninja-desktop";
|
|
|
|
targetFlutterPlatform = "linux";
|
|
|
|
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
|
|
|
gitHashes = {
|
|
attributed_text = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
|
boardview = "sha256-+RYN9nHIGtaQxfLoO6HeBeWfHBag+aS+LEksUQuBoqQ=";
|
|
qr_flutter = "sha256-QkPbX15YPjrfvTjFoCjFXCFBpsrabDC2AcZ8u+eVMLk=";
|
|
rounded_loading_button = "sha256-Z/HU4Yv9z8asW/8d2HCuPIAdLgmpShxWDzyzYjvly64=";
|
|
super_editor = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
|
super_editor_markdown = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
|
super_text_layout = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
copyDesktopItems
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
postUnpack = ''
|
|
mv $sourceRoot/lib/.env.dart.example $sourceRoot/lib/.env.dart
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/icons
|
|
mv $out/app/invoiceninja-desktop/data/flutter_assets/assets/images/icon.png $out/share/icons/invoiceninja.png
|
|
'';
|
|
|
|
desktopItems = [ desktopFile ];
|
|
|
|
meta = {
|
|
description = "Invoice Ninja desktop client";
|
|
homepage = "https://github.com/invoiceninja/admin-portal";
|
|
license = with lib.licenses; {
|
|
fullName = "Unfree redistributable";
|
|
shortName = "unfreeRedistributable";
|
|
free = false;
|
|
redistributable = true;
|
|
};
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|