Skip to content
Open
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
13 changes: 13 additions & 0 deletions apps/site/snippets/en/download/zeroinstall.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Get 0install:
${props.os === 'WIN' ? 'winget install 0install' : 'curl -O https://get.0install.net/0install.sh && chmod +x 0install.sh\n./0install.sh install home'}
${props.os === 'WIN' ? '\n# Download specific Node.js version:\n0install download https://apps.0install.net/javascript/node.xml --version=' + props.release.version + ' --pin\n' : ''}
# Add Node.js and NPM to PATH:
0install add node https://apps.0install.net/javascript/node.xml${props.os === 'WIN' ? '' : ' --version=' + props.release.version}
Comment thread
avivkeller marked this conversation as resolved.
0install add npm https://apps.0install.net/javascript/node.xml --command=npm${props.os === 'WIN' ? '' : ' --version=' + props.release.version}
0install add npx https://apps.0install.net/javascript/node.xml --command=npx${props.os === 'WIN' ? '' : ' --version=' + props.release.version}
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
bastianeicher marked this conversation as resolved.
Comment thread
avivkeller marked this conversation as resolved.

# Enable global package installation:
npm config set prefix ${props.os === 'WIN' ? '"$env:appdata\\npm"' : '~/.npm-global'}
Comment on lines +9 to +10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? Why does 0install require changing npm configs?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, npm install -g ... installs packages into lib/node_modules/ relative to the Node.js installation directory.

0install treats extracted archive directories as immutable. It stores them in a content-addressable store (conceptually similar to PNPM) and makes them read-only (chmod -R a-w) to ensure their contents cannot be modified.

As a result, running npm install -g somepackage would fail with an error like:

npm error code EACCES
npm error syscall mkdir
npm error path /home/bastian/.cache/0install.net/implementations/sha256new_YB5SJCPHCJGA6PZ7HPEFM3OFEZ3N7S6PKTMDTTTVL3DFEUTPQDMQ/lib/node_modules/somepackage

The npm config set prefix ... command-line isn't strictly necessary, but it helps users avoid this pitfall.


# Make globally installed commands runnable (add to your profile to persist):
${props.os === 'WIN' ? '$env:PATH = "$env:appdata\\npm;$env:PATH"' : 'export PATH=~/.npm-global/bin:$PATH'}
3 changes: 2 additions & 1 deletion apps/site/types/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export type InstallationMethod =
| 'DOCKER'
| 'CHOCO'
| 'N'
| 'ASDF';
| 'ASDF'
| 'ZEROINSTALL';
export type PackageManager = 'NPM' | 'YARN' | 'PNPM';

// Items with a pipe/default value mean that they are auto inferred
Expand Down
10 changes: 10 additions & 0 deletions apps/site/util/download/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@
},
"url": "https://asdf-vm.com/guide/getting-started.html",
"info": "layouts.download.codeBox.platformInfo.asdf"
},
{
"id": "ZEROINSTALL",
"icon": "ZeroInstall",
"name": "0install",
"compatibility": {
"os": ["WIN", "MAC", "LINUX"]
},
"url": "https://0install.net/",
"info": "layouts.download.codeBox.platformInfo.zeroinstall"
}
],
"packageManagers": [
Expand Down
3 changes: 2 additions & 1 deletion packages/i18n/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@
"docker": "Docker is a containerization platform.",
"n": "\"n\" is a cross-platform Node.js version manager.",
"asdf": "\"asdf\" is a cross-platform version manager that supports multiple languages.",
"volta": "\"Volta\" is a cross-platform Node.js version manager."
"volta": "\"Volta\" is a cross-platform Node.js version manager.",
"zeroinstall": "0install is a cross-platform decentralized package manager."
}
}
},
Expand Down
11 changes: 10 additions & 1 deletion packages/ui-components/__design__/platform-logos.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ import {
Choco,
N,
Volta,
ZeroInstall,
} from '#ui/Icons/InstallationMethod';
import { Apple, Linux, Microsoft, AIX } from '#ui/Icons/OperatingSystem';

import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

const osIcons = [Apple, Linux, Microsoft, AIX];
const installMethodIcons = [Docker, Homebrew, NVM, Choco, N, Volta];
const installMethodIcons = [
Docker,
Homebrew,
NVM,
Choco,
N,
Volta,
ZeroInstall,
];

export const PlatformLogos: StoryObj = {
render: () => (
Expand Down
283 changes: 283 additions & 0 deletions packages/ui-components/src/Icons/InstallationMethod/ZeroInstall.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
// Ref: https://github.com/0install/docs/blob/master/docs/img/logo.svg
import type { FC, SVGProps } from 'react';
Comment thread
bastianeicher marked this conversation as resolved.

const ZeroInstall: FC<SVGProps<SVGSVGElement>> = props => (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
viewBox="0 0 68 68"
{...props}
>
<defs>
<radialGradient
xlinkHref="#zi-a"
id="zi-i"
cx={18.25}
cy={15.72}
r={29.99}
fx={18.25}
fy={15.72}
gradientTransform="matrix(8.11763 0 0 8.11781 60.57 576.47)"
gradientUnits="userSpaceOnUse"
/>
<radialGradient
xlinkHref="#zi-b"
id="zi-j"
cx={11.83}
cy={10.48}
r={32.66}
fx={11.83}
fy={10.48}
gradientTransform="scale(1.17954 .8478)"
gradientUnits="userSpaceOnUse"
/>
<radialGradient
xlinkHref="#zi-c"
id="zi-k"
cx={18.63}
cy={17.49}
r={40.69}
fx={18.93}
fy={17.81}
gradientTransform="scale(1.03682 .96449)"
gradientUnits="userSpaceOnUse"
/>
<radialGradient
xlinkHref="#zi-d"
id="zi-P"
cx={15.6}
cy={12.14}
r={43.53}
fx={15.6}
fy={12.14}
gradientTransform="matrix(8.11763 0 0 8.11781 60.57 576.47)"
gradientUnits="userSpaceOnUse"
/>
<radialGradient
xlinkHref="#zi-e"
id="zi-h"
cx={15.12}
cy={63.97}
r={12.29}
fx={15.12}
fy={63.97}
gradientTransform="scale(1.64399 .60828)"
gradientUnits="userSpaceOnUse"
/>
<linearGradient id="zi-f">
<stop offset={0} stopColor="#ff7834" stopOpacity={1} />
<stop offset={1} stopColor="#b51700" stopOpacity={1} />
</linearGradient>
<linearGradient id="zi-g">
<stop offset={0} stopColor="#01070b" stopOpacity={1} />
<stop offset={1} stopColor="#0a1618" stopOpacity={0} />
</linearGradient>
<linearGradient id="zi-e">
<stop offset={0} stopColor="#000" stopOpacity={1} />
<stop offset={1} stopColor="#000" stopOpacity={0} />
</linearGradient>
<linearGradient id="zi-a">
<stop offset={0} stopColor="#d3e9ff" stopOpacity={1} />
<stop offset={0.16} stopColor="#d3e9ff" stopOpacity={1} />
<stop offset={0.75} stopColor="#4074ae" stopOpacity={1} />
<stop offset={1} stopColor="#36486c" stopOpacity={1} />
</linearGradient>
<linearGradient id="zi-b">
<stop offset={0} stopColor="#fff" stopOpacity={1} />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
<linearGradient id="zi-c">
<stop offset={0} stopColor="#fff" stopOpacity={1} />
<stop offset={0.38} stopColor="#fefefe" stopOpacity={1} />
<stop offset={1} stopColor="#1d1d1d" stopOpacity={1} />
</linearGradient>
<linearGradient id="zi-d">
<stop offset={0} stopColor="#fff" stopOpacity={1} />
<stop offset={1} stopColor="#fff" stopOpacity={0.16494845} />
</linearGradient>
<linearGradient
xlinkHref="#zi-f"
id="zi-S"
x1={-544.24}
x2={-411.65}
y1={20.71}
y2={285.37}
gradientTransform="translate(813.38 675.39)"
gradientUnits="userSpaceOnUse"
/>
<linearGradient
xlinkHref="#zi-g"
id="zi-Q"
x1={304.29}
x2={307.14}
y1={718.08}
y2={973.79}
gradientUnits="userSpaceOnUse"
/>
<filter id="zi-R" colorInterpolationFilters="sRGB">
<feGaussianBlur stdDeviation={8.3} />
</filter>
</defs>
<g>
<path
fill="url(#zi-h)"
fillOpacity={1}
stroke="none"
d="M45.05 38.9a20.2 7.48 0 1 1-40.4 0 20.2 7.48 0 1 1 40.4 0"
transform="matrix(1.48825 0 0 1.85025 -6.56 -20.56)"
/>
<path
fill="url(#zi-i)"
fillOpacity={1}
fillRule="nonzero"
stroke="#39396c"
strokeMiterlimit={4}
strokeOpacity={1}
strokeWidth={8.11772}
d="M417.42 767.12c0 86.94-70.48 157.41-157.4 157.41-86.94 0-157.41-70.48-157.41-157.41 0-86.94 70.47-157.4 157.4-157.4s157.41 70.46 157.41 157.4z"
transform="translate(-17.66 -110.96)scale(.18333)"
/>
<path
fill="url(#zi-j)"
fillOpacity={1}
stroke="none"
d="M30.7 15.27a12.93 9.3 0 1 1-25.85 0 12.93 9.3 0 1 1 25.86 0"
opacity={0.421594}
transform="matrix(1.24408 0 0 1.48825 8.15 -5.27)"
/>
<g fill="#000" fillOpacity={0.71345} fillRule="nonzero" stroke="none">
<path d="M58.05 25.36c0 .38 0 0 0 0l-.8.9c-.48-.58-1.03-1.06-1.59-1.57l-1.22.18-1.12-1.26v1.56l.96.73.64.72.85-.96.64 1.2v1.2l-.96 1.08-1.75 1.2-1.33 1.33-.85-.96.42-1.08-.85-.97-1.43-3.06-1.22-1.39-.32.36.48 1.75.9 1.02a42 42 0 0 0 1.7 4.33c1.05 0 2.04-.1 3.08-.24v.84l-1.27 3.13-1.17 1.32-.96 2.05v3.37l.32 1.32-.53.6-1.17.72-1.22 1.03 1 1.14-1.38 1.2.27.78-2.07 2.35h-1.38l-1.17.72h-.75v-.96l-.32-1.93q-.6-1.8-1.27-3.6.01-1.33.1-2.65l.54-1.2-.75-1.45.06-1.98-1.01-1.14.5-1.66-.82-.93h-1.44l-.48-.54-1.43.9-.58-.66-1.33 1.14-2.71-3.07-1.07-2.52.96-1.45-.53-.6 1.17-2.77q1.45-1.77 2.97-3.48l1.81-.48 2.02-.24 1.38.36 1.97 1.98.69-.78.95-.12 1.81.6h1.38l.96-.84.43-.6-.96-.6-1.6-.12c-.44-.62-.85-1.26-1.38-1.8l-.53.23-.21 1.57-.96-1.09-.21-1.2-1.06-.84h-.43l1.06 1.2-.42 1.08-.85.24.53-1.08-.96-.48-.85-.96-1.6.36-.2.48-.96.6-.53 1.32-1.33.67-.58-.67h-.64v-2.16l1.38-.72h1.06l-.21-.84-.85-.85 1.44-.3.8-.9.63-1.08h1.17l-.32-.84.74-.48v.96l1.6.36 1.6-1.32.1-.6 1.38-.97c-.5.06-1 .1-1.49.24V9.66l.53-1.2h-.53l-1.17 1.08-.32.6.32.84-.53 1.44-.85-.48-.74-.84-1.17.84-.43-1.92 2.02-1.32v-.73l1.28-.84 2.02-.48 1.38.48 2.55.48-.64.72h-1.38l1.38 1.45 1.06-1.2.33-.53s4.07 3.65 6.4 7.64c2.33 4 3.42 8.71 3.42 9.67" />
<path d="m31.74 8.58-.11.72.74.48 1.28-.84L33 8.2l-.85.49z" />
<path d="m32.9 3.64-2.76-1.08-3.19.36L23.02 4l-.74.73 2.44 1.68v.96l-.96.96 1.28 2.53.85-.48 1.06-1.68a38 38 0 0 0 4.68-1.8z" />
<path d="m35.77 13.75-.42-1.08-.75.24.22 1.32z" />
<path d="m36.2 13.5-.21 1.45 1.17-.24.84-.84-.74-.72q-.38-.99-.85-1.93h-.64v.72l.43.48z" />
<path d="m20.47 36.36-.85-1.68-1.6-.36-.84-2.29-2.13.24-1.8-1.32-1.92 1.68v.27c-.58-.17-1.29-.19-1.8-.5l-.43-1.2v-1.33l-1.28.12.32-2.53H7.4l-.75.96-.74.36-1.06-.6-.1-1.32.2-1.44 1.6-1.2h1.27l.22-.73 1.59.36 1.17 1.45.21-2.41 2.02-1.68.74-1.8 1.5-.6.84-1.21 1.92-.36.95-1.45h-2.87l1.8-.84h1.28l1.81-.6.21-.72-.63-.6-.75-.24.21-.73-.53-1.08-1.27.48.21-.96-1.49-.84-1.17 2.04.11.72-1.17.49-.74 1.56-.32-1.44-2.02-.85-.32-1.08 2.66-1.56 1.17-1.08.1-1.33-.64-.36-.85-.12-.53 1.32-1.11.23A30.4 30.4 0 0 0 1.94 27.66c.06.25 1 1.73 1 1.73l2.23 1.32 2.23.6.96 1.2 1.48 1.09.85-.12.64.28v.2l-.85 2.28-.64.96.21.49-.53 1.8 1.92 3.49 1.9 1.68.86 1.2-.1 2.53.63 1.44-.64 2.77s-.05-.02.03.26 3.41 2.12 3.62 1.97l.4-.3-.22-.6.85-.85.32-.84 1.38-.48 1.06-2.65-.32-.72.75-1.08 1.6-.36.84-1.93-.21-2.4 1.27-1.8.22-1.81q-2.62-1.31-5.21-2.65" />
<path d="m18.13 9.06 1.06.72h.86v-.84l-1.07-.48z" />
<path d="m15.37 8.1-.53 1.32h1.06l.53-1.2q.69-.5 1.38-.97l1.07.36L21 9.06l1.07-.97-1.17-.48-.54-1.08-2.02-.24-.1-.6-.96.24-.42.84-.53-1.08-.22.48.11 1.2z" />
<path d="m19.2 5.09.53-.48 1.06-.24c.73-.36 1.46-.6 2.23-.85l-.42-.72-1.38.2-.64.64-1.07.16-.95.45-.46.22-.29.38z" />
<path d="m21 16.51.64-.96-.96-.72z" />
</g>
<g
fill="url(#zi-k)"
fillOpacity={1}
fillRule="nonzero"
stroke="none"
strokeWidth={1.01795}
transform="translate(-6.68 -5.23)scale(1.46201)"
>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="M44.07 20.71c0 .27 0 0 0 0l-.54.62c-.34-.4-.71-.72-1.1-1.07l-.83.12-.76-.86v1.07l.65.5.44.49.58-.66.44.82v.83l-.66.74-1.2.82-.9.9-.59-.66.3-.74-.59-.65-.98-2.1-.84-.95-.22.25.33 1.2.62.7c.35 1 .7 1.98 1.16 2.95q1.06-.01 2.11-.16v.57l-.87 2.14-.8.9-.66 1.4v2.31l.22.9-.36.42-.8.5-.84.7.7.77-.95.83.18.53-1.42 1.6h-.94l-.8.5h-.51v-.66l-.22-1.32-.87-2.46q.01-.9.07-1.81l.37-.83-.51-.98.03-1.36-.69-.78.35-1.13-.56-.64h-.99l-.32-.37-.98.61-.4-.45-.91.78-1.86-2.1-.72-1.72.65-.99-.36-.41.8-1.9q.98-1.21 2.03-2.38l1.24-.33 1.38-.16.94.24 1.35 1.36.47-.53.66-.09 1.23.41h.95l.65-.57.3-.41-.66-.41-1.1-.09c-.3-.42-.58-.86-.94-1.23l-.36.16-.15 1.07-.65-.74-.15-.82-.72-.57h-.3l.73.82-.29.74-.58.16.36-.74-.65-.33-.58-.65-1.1.24-.14.33-.65.41-.37.9-.9.46-.4-.45h-.44v-1.48l.95-.5h.72l-.14-.57-.58-.58.98-.2.54-.62.44-.74h.8l-.22-.58.5-.33v.66l1.1.25 1.09-.9.07-.42.95-.66c-.35.05-.69.08-1.02.17v-.74l.36-.83h-.36l-.8.74-.22.42.22.57-.36.99-.59-.33-.5-.58-.8.58-.3-1.32 1.39-.9v-.5l.87-.57 1.38-.33.94.33 1.75.33-.44.5h-.94l.94.98.73-.82.22-.37s2.79 2.5 4.38 5.24c1.6 2.73 2.34 5.95 2.34 6.6"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m26.07 9.24-.07.49.5.33.88-.58-.44-.5-.58.34z"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m26.87 5.86-1.9-.74-2.17.25-2.7.74-.5.5 1.67 1.14v.66l-.65.66.87 1.73.58-.33.73-1.15c1.12-.35 2.13-.74 3.2-1.24z"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path fill="url(#zi-k)" d="m28.83 12.77-.29-.74-.5.17.14.9z" />
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m29.12 12.6-.14 1 .8-.17.58-.57-.51-.5q-.26-.67-.58-1.31h-.44v.49l.3.33z"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m18.37 28.24-.59-1.15-1.09-.25-.58-1.56-1.45.16-1.24-.9-1.3 1.15v.18c-.4-.11-.89-.13-1.24-.34l-.3-.83v-.9l-.87.08.22-1.73h-.5l-.51.66-.51.25-.73-.41-.07-.9.14-1 1.1-.82h.86l.15-.5 1.09.26.8.98.15-1.64 1.38-1.15.5-1.24 1.02-.41.58-.82 1.31-.25.66-.99h-1.97l1.24-.57h.87l1.24-.42.14-.49-.43-.4-.51-.17.14-.5-.36-.74-.87.33.14-.66-1.01-.57-.8 1.4.07.49-.8.33-.51 1.07-.22-.99-1.38-.58-.22-.74 1.82-1.07.8-.74.07-.9-.43-.25-.58-.08-.37.9-.76.16c-2 1.84-6.03 5.81-6.97 13.3.04.18.68 1.19.68 1.19l1.53.9 1.52.42.66.82 1.02.74.58-.08.43.2v.13l-.58 1.56-.43.66.14.33-.36 1.23 1.3 2.39 1.31 1.15.59.82-.08 1.73.44.99-.44 1.89s-.03-.01.02.18 2.33 1.45 2.48 1.34l.27-.2-.15-.41.58-.58.22-.58.94-.33.73-1.8-.22-.5.51-.74 1.1-.25.57-1.31-.14-1.65.87-1.23.15-1.24-3.57-1.8"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path fill="url(#zi-k)" d="m16.77 9.56.72.5h.58v-.58l-.72-.33z" />
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m14.88 8.9-.37.91h.73L15.6 9q.47-.34.95-.66l.72.25 1.46.98.73-.65-.8-.33-.37-.74-1.38-.17-.07-.4-.66.16-.29.57-.36-.74-.15.33.08.82z"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path
fill="url(#zi-k)"
d="m17.5 6.85.36-.33.72-.16c.5-.25 1-.4 1.53-.58l-.29-.5-.94.14-.44.44-.73.1-.65.31-.32.16-.2.26z"
/>
</g>
</g>
<g fill="url(#zi-k)">
<g fill="url(#zi-k)">
<path fill="url(#zi-k)" d="m18.73 14.67.43-.66-.65-.5z" />
</g>
</g>
</g>
<path
fill="none"
stroke="url(#zi-P)"
strokeMiterlimit={4}
strokeOpacity={1}
strokeWidth={8.11772}
d="M409.43 767.12c0 82.52-66.9 149.42-149.41 149.42-82.52 0-149.42-66.9-149.42-149.42S177.5 617.7 260.02 617.7c82.5 0 149.4 66.89 149.4 149.4z"
transform="translate(-17.66 -110.96)scale(.18333)"
/>
</g>
<g>
<path
fill="url(#zi-Q)"
fillOpacity={1}
stroke="none"
d="m205.65 717.3 127.5 57.54L150.84 887l186.41 26.82-26.5 48.28 145.97-65.06-57.83-76.97-25.23 34.54-88.1 5.72 118.48-104.7-135.07-31.4z"
filter="url(#zi-R)"
transform="translate(-17.66 -110.96)scale(.18333)"
/>
<path
fill="#000"
fillOpacity={1}
stroke="none"
d="m237.5 727.9 123.33 36.78-170.2 116.42-42.4-5.01 5.89 18.75 177.44 35.22-19.35 21.58 3.89 20.07 144.65-68.97 1.39-17.57-189.32-24.42 141.86-102.59-1.18-15.4-98.25-14.51-112.51-11.72Z"
transform="translate(-17.66 -110.96)scale(.18333)"
/>
<path
fill="url(#zi-S)"
fillOpacity={1}
stroke="#fff"
strokeDasharray="none"
strokeLinecap="round"
strokeLinejoin="miter"
strokeMiterlimit={4}
strokeOpacity={1}
strokeWidth={5.2}
d="m207.89 715.75 153.55 32.8L154.84 875l186.4 26.82-26.5 48.28 145.97-65.06-57.83-76.97-25.23 34.54-112.38 1.43 142.76-100.42-196.4-32.29z"
transform="translate(-17.66 -110.96)scale(.18333)"
/>
</g>
</svg>
);

export default ZeroInstall;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ import Homebrew from '#ui/Icons/InstallationMethod/Homebrew';
import N from '#ui/Icons/InstallationMethod/N';
import NVM from '#ui/Icons/InstallationMethod/NVM';
import Volta from '#ui/Icons/InstallationMethod/Volta';
import ZeroInstall from '#ui/Icons/InstallationMethod/ZeroInstall';

export { Choco, Docker, FNM, Homebrew, N, NVM, Volta };
export { Choco, Docker, FNM, Homebrew, N, NVM, Volta, ZeroInstall };