nixpkgs/pkgs/by-name/p3/p3x-onenote/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.8 KiB
Nix
Raw Normal View History

2024-10-03 15:48:42 +00:00
{
lib,
stdenv,
appimageTools,
desktop-file-utils,
fetchurl,
}:
2020-09-04 12:46:23 +00:00
let
pname = "p3x-onenote";
2024-10-04 15:34:23 +00:00
version = "2024.10.110";
2020-09-04 12:46:23 +00:00
2024-10-03 15:48:42 +00:00
plat =
{
aarch64-linux = "-arm64";
armv7l-linux = "-armv7l";
x86_64-linux = "";
}
.${stdenv.hostPlatform.system};
2020-09-04 12:46:23 +00:00
2024-10-04 15:34:23 +00:00
hash =
2024-10-03 15:48:42 +00:00
{
2024-10-04 15:34:23 +00:00
aarch64-linux = "sha256-rBoSdbZhOnpX7mr7Uz5XuO5PB4PKcNMPQP9NqCwiIBc=";
armv7l-linux = "sha256-8XZ3dpYgHCpo5HjDF4R+U5bO6Fidsf0PlEhOoRB1JA0=";
x86_64-linux = "sha256-vn9XCKC68AzxvmjxoH4MynwUG+U/g0JmLjANDFS5kNI=";
2024-10-03 15:48:42 +00:00
}
.${stdenv.hostPlatform.system};
2020-09-04 12:46:23 +00:00
src = fetchurl {
url = "https://github.com/patrikx3/onenote/releases/download/v${version}/P3X-OneNote-${version}${plat}.AppImage";
2024-10-04 15:34:23 +00:00
inherit hash;
2020-09-04 12:46:23 +00:00
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
2020-09-04 12:46:23 +00:00
};
in
appimageTools.wrapType2 rec {
inherit pname version src;
2020-09-04 12:46:23 +00:00
extraInstallCommands = ''
mkdir -p $out/share/pixmaps $out/share/licenses/p3x-onenote
cp ${appimageContents}/p3x-onenote.png $out/share/pixmaps/
cp ${appimageContents}/p3x-onenote.desktop $out
cp ${appimageContents}/LICENSE.electron.txt $out/share/licenses/p3x-onenote/LICENSE
${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value $out/bin/p3x-onenote \
--set-key Comment --set-value "P3X OneNote Linux" \
--delete-original $out/p3x-onenote.desktop
'';
meta = with lib; {
2020-09-04 12:46:23 +00:00
homepage = "https://github.com/patrikx3/onenote";
description = "Linux Electron Onenote - A Linux compatible version of OneNote";
license = licenses.mit;
maintainers = with maintainers; [ tiagolobocastro ];
2024-10-03 15:48:42 +00:00
platforms = [
"x86_64-linux"
"aarch64-linux"
"armv7l-linux"
];
2024-02-11 02:19:15 +00:00
mainProgram = "p3x-onenote";
2020-09-04 12:46:23 +00:00
};
}