Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / notable / default.nix
blob4606ee94327879062432f103453b16cdca56fc26
1 { appimageTools, makeWrapper, fetchurl, lib }:
3 let
4   pname = "notable";
5   version = "1.8.4";
6   sha256 = "0rvz8zwsi62kiq89pv8n2wh9h5yb030kvdr1vf65xwqkhqcrzrby";
8   name = "${pname}-${version}";
10   src = fetchurl {
11     url = "https://github.com/notable/notable/releases/download/v${version}/Notable-${version}.AppImage";
12     inherit sha256;
13   };
15   appimageContents = appimageTools.extract {
16     inherit name src;
17   };
19   nativeBuildInputs = [ makeWrapper ];
21 appimageTools.wrapType2 rec {
23   inherit pname version src;
25   profile = ''
26     export LC_ALL=C.UTF-8
27   '';
29   multiArch = false; # no 32bit needed
30   extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.at-spi2-atk p.at-spi2-core ];
31   extraInstallCommands = ''
32     mv $out/bin/{${name},${pname}}
33     install -m 444 -D ${appimageContents}/notable.desktop $out/share/applications/notable.desktop
34     install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/1024x1024/apps/notable.png \
35       $out/share/icons/hicolor/1024x1024/apps/notable.png
36     substituteInPlace $out/share/applications/notable.desktop \
37       --replace 'Exec=AppRun' 'Exec=${pname}'
38     source "${makeWrapper}/nix-support/setup-hook"
39     wrapProgram "$out/bin/${pname}" \
40       --add-flags "--disable-seccomp-filter-sandbox"
41   '';
43   meta = with lib; {
44     description = "The markdown-based note-taking app that doesn't suck";
45     homepage = "https://github.com/notable/notable";
46     license = licenses.unfree;
47     platforms = [ "x86_64-linux" ];
48     maintainers = with maintainers; [ dtzWill ];
49   };