From c8c03cb74538aa066604edebcd1257964b21036a Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:59:57 +0200 Subject: [PATCH] can build with navbar --- dependencies/svelte-navbar | 2 +- flake.nix | 50 +++++++++++++++++++--- package.json | 1 + result | 1 + yarn.lock | 88 +++++++++++++++++++------------------- 5 files changed, 91 insertions(+), 51 deletions(-) create mode 120000 result diff --git a/dependencies/svelte-navbar b/dependencies/svelte-navbar index 31baf14..6732ea9 160000 --- a/dependencies/svelte-navbar +++ b/dependencies/svelte-navbar @@ -1 +1 @@ -Subproject commit 31baf1491ae1e3a9c74e82626bd23cfd2d9979d0 +Subproject commit 6732ea92f9b77772b32cee4a05132d64bc362209 diff --git a/flake.nix b/flake.nix index 32d4afa..6bd58e8 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,34 @@ nodejs = pkgs.nodejs; esbuild = pkgs-stable.esbuild; + svelte-navbar-src = pkgs.fetchFromGitHub { + owner = "hannesgith"; + repo = "svelte-navbar"; + rev = "0.0.123"; + sha256 = "sha256-naxceQenpoSbjlYLaLlYxJElddk0qplXp7K+4KIzA8M="; + }; + + svelte-navbar = pkgs.mkYarnPackage { + name = "svelte-navbar"; + src = svelte-navbar-src; + buildInputs = with pkgs; [ nodejs git ]; + configurePhase = '' + cp -r $node_modules node_modules + chmod -R +w node_modules + ln -sf ${esbuild}/bin/esbuild node_modules/esbuild/bin/esbuild + ln -sf ${esbuild}/bin/esbuild node_modules/esbuild-linux-64/bin/esbuild + ''; + buildPhase = '' + # yarn install --offline --frozen-lockfile + yarn --offline --frozen-lockfile build + ''; + installPhase = '' + mkdir -p $out + cp -r . $out + ''; + distPhase = "true"; + }; + # node2nixOutput = import ./default.nix { inherit pkgs nodejs system; }; # nodeDeps = node2nixOutput.nodeDependencies; @@ -22,22 +50,29 @@ packages = rec { website = pkgs.mkYarnPackage { name = "website"; + src = self; buildInputs = with pkgs; [ nodejs git ]; configurePhase = '' - for localDir in build node_modules; do - if [[ -d $localDir || -L $localDir ]]; then - echo "$localDir dir present. Removing." - rm -rf $localDir - fi - done + # for localDir in build node_modules; do + # if [[ -d $localDir || -L $localDir ]]; then + # echo "$localDir dir present. Removing." + # rm -rf $localDir + # fi + # done + + ln -sf ${svelte-navbar} dependencies/svelte-navbar cp -r $node_modules node_modules chmod -R +w node_modules + # ls -la src/lib + # ls -la dependencies + # ls -la . ln -sf ${esbuild}/bin/esbuild node_modules/esbuild/bin/esbuild ln -sf ${esbuild}/bin/esbuild node_modules/esbuild-linux-64/bin/esbuild ''; buildPhase = '' + # yarn install --offline --frozen-lockfile yarn --offline --frozen-lockfile build ''; installPhase = '' @@ -50,6 +85,9 @@ shell = pkgs.mkShell { buildInputs = with pkgs; [ nodejs git ]; + shellHook = '' + # yarn install + ''; }; defaultPackage = packages.website; diff --git a/package.json b/package.json index 2ee6bc2..0bf769d 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "dependencies": { "flubber2": "^0.4.9", "svelte-glitch": "^0.0.3", + "svelte-i18n": "^4.0.0", "svelte-navbar": "^0.0.122", "svelte-scrolling-plus": "^1.2.3", "svelte-vertical-timeline": "^0.0.2" diff --git a/result b/result new file mode 120000 index 0000000..8b3a3a7 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/7pvfzcdzd9isvd3089zzzrb0z903q19w-website \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b35d282..cb42d70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -274,44 +274,44 @@ resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz" integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== -"@formatjs/ecma402-abstract@1.11.4": - version "1.11.4" - resolved "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz" - integrity sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw== +"@formatjs/ecma402-abstract@1.18.2": + version "1.18.2" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz#bf103712a406874eb1e387858d5be2371ab3aa14" + integrity sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA== dependencies: - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/intl-localematcher" "0.5.4" + tslib "^2.4.0" -"@formatjs/fast-memoize@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz" - integrity sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg== +"@formatjs/fast-memoize@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-2.2.0.tgz#33bd616d2e486c3e8ef4e68c99648c196887802b" + integrity sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA== dependencies: - tslib "^2.1.0" + tslib "^2.4.0" -"@formatjs/icu-messageformat-parser@2.1.0": - version "2.1.0" - resolved "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz" - integrity sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw== +"@formatjs/icu-messageformat-parser@2.7.6": + version "2.7.6" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.7.6.tgz#3d69806de056d2919d53dad895a5ff4851e4e9ff" + integrity sha512-etVau26po9+eewJKYoiBKP6743I1br0/Ie00Pb/S/PtmYfmjTcOn2YCh2yNkSZI12h6Rg+BOgQYborXk46BvkA== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/icu-skeleton-parser" "1.3.6" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.18.2" + "@formatjs/icu-skeleton-parser" "1.8.0" + tslib "^2.4.0" -"@formatjs/icu-skeleton-parser@1.3.6": - version "1.3.6" - resolved "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz" - integrity sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg== +"@formatjs/icu-skeleton-parser@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.0.tgz#5f3d3a620c687d6f8c180d80d1241e8f213acf79" + integrity sha512-QWLAYvM0n8hv7Nq5BEs4LKIjevpVpbGLAJgOaYzg9wABEoX1j0JO1q2/jVkO6CVlq0dbsxZCngS5aXbysYueqA== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.18.2" + tslib "^2.4.0" -"@formatjs/intl-localematcher@0.2.25": - version "0.2.25" - resolved "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz" - integrity sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA== +"@formatjs/intl-localematcher@0.5.4": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz#caa71f2e40d93e37d58be35cfffe57865f2b366f" + integrity sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g== dependencies: - tslib "^2.1.0" + tslib "^2.4.0" "@humanwhocodes/config-array@^0.11.14": version "0.11.14" @@ -1757,15 +1757,15 @@ inherits@2: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -intl-messageformat@^9.13.0: - version "9.13.0" - resolved "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz" - integrity sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw== +intl-messageformat@^10.5.3: + version "10.5.11" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.5.11.tgz#95d6a3b0b303f924d5d8c3f8d3ad057d1dc73c64" + integrity sha512-eYq5fkFBVxc7GIFDzpFQkDOZgNayNTQn4Oufe8jw6YY6OHVw70/4pA3FyCsQ0Gb2DnvEJEMmN2tOaXUGByM+kg== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/fast-memoize" "1.2.1" - "@formatjs/icu-messageformat-parser" "2.1.0" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.18.2" + "@formatjs/fast-memoize" "2.2.0" + "@formatjs/icu-messageformat-parser" "2.7.6" + tslib "^2.4.0" is-binary-path@~2.1.0: version "2.1.0" @@ -2340,16 +2340,16 @@ svelte-hmr@^0.15.3: resolved "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz" integrity sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ== -svelte-i18n@^3.6.0: - version "3.7.4" - resolved "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz" - integrity sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q== +svelte-i18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/svelte-i18n/-/svelte-i18n-4.0.0.tgz#6d892802fb79540267b2250f233afc6d29aadd28" + integrity sha512-4vivjKZADUMRIhTs38JuBNy3unbnh9AFRxWFLxq62P4NHic+/BaIZZlAsvqsCdnp7IdJf5EoSiH6TNdItcjA6g== dependencies: cli-color "^2.0.3" deepmerge "^4.2.2" esbuild "^0.19.2" estree-walker "^2" - intl-messageformat "^9.13.0" + intl-messageformat "^10.5.3" sade "^1.8.1" tiny-glob "^0.2.9" @@ -2458,9 +2458,9 @@ tslib@^1.8.1: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1: +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: version "2.6.2" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: