Skip to content

Commit

Permalink
nextcloudPackages: update
Browse files Browse the repository at this point in the history
We no longer use fetchzip because nc4nix no longer unpacks the tarball
before computing the hash.
  • Loading branch information
dotlambda committed Aug 1, 2024
1 parent 73eb537 commit 2c1d58e
Show file tree
Hide file tree
Showing 4 changed files with 391 additions and 207 deletions.
19 changes: 9 additions & 10 deletions pkgs/build-support/fetchnextcloudapp/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchzip, applyPatches, lib, ... }:
{ fetchurl, fetchzip, applyPatches, lib, ... }:
{ url
, hash ? ""
, sha256 ? ""
Expand All @@ -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;
Expand All @@ -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}";
})
Loading

0 comments on commit 2c1d58e

Please sign in to comment.