-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
follow: init at 0.0.1-alpha.13 #341356
Open
iosmanthus
wants to merge
14
commits into
NixOS:master
Choose a base branch
from
iosmanthus:init-follow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
−0
Open
follow: init at 0.0.1-alpha.13 #341356
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3995ea7
follow: init at 0.0.1-alpha.10
iosmanthus a1b4402
fix updateScript
iosmanthus 37104e0
nixfmt
iosmanthus 2da3873
chore: refine the url template of updateScript
iosmanthus 48e3d5d
Merge branch 'master' into init-follow
iosmanthus 179e482
Merge branch 'master' into init-follow
iosmanthus efd2bb3
Merge branch 'master' into init-follow
iosmanthus 200bef9
bump to 0.0.1-alpha.13
iosmanthus c2b0d91
Merge branch 'init-follow' of github.com:iosmanthus/nixpkgs into init…
iosmanthus 2cf180b
build from source
iosmanthus a7f39d5
Merge branch 'master' into init-follow
iosmanthus 09c8a3c
add production build vars
iosmanthus dcc6c01
refine expression structure & add comments for vite production config
iosmanthus beafa01
Merge branch 'master' into init-follow
iosmanthus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9116,6 +9116,12 @@ | |
githubId = 1817528; | ||
name = "Igor Polyakov"; | ||
}; | ||
iosmanthus = { | ||
email = "[email protected]"; | ||
github = "iosmanthus"; | ||
githubId = 16307070; | ||
name = "iosmanthus"; | ||
}; | ||
iquerejeta = { | ||
github = "iquerejeta"; | ||
githubId = 31273774; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
electron, | ||
fetchFromGitHub, | ||
imagemagick, | ||
lib, | ||
makeDesktopItem, | ||
makeWrapper, | ||
nodejs, | ||
pnpm, | ||
stdenv, | ||
}: | ||
stdenv.mkDerivation rec { | ||
pname = "follow"; | ||
|
||
version = "0.0.1-alpha.13"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "RSSNext"; | ||
repo = "Follow"; | ||
rev = "v${version}"; | ||
hash = "sha256-LCI+kUxrEFLDBZrgDnOu6UI3d6atm4JptNKhyob9PH4="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
nodejs | ||
pnpm.configHook | ||
makeWrapper | ||
imagemagick | ||
]; | ||
|
||
pnpmDeps = pnpm.fetchDeps { | ||
inherit pname version src; | ||
hash = "sha256-K8IM2kE7qhEBux4eta1ma/timSeljzf0MbOUeJ4JCIc="; | ||
}; | ||
|
||
env = { | ||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; | ||
|
||
# This environment variables inject the production Vite config at build time. | ||
# Copy from: | ||
# 1. https://github.com/RSSNext/Follow/blob/0745ac07dd2a4a34e4251c034678ace15c302697/.github/workflows/build.yml#L18 | ||
# 2. And logs in the corresponding GitHub Actions: https://github.com/RSSNext/Follow/actions/workflows/build.yml | ||
VITE_WEB_URL = "https://app.follow.is"; | ||
VITE_API_URL = "https://api.follow.is"; | ||
VITE_IMGPROXY_URL = "https://thumbor.follow.is"; | ||
VITE_SENTRY_DSN = "https://e5bccf7428aa4e881ed5cb713fdff181@o4507542488023040.ingest.us.sentry.io/4507570439979008"; | ||
VITE_BUILD_TYPE = "production"; | ||
VITE_POSTHOG_KEY = "phc_EZGEvBt830JgBHTiwpHqJAEbWnbv63m5UpreojwEWNL"; | ||
}; | ||
|
||
desktopItem = makeDesktopItem { | ||
name = "follow"; | ||
desktopName = "Follow"; | ||
comment = "Next generation information browser"; | ||
icon = "follow"; | ||
exec = "follow"; | ||
categories = [ "Utility" ]; | ||
mimeTypes = [ "x-scheme-handler/follow" ]; | ||
}; | ||
|
||
icon = src + "/resources/icon.png"; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
|
||
pnpm --offline electron-vite build --outDir=dist | ||
# Remove dev dependencies. | ||
pnpm --ignore-scripts prune --prod | ||
# Clean up broken symlinks left behind by `pnpm prune` | ||
find node_modules/.bin -xtype l -delete | ||
|
||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
mkdir -p $out/share/{applications,follow} | ||
cp -r . $out/share/follow | ||
rm -rf $out/share/follow/{.vscode,.github} | ||
|
||
makeWrapper "${electron}/bin/electron" "$out/bin/follow" \ | ||
--inherit-argv0 \ | ||
--add-flags --disable-gpu-compositing \ | ||
--add-flags $out/share/follow \ | ||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}" | ||
|
||
install -m 444 -D "${desktopItem}/share/applications/"* \ | ||
-t $out/share/applications/ | ||
|
||
for size in 16 24 32 48 64 128 256 512; do | ||
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps | ||
convert -background none -resize "$size"x"$size" ${icon} $out/share/icons/hicolor/"$size"x"$size"/apps/follow.png | ||
done | ||
|
||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
description = "Next generation information browser"; | ||
homepage = "https://github.com/RSSNext/Follow"; | ||
license = lib.licenses.gpl3Only; | ||
maintainers = with lib.maintainers; [ iosmanthus ]; | ||
platforms = [ "x86_64-linux" ]; | ||
mainProgram = "follow"; | ||
}; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a link pointing to where these magic variables are from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, these magic vars are copy from the upstream release workflow.