Skip to content

Commit

Permalink
can build with navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesGitH committed Apr 1, 2024
1 parent b642cf2 commit c8c03cb
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 51 deletions.
2 changes: 1 addition & 1 deletion dependencies/svelte-navbar
50 changes: 44 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,64 @@
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;

in rec {
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 = ''
Expand All @@ -50,6 +85,9 @@

shell = pkgs.mkShell {
buildInputs = with pkgs; [ nodejs git ];
shellHook = ''
# yarn install
'';
};

defaultPackage = packages.website;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions result
88 changes: 44 additions & 44 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c8c03cb

Please sign in to comment.