Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ package-lock.json
# AI Agent guidelines (local only)
AGENTS.md
release-notes.md
opennow-stable/result
result
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,54 @@ Current packaging targets:
| Linux x64 | `AppImage`, `deb` |
| Linux ARM64 | `AppImage`, `deb` |

## Nix

You'll need to add this repo into your flake.nix:
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

opennow.url = "github:OpenCloudGaming/OpenNOW";
};

outputs = {
self,
nixpkgs,
opennow,
... }@inputs: {
};
}
```
Then add the package to your configuration:

```nix
# Home-manager
{
pkgs,
inputs,
...
}: {
home.packages = with pkgs; [
inputs.opennow.packages.${pkgs.system}.default
];
}
```

```nix
# Nixos configuraion
{
pkgs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [
inputs.opennow.packages.${pkgs.system}.default
];
}
```


### Develop Locally

From the repository root:
Expand Down Expand Up @@ -166,4 +214,4 @@ The active client in this repository is the Electron-based app in [`opennow-stab

## License

OpenNOW is licensed under the [MIT License](LICENSE).
OpenNOW is licensed under the [MIT License](LICENSE).
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 123 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
description = "Custom GeForce Now Client Named OpenNOW";

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; };
electron = pkgs.electron;

nativeDeps = [
pkgs.pkg-config
pkgs.python3
pkgs.gcc
pkgs.makeWrapper
pkgs.copyDesktopItems
];

runtimeDeps = [
pkgs.openssl
pkgs.zlib
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin (
with pkgs.darwin.apple_sdk.frameworks;
[
CoreGraphics
CoreVideo
AppKit
IOKit
]
);

in
{
packages.default = pkgs.buildNpmPackage {
pname = "opennow";
version = "1.0.0";

src = ./opennow-stable;

npmDepsHash = "sha256-rd6DcBubFSl2MFWdkVlj+2WGI7vxhr361sMzyjcrst0=";

ELECTRON_SKIP_BINARY_DOWNLOAD = "1";

nativeBuildInputs = nativeDeps;
buildInputs = runtimeDeps;

desktopItems = [
(pkgs.makeDesktopItem {
name = "opennow";
exec = "opennow %U";
icon = "opennow";
desktopName = "OpenNOW";
genericName = "Cloud Gaming Client";
categories = [
"Game"
"Network"
];
terminal = false;
})
];

npmBuild = "npm run build";

installPhase = ''
runHook preInstall

mkdir -p $out/lib/opennow
cp -r . $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 ${electron}/bin/electron $out/bin/opennow \
--add-flags "$MAIN_SCRIPT" \
--set NODE_ENV production \
--inherit-argv0 \
--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
'';

meta = with pkgs.lib; {
description = "OpenCloudGaming OpenNOW Client";
homepage = "https://github.com/OpenCloudGaming/OpenNOW";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "opennow";
};
};

devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
shellHook = ''
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
'';
};
}
);
}
1 change: 1 addition & 0 deletions opennow-stable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ npm run dist
- `ws` is used in the main process for custom signaling behavior
- Authentication uses an OAuth PKCE flow with a localhost callback
- Settings are persisted locally through `electron-store`
- React Scan is available in renderer development builds for performance debugging
Loading
Loading