-
-
Notifications
You must be signed in to change notification settings - Fork 106
Add flake.nix again #343
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
Merged
Merged
Add flake.nix again #343
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
df73453
Merge pull request #234 from OpenCloudGaming/dev
zortos293 878d377
chore(release): prepare v0.3.3
github-actions[bot] 67ecbdd
Merge pull request #253 from OpenCloudGaming/dev
zortos293 2ace8ca
chore(release): prepare v0.3.4
github-actions[bot] 18190f2
Merge pull request #282 from OpenCloudGaming/dev
Kief5555 99d9cff
chore(release): prepare v1.3.5
github-actions[bot] 4d041a4
chore(release): prepare v0.3.5
github-actions[bot] 6918f58
Update README.md to include TestFlight badge and iOS packaging target
Kief5555 c022161
update AGENTS.md
capy-ai[bot] a34988a
Merge pull request #326 from OpenCloudGaming/dev
zortos293 8460b34
chore(release): prepare v0.3.6
github-actions[bot] bc7391c
Fix Nix npm packaging
f3dc069
Update
6c4f12d
Add nix instruction in README.md
dd3f55f
Delete symbolic Link
6586821
change requested changes and add desktop items
55ccfce
Update README.md
Kief5555 27af900
Update flake.nix
Kief5555 2972935
Update README.md
Kief5555 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 hidden or 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 |
|---|---|---|
|
|
@@ -43,3 +43,6 @@ opennow-stable/package-lock.json | |
| # AI Agent guidelines (local only) | ||
| AGENTS.md | ||
| release-notes.md | ||
|
|
||
| # Nix | ||
| result | ||
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,123 @@ | ||
| { | ||
| description = "Custom GeForce Now Client Named OpenNOW"; | ||
|
Kief5555 marked this conversation as resolved.
|
||
|
|
||
| inputs = { | ||
| nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
| flake-utils.url = "github:numtide/flake-utils"; | ||
| }; | ||
|
|
||
| outputs = | ||
| { | ||
| self, | ||
| nixpkgs, | ||
| flake-utils, | ||
| }: | ||
| flake-utils.lib.eachDefaultSystem ( | ||
| system: | ||
| let | ||
| pkgs = import nixpkgs { inherit system; }; | ||
| appPackage = builtins.fromJSON (builtins.readFile ./opennow-stable/package.json); | ||
| in | ||
| { | ||
| packages.default = pkgs.buildNpmPackage { | ||
| pname = "opennow"; | ||
| version = appPackage.version; | ||
|
|
||
| src = ./opennow-stable; | ||
|
|
||
| npmDepsHash = "sha256-iMoYLIydDGTHgm6eMdoXb65NcPFXfWcVztmvMRHmCJs="; | ||
| npmDepsFetcherVersion = 2; | ||
| makeCacheWritable = true; | ||
| forceGitDeps = true; | ||
|
|
||
| npmInstallFlags = [ | ||
| "--legacy-peer-deps" | ||
| "--no-audit" | ||
| ]; | ||
| npmFlags = [ | ||
| "--legacy-peer-deps" | ||
| "--no-audit" | ||
| ]; | ||
| npmCiFlags = [ | ||
| "--legacy-peer-deps" | ||
| "--no-audit" | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| pkgs.pkg-config | ||
| pkgs.python3 | ||
| pkgs.gcc | ||
| pkgs.makeWrapper | ||
| pkgs.copyDesktopItems | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| pkgs.openssl | ||
| pkgs.zlib | ||
| pkgs.electron | ||
| ]; | ||
|
|
||
| ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; | ||
|
|
||
| installPhase = '' | ||
| runHook preInstall | ||
|
|
||
| appdir="$TMPDIR/opennow-install" | ||
| mkdir -p "$appdir" "$out/lib/opennow" | ||
| if [ -f package.json ]; then | ||
| cp package.json "$appdir/" | ||
| fi | ||
| if [ -f package-lock.json ]; then | ||
| cp package-lock.json "$appdir/" | ||
| fi | ||
| for path in out dist dist-electron; do | ||
| if [ -e "$path" ]; then | ||
| cp -r "$path" "$appdir/" | ||
| fi | ||
| done | ||
| if [ -d node_modules ]; then | ||
| cp -r node_modules "$appdir/" | ||
| if [ -f "$appdir/package.json" ]; then | ||
| npm --prefix "$appdir" prune --omit=dev --no-audit --legacy-peer-deps | ||
| fi | ||
| fi | ||
| cp -r "$appdir"/. $out/lib/opennow | ||
|
|
||
| mkdir -p $out/bin | ||
| for path in "out/main/index.js" "dist/main/index.js" "dist-electron/main.js"; do | ||
| if [ -f "$out/lib/opennow/$path" ]; then | ||
| MAIN_SCRIPT="$out/lib/opennow/$path" | ||
| break | ||
| fi | ||
| done | ||
| : ''${MAIN_SCRIPT:="$out/lib/opennow"} | ||
|
|
||
| makeWrapper ${pkgs.electron}/bin/electron $out/bin/opennow \ | ||
| --add-flags "$MAIN_SCRIPT" \ | ||
| --set NODE_ENV production \ | ||
| --add-flags "--enable-features=WaylandWindowDecorations --platform-hint=auto" | ||
|
|
||
| mkdir -p $out/share/icons/hicolor/512x512/apps | ||
| if [ -f "src/renderer/src/assets/opennow-logo.png" ]; then | ||
| cp src/renderer/src/assets/opennow-logo.png $out/share/icons/hicolor/512x512/apps/opennow.png | ||
| fi | ||
| runHook postInstall | ||
| ''; | ||
| desktopItems = [ | ||
| (pkgs.makeDesktopItem { | ||
| name = "opennow"; | ||
| desktopName = "OpenNOW"; | ||
| genericName = "Custom GeForce Now Client Named OpenNOW"; | ||
| comment = "An open-source desktop client for GeForce NOW"; | ||
| exec = "opennow %U"; | ||
| icon = "opennow"; | ||
| keywords = [ "GFN" "GeForceNOW" "cloud" "gaming" ]; | ||
| startupWMClass = "opennow"; | ||
| startupNotify = true; | ||
| categories = [ "Game" "Network" ]; | ||
| }) | ||
| ]; | ||
| }; | ||
| } | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.