nixpkgs-suyu/pkgs/applications/editors/standardnotes/default.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, appimage-run, fetchurl, runtimeShell }:
2018-10-28 22:31:18 +01:00
let
2019-05-02 21:39:24 +02:00
version = "3.0.15";
2018-10-28 22:31:18 +01:00
plat = {
2019-08-13 23:52:01 +02:00
i386-linux = "i386";
x86_64-linux = "x86_64";
2018-10-28 22:31:18 +01:00
}.${stdenv.hostPlatform.system};
sha256 = {
2019-08-13 23:52:01 +02:00
i386-linux = "0v2nsis6vb1lnhmjd28vrfxqwwpycv02j0nvjlfzcgj4b3400j7a";
x86_64-linux = "130n586cw0836zsbwqcz3pp3h0d4ny74ngqs4k4cvfb92556r7xh";
2018-10-28 22:31:18 +01:00
}.${stdenv.hostPlatform.system};
in
2019-08-13 23:52:01 +02:00
stdenv.mkDerivation {
2019-08-13 23:52:01 +02:00
pname = "standardnotes";
inherit version;
2018-10-28 22:31:18 +01:00
src = fetchurl {
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}-${plat}.AppImage";
inherit sha256;
};
buildInputs = [ appimage-run ];
2019-06-19 17:45:34 +02:00
dontUnpack = true;
2018-10-28 22:31:18 +01:00
installPhase = ''
mkdir -p $out/{bin,share}
cp $src $out/share/standardNotes.AppImage
echo "#!${runtimeShell}" > $out/bin/standardnotes
2018-10-28 22:31:18 +01:00
echo "${appimage-run}/bin/appimage-run $out/share/standardNotes.AppImage" >> $out/bin/standardnotes
chmod +x $out/bin/standardnotes $out/share/standardNotes.AppImage
'';
meta = with stdenv.lib; {
description = "A simple and private notes app";
longDescription = ''
Standard Notes is a private notes app that features unmatched simplicity,
end-to-end encryption, powerful extensions, and open-source applications.
'';
homepage = https://standardnotes.org;
license = licenses.agpl3;
maintainers = with maintainers; [ mgregoire ];
platforms = [ "i386-linux" "x86_64-linux" ];
};
}