Skip to content

Commit

Permalink
Merge pull request #166927 from bachp/cryptomator-1.6.8
Browse files Browse the repository at this point in the history
cryptomator: 1.6.7 -> 1.6.8
  • Loading branch information
Lassulus authored Apr 17, 2022
2 parents 69c18b0 + 1c02d42 commit ba88a5a
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions pkgs/tools/security/cryptomator/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

let
pname = "cryptomator";
version = "1.6.7";
version = "1.6.8";

src = fetchFromGitHub {
owner = "cryptomator";
repo = "cryptomator";
rev = version;
sha256 = "sha256-hOILOdVYBnS9XuEXaIJcf2bPF72Lcr7IBX4CFCIsC8k=";
sha256 = "sha256-2bvIjfutxfTPBtYiSXpgdEh63Eg74uqSf8CDo/Oma0U=";
};

# perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB)
Expand All @@ -37,7 +37,7 @@ let

outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-XFqXjNjPN2vwA3jay7TS79S4FHksjjrODdD/p4oTvpg=";
outputHash = "sha256-quYUJX/JErtWuUQBYXXee/uZGkO0UBr4qxcGticxGUc=";

doCheck = false;
};
Expand All @@ -46,9 +46,14 @@ in stdenv.mkDerivation rec {
inherit pname version src;

buildPhase = ''
VERSION=${version}
SEMVER_STR=${version}
mvn -Plinux package --offline -Dmaven.test.skip=true -Dmaven.repo.local=$(cp -dpR ${deps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2
'';


# This is based on the instructins in https://github.com/cryptomator/cryptomator/blob/develop/dist/linux/appimage/build.sh
installPhase = ''
mkdir -p $out/bin/ $out/share/cryptomator/libs/ $out/share/cryptomator/mods/
Expand All @@ -63,10 +68,14 @@ in stdenv.mkDerivation rec {
makeWrapper ${jre}/bin/java $out/bin/cryptomator \
--add-flags "--class-path '$out/share/cryptomator/libs/*'" \
--add-flags "--module-path '$out/share/cryptomator/mods'" \
--add-flags "-Dcryptomator.logDir='~/.local/share/Cryptomator/logs'" \
--add-flags "-Dcryptomator.pluginDir='~/.local/share/Cryptomator/plugins'" \
--add-flags "-Dcryptomator.settingsPath='~/.config/Cryptomator/settings.json'" \
--add-flags "-Dcryptomator.ipcSocketPath='~/.config/Cryptomator/ipc.socket'" \
--add-flags "-Dcryptomator.logDir='~/.local/share/Cryptomator/logs'" \
--add-flags "-Dcryptomator.mountPointsDir='~/.local/share/Cryptomator/mnt'" \
--add-flags "-Dcryptomator.showTrayIcon=false" \
--add-flags "-Dcryptomator.buildNumber='nix'" \
--add-flags "-Dcryptomator.appVersion='${version}'" \
--add-flags "-Djdk.gtk.version=3" \
--add-flags "-Xss20m" \
--add-flags "-Xmx512m" \
Expand All @@ -79,6 +88,14 @@ in stdenv.mkDerivation rec {
# install desktop entry and icons
cp -r ${src}/dist/linux/appimage/resources/AppDir/usr/* $out/
# The directory is read only when copied, enable read to install additional files
chmod +w -R $out/
cp ${src}/dist/linux/common/org.cryptomator.Cryptomator256.png $out/share/icons/hicolor/256x256/apps/org.cryptomator.Cryptomator.png
cp ${src}/dist/linux/common/org.cryptomator.Cryptomator512.png $out/share/icons/hicolor/512x512/apps/org.cryptomator.Cryptomator.png
cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.svg $out/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg
cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.desktop $out/share/applications/org.cryptomator.Cryptomator.desktop
cp ${src}/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml $out/share/metainfo/org.cryptomator.Cryptomator.metainfo.xml
cp ${src}/dist/linux/common/application-vnd.cryptomator.vault.xml $out/share/mime/packages/application-vnd.cryptomator.vault.xml
'';

nativeBuildInputs = [ autoPatchelfHook maven makeWrapper wrapGAppsHook jdk ];
Expand Down

0 comments on commit ba88a5a

Please sign in to comment.