diff options
Diffstat (limited to 'pkgs/tools/security/cryptomator/default.nix')
-rw-r--r-- | pkgs/tools/security/cryptomator/default.nix | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/pkgs/tools/security/cryptomator/default.nix b/pkgs/tools/security/cryptomator/default.nix index a7341ef79d9b5..cfde59a7e786c 100644 --- a/pkgs/tools/security/cryptomator/default.nix +++ b/pkgs/tools/security/cryptomator/default.nix @@ -1,10 +1,10 @@ -{ lib, stdenv, fetchFromGitHub +{ lib, fetchFromGitHub , autoPatchelfHook , fuse3 , maven, jdk, makeShellWrapper, glib, wrapGAppsHook }: -let +maven.buildMavenPackage rec { pname = "cryptomator"; version = "1.8.0"; @@ -12,43 +12,15 @@ let owner = "cryptomator"; repo = "cryptomator"; rev = version; - sha256 = "sha256-4MjF2PDH0JB1biY4HO2wOC0i6EIGSlzkK6tDm8nzvIo="; + hash = "sha256-4MjF2PDH0JB1biY4HO2wOC0i6EIGSlzkK6tDm8nzvIo="; }; - # perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB) - deps = stdenv.mkDerivation { - name = "cryptomator-${version}-deps"; - inherit src; + mvnParameters = "-Dmaven.test.skip=true"; + mvnHash = "sha256-rHLLYkZq3GGE0uhTgZT0tnsh+ChzQdpQ2e+SG1TwBvw="; - nativeBuildInputs = [ jdk maven ]; - buildInputs = [ jdk ]; - - buildPhase = '' - while mvn -Plinux package -Dmaven.test.skip=true -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000; [ $? = 1 ]; do - echo "timeout, restart maven to continue downloading" - done - ''; - - # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside - installPhase = '' - find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete - find $out/.m2 -type f -iname '*.pom' -exec sed -i -e 's/\r\+$//' {} \; - ''; - - outputHashMode = "recursive"; - outputHash = "sha256-2nCaSL7OlS9f+PZPh0YiMvnjOaAqlQimkKWDSjSP+bQ="; - - doCheck = false; - }; - -in stdenv.mkDerivation rec { - inherit pname version src; - - buildPhase = '' + preBuild = '' 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 ''; |