Skip to content

Commit 77d6eeb

Browse files
committed
Fix nix build args for website
1 parent 409f7d1 commit 77d6eeb

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Mock databases
2-
sdow/sdow.sqlite
3-
sdow/searches.sqlite
2+
sdow.sqlite
3+
searches.sqlite
4+
5+
# Nix build result
6+
/result
47

58
# Byte-compiled / optimized / DLL files
69
__pycache__/

flake.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
pkgs = import nixpkgs {system = "x86_64-linux";};
1010
sdow-website = {lang ? null, wikipediaApiUrl ? null, sdowApiUrl ? null, sdowUserAgent ? null }:
1111
let extraArgs = {} //
12-
(if wikipediaApiUrl == null then {VITE_WIKIPEDIA_API_URL=wikipediaApiUrl;} else
13-
if lang == null then {VITE_WIKIPEDIA_API_URL="https://${lang}.wikipedia.org/w/api.php";} else {}) //
14-
(if sdowApiUrl == null then {VITE_SDOW_API_URL=sdowApiUrl;} else {}) //
15-
(if sdowUserAgent == null then {VITE_SDOW_USER_AGENT=sdowUserAgent;} else {});
12+
(if wikipediaApiUrl != null then {VITE_WIKIPEDIA_API_URL=wikipediaApiUrl;} else {}) //
13+
(if lang != null then {VITE_WIKIPEDIA_API_URL="https://${lang}.wikipedia.org/w/api.php";} else {}) //
14+
(if sdowApiUrl != null then {VITE_SDOW_API_URL=sdowApiUrl;} else {}) //
15+
(if sdowUserAgent != null then {VITE_SDOW_USER_AGENT=sdowUserAgent;} else {});
1616
in pkgs.buildNpmPackage ({
1717
name = "sdow";
1818
buildInputs = with pkgs; [

website/src/resources/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const SDOW_API_URL_DEV = 'http://127.0.0.1:5000';
22
const SDOW_API_URL_PROD = 'https://api.sixdegreesofwikipedia.com';
33

44
export const SDOW_API_URL = import.meta.env.VITE_SDOW_API_URL ??
5-
import.meta.env.NODE_ENV === 'production' ? SDOW_API_URL_PROD : SDOW_API_URL_DEV;
5+
(import.meta.env.NODE_ENV === 'production' ? SDOW_API_URL_PROD : SDOW_API_URL_DEV);
66

77
export const WIKIPEDIA_API_URL = import.meta.env.VITE_WIKIPEDIA_API_URL ?? 'https://en.wikipedia.org/w/api.php';
88

0 commit comments

Comments
 (0)