summaryrefslogtreecommitdiff
path: root/pkgs/unofficial-homestuck-collection/phantomjs.patch
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-07-17 16:09:52 -0400
committerFreya Murphy <freya@freyacat.org>2025-07-17 16:12:37 -0400
commit647af34808ba8a5f7c33306091c32e9f62016bde (patch)
tree79a9cc96af8363757c4e3678e1aee38ad4b427fb /pkgs/unofficial-homestuck-collection/phantomjs.patch
parentfix hyprlock fade (diff)
downloaddotfiles-nix-647af34808ba8a5f7c33306091c32e9f62016bde.tar.gz
dotfiles-nix-647af34808ba8a5f7c33306091c32e9f62016bde.tar.bz2
dotfiles-nix-647af34808ba8a5f7c33306091c32e9f62016bde.zip
unofficial-homestuck-collection: no longer app image
Diffstat (limited to 'pkgs/unofficial-homestuck-collection/phantomjs.patch')
-rw-r--r--pkgs/unofficial-homestuck-collection/phantomjs.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/unofficial-homestuck-collection/phantomjs.patch b/pkgs/unofficial-homestuck-collection/phantomjs.patch
new file mode 100644
index 0000000..e59a89a
--- /dev/null
+++ b/pkgs/unofficial-homestuck-collection/phantomjs.patch
@@ -0,0 +1,36 @@
+406,416c406
+< if (!downloadSpec) {
+< console.error(
+< 'Unexpected platform or architecture: ' + getTargetPlatform() + '/' + getTargetArch() + '\n' +
+< 'It seems there is no binary available for your platform/architecture\n' +
+< 'Try to install PhantomJS globally')
+< exit(1)
+< }
+<
+< var downloadUrl = downloadSpec.url
+< var downloadedFile
+<
+---
+> var downloadedFile = "phantomjs.tar.bz2"
+418,436c408
+< // Can't use a global version so start a download.
+< var tmpPath = findSuitableTempDirectory()
+< var fileName = downloadUrl.split('/').pop()
+< downloadedFile = path.join(tmpPath, fileName)
+<
+< if (fs.existsSync(downloadedFile)) {
+< console.log('Download already available at', downloadedFile)
+< return verifyChecksum(downloadedFile, downloadSpec.checksum)
+< }
+< return false
+< }).then(function (verified) {
+< if (verified) {
+< return downloadedFile
+< }
+<
+< // Start the install.
+< console.log('Downloading', downloadUrl)
+< console.log('Saving to', downloadedFile)
+< return requestBinary(getRequestOptions(), downloadedFile)
+---
+> return downloadedFile