nixpkgs/pkgs/applications/misc/notable/default.nix

48 lines
1.5 KiB
Nix
Raw Normal View History

2019-04-23 17:13:58 +01:00
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3 }:
let
pname = "notable";
2020-03-06 14:36:12 +00:00
version = "1.8.4";
sha256 = "0rvz8zwsi62kiq89pv8n2wh9h5yb030kvdr1vf65xwqkhqcrzrby";
2019-04-23 17:13:58 +01:00
name = "${pname}-${version}";
2019-04-23 17:13:58 +01:00
src = fetchurl {
2019-07-09 08:08:11 +01:00
url = "https://github.com/notable/notable/releases/download/v${version}/Notable-${version}.AppImage";
inherit sha256;
};
appimageContents = appimageTools.extract {
inherit name src;
2019-04-23 17:13:58 +01:00
};
in
appimageTools.wrapType2 rec {
inherit name src;
2019-04-23 17:13:58 +01:00
profile = ''
export LC_ALL=C.UTF-8
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
multiPkgs = null; # no 32bit needed
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.at-spi2-atk p.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 -D ${appimageContents}/notable.desktop $out/share/applications/notable.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/1024x1024/apps/notable.png \
$out/share/icons/hicolor/1024x1024/apps/notable.png
substituteInPlace $out/share/applications/notable.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
2019-04-23 17:13:58 +01:00
meta = with lib; {
description = "The markdown-based note-taking app that doesn't suck";
2020-03-06 14:36:12 +00:00
homepage = "https://github.com/notable/notable";
license = licenses.unfree;
2019-04-23 17:13:58 +01:00
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ dtzWill ];
};
}