3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/standardnotes/default.nix

59 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, appimageTools, autoPatchelfHook, desktop-file-utils
, fetchurl, runtimeShell }:
2018-10-28 21:31:18 +00:00
let
2020-03-05 08:53:12 +00:00
version = "3.3.3";
pname = "standardnotes";
name = "${pname}-${version}";
2018-10-28 21:31:18 +00:00
plat = {
2020-03-05 08:53:12 +00:00
i386-linux = "-i386";
x86_64-linux = "";
2018-10-28 21:31:18 +00:00
}.${stdenv.hostPlatform.system};
sha256 = {
2020-03-05 08:53:12 +00:00
i386-linux = "2ccdf23588b09d645811e562d4fd7e02ac0e367bf2b34e373d8470d48544036d";
x86_64-linux = "6366d0a37cbf2cf51008a666e40bada763dd1539173de01e093bcbe4146a6bd8";
2018-10-28 21:31:18 +00:00
}.${stdenv.hostPlatform.system};
src = fetchurl {
2020-03-05 08:53:12 +00:00
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}${plat}.AppImage";
2018-10-28 21:31:18 +00:00
inherit sha256;
};
appimageContents = appimageTools.extract {
inherit name src;
};
nativeBuildInputs = [ autoPatchelfHook desktop-file-utils ];
in appimageTools.wrapType2 rec {
inherit name src;
extraInstallCommands = ''
# directory in /nix/store so readonly
cp -r ${appimageContents}/* $out
cd $out
chmod -R +w $out
mv $out/bin/${name} $out/bin/${pname}
2018-10-28 21:31:18 +00:00
# fixup and install desktop file
${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value ${pname} standard-notes.desktop
2018-10-28 21:31:18 +00:00
rm usr/lib/* AppRun standard-notes.desktop .so*
2018-10-28 21:31:18 +00:00
'';
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";
2018-10-28 21:31:18 +00:00
license = licenses.agpl3;
maintainers = with maintainers; [ mgregoire ];
platforms = [ "i386-linux" "x86_64-linux" ];
};
}