Commit 2c1d58e9 authored by Robert Schütz's avatar Robert Schütz
Browse files

nextcloudPackages: update

We no longer use fetchzip because nc4nix no longer unpacks the tarball
before computing the hash.
parent 73eb537d
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
{ stdenv, fetchzip, applyPatches, lib, ... }:
{ fetchurl, fetchzip, applyPatches, lib, ... }:
{ url
, hash ? ""
, sha256 ? ""
@@ -8,19 +8,12 @@
, patches ? [ ]
, description ? null
, homepage ? null
, unpack ? true # whether to use fetchzip rather than fetchurl
}:
applyPatches ({
  inherit patches;
  src = fetchzip {
  src = (if unpack then fetchzip else fetchurl) {
    inherit url hash sha256;
    postFetch = ''
      pushd $out &>/dev/null
      if [ ! -f ./appinfo/info.xml ]; then
        echo "appinfo/info.xml doesn't exist in $out, aborting!"
        exit 1
      fi
      popd &>/dev/null
    '';
    meta = {
      license = lib.licenses.${license};
      longDescription = description;
@@ -31,6 +24,12 @@ applyPatches ({
      inherit homepage;
    };
  };
  prePatch = ''
    if [ ! -f ./appinfo/info.xml ]; then
      echo "appinfo/info.xml doesn't exist in $out, aborting!"
      exit 1
    fi
  '';
} // lib.optionalAttrs (appName != null && appVersion != null) {
  name = "nextcloud-app-${appName}-${appVersion}";
})
+190 −98

File changed.

Preview size limit exceeded, changes collapsed.

+190 −98

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ let packages = self:
        appName = pname;
        appVersion = data.version;
        license = appBaseDefs.${pname};
        inherit (data) url sha256 description homepage;
        unpack = false;
        inherit (data) url hash description homepage;
      }) {};

  } // lib.mapAttrs (type: pkgs: