Merge pull request #81812 from bignaux/standardnotes
standardnotes: 3.0.15 -> 3.3.3
This commit is contained in:
commit
9ba63260fd
1 changed files with 29 additions and 20 deletions
|
@ -1,38 +1,47 @@
|
|||
{ stdenv, appimage-run, fetchurl, runtimeShell }:
|
||||
{ stdenv, appimageTools, autoPatchelfHook, desktop-file-utils
|
||||
, fetchurl, runtimeShell }:
|
||||
|
||||
let
|
||||
version = "3.0.15";
|
||||
version = "3.3.3";
|
||||
pname = "standardnotes";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
plat = {
|
||||
i386-linux = "i386";
|
||||
x86_64-linux = "x86_64";
|
||||
i386-linux = "-i386";
|
||||
x86_64-linux = "";
|
||||
}.${stdenv.hostPlatform.system};
|
||||
|
||||
sha256 = {
|
||||
i386-linux = "0v2nsis6vb1lnhmjd28vrfxqwwpycv02j0nvjlfzcgj4b3400j7a";
|
||||
x86_64-linux = "130n586cw0836zsbwqcz3pp3h0d4ny74ngqs4k4cvfb92556r7xh";
|
||||
i386-linux = "2ccdf23588b09d645811e562d4fd7e02ac0e367bf2b34e373d8470d48544036d";
|
||||
x86_64-linux = "6366d0a37cbf2cf51008a666e40bada763dd1539173de01e093bcbe4146a6bd8";
|
||||
}.${stdenv.hostPlatform.system};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "standardnotes";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}-${plat}.AppImage";
|
||||
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}${plat}.AppImage";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ appimage-run ];
|
||||
appimageContents = appimageTools.extract {
|
||||
inherit name src;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
nativeBuildInputs = [ autoPatchelfHook desktop-file-utils ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share}
|
||||
cp $src $out/share/standardNotes.AppImage
|
||||
echo "#!${runtimeShell}" > $out/bin/standardnotes
|
||||
echo "${appimage-run}/bin/appimage-run $out/share/standardNotes.AppImage" >> $out/bin/standardnotes
|
||||
chmod +x $out/bin/standardnotes $out/share/standardNotes.AppImage
|
||||
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}
|
||||
|
||||
# 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
|
||||
|
||||
rm usr/lib/* AppRun standard-notes.desktop .so*
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue