From 223829cffdbebf6baf4b1a951386599bee8853ce Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Fri, 14 Oct 2022 00:42:43 +0800 Subject: [PATCH] karlender: init at 0.6.2 --- .../applications/office/karlender/default.nix | 60 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/applications/office/karlender/default.nix diff --git a/pkgs/applications/office/karlender/default.nix b/pkgs/applications/office/karlender/default.nix new file mode 100644 index 000000000000..44cd2ed0051f --- /dev/null +++ b/pkgs/applications/office/karlender/default.nix @@ -0,0 +1,60 @@ +{ lib +, rustPlatform +, fetchFromGitLab +, pkg-config +, gtk4 +, libadwaita +, wrapGAppsHook4 +, glib +, tzdata +}: + +rustPlatform.buildRustPackage rec { + pname = "karlender"; + version = "0.6.2"; + + src = fetchFromGitLab { + owner = "loers"; + repo = "karlender"; + rev = "v${version}"; + sha256 = "sha256-YF46C+Vz7eGl4lqOQXqiQqaa6ieo1p8l6QCh4oNSJEg="; + }; + + cargoSha256 = "sha256-Kx5K2tp5PAQWac8LVrmOsk8Qf9m34SJ1vyfv7Ef2Wr0="; + + nativeBuildInputs = [ + pkg-config + wrapGAppsHook4 + glib + ]; + buildInputs = [ + gtk4 + libadwaita + ]; + + postPatch = '' + substituteInPlace src/domain/time.rs --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" + ''; + + postInstall = '' + substituteInPlace target/gra-gen/data/codes.loers.Karlender.desktop \ + --replace "Exec=codes.loers.Karlender" "Exec=karlender" + substituteInPlace target/gra-gen/data/codes.loers.Karlender.appdata.xml \ + --replace "codes.loers.Karlender" "karlender" + install -Dm444 target/gra-gen/codes.loers.Karlender.gschema.xml -t $out/share/gsettings-schemas/$name/glib-2.0/schemas/ + glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas/ + install -Dm444 target/gra-gen/data/codes.loers.Karlender.svg -t $out/share/icons/hicolor/scalable/apps/ + install -Dm444 target/gra-gen/data/codes.loers.Karlender.64.png -T $out/share/icons/hicolor/64x64/apps/codes.loers.Karlender.png + install -Dm444 target/gra-gen/data/codes.loers.Karlender.128.png -T $out/share/icons/hicolor/128x128/apps/codes.loers.Karlender.png + install -Dm444 target/gra-gen/data/codes.loers.Karlender.desktop -t $out/share/applications/ + install -Dm444 target/gra-gen/data/codes.loers.Karlender.appdata.xml -t $out/share/metainfo/ + ''; + + meta = with lib; { + description = "Mobile-friendly GTK calendar application"; + homepage = "https://gitlab.com/loers/karlender"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ chuangzhu ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 55321d2458e8..ddec780c7044 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27891,6 +27891,8 @@ with pkgs; icesl = callPackage ../applications/misc/icesl { }; + karlender = callPackage ../applications/office/karlender { }; + keepassx = callPackage ../applications/misc/keepassx { }; keepassx2 = callPackage ../applications/misc/keepassx/2.0.nix { }; keepassxc = libsForQt5.callPackage ../applications/misc/keepassx/community.nix { };