diff options
Diffstat (limited to 'pkgs/servers/mastodon/update.sh')
-rwxr-xr-x | pkgs/servers/mastodon/update.sh | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/pkgs/servers/mastodon/update.sh b/pkgs/servers/mastodon/update.sh index be06f52207d04..7d53845a8cba1 100755 --- a/pkgs/servers/mastodon/update.sh +++ b/pkgs/servers/mastodon/update.sh @@ -50,7 +50,7 @@ if [[ -z "$REVISION" ]]; then REVISION="$VERSION" fi -rm -f gemset.nix yarn.nix version.nix version.patch source.nix package.json +rm -f gemset.nix version.nix source.nix TARGET_DIR="$PWD" @@ -78,21 +78,6 @@ FETCHED_SOURCE_DIR=$(grep '^path is' $WORK_DIR/nix-prefetch-git.out | sed 's/^pa echo "Creating version.nix" echo \"$VERSION\" | sed 's/^"v/"/' > version.nix -echo "Creating source.nix" -# yarn2nix and mkYarnPackage want the version to be present in -# package.json. Mastodon itself does not include the version in -# package.json but at least one fork (Soapbox) does. -if [ $(jq .version $FETCHED_SOURCE_DIR/package.json) == "null" ]; then - mkdir $WORK_DIR/a $WORK_DIR/b - cp $FETCHED_SOURCE_DIR/package.json $WORK_DIR/a - cd $WORK_DIR - jq "{version:$(cat $TARGET_DIR/version.nix)} + ." a/package.json > b/package.json - diff -Naur --label a/package.json --label b/package.json a b > $TARGET_DIR/version.patch || true - rm -rf a b tmp - cd $TARGET_DIR - PATCHES="$PATCHES ./version.patch " -fi - cat > source.nix << EOF # This file was generated by pkgs.mastodon.updateScript. { fetchgit, applyPatches }: let @@ -111,11 +96,3 @@ SOURCE_DIR="$(nix-build --no-out-link -E '(import <nixpkgs> {}).callPackage ./so echo "Creating gemset.nix" bundix --lockfile="$SOURCE_DIR/Gemfile.lock" --gemfile="$SOURCE_DIR/Gemfile" echo "" >> $TARGET_DIR/gemset.nix # Create trailing newline to please EditorConfig checks - -echo "Creating yarn.nix" -cp -r $SOURCE_DIR/* $WORK_DIR -chmod -R u+w $WORK_DIR -cd $WORK_DIR -yarn2nix > $TARGET_DIR/yarn.nix -sed "s/https___.*_//g" -i $TARGET_DIR/yarn.nix -cp $WORK_DIR/package.json $TARGET_DIR |