Skip to content

Commit

Permalink
remove oci archive demo from frontpage
Browse files Browse the repository at this point in the history
no longer works (tabs use nixery now), and a bit contrived. not worth
being front and center, we have a lot of demos already.

along the way, remove a few broken nixery.dev references.
  • Loading branch information
vito committed Nov 28, 2022
1 parent 865e667 commit 17282c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 55 deletions.
6 changes: 3 additions & 3 deletions demos/addrs.bass
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
;
; starts the two servers, waits for the ports to be ready, and resolves to
; a string using the given template
(run (from (linux/nixery.dev/shell/curl)
($ curl -s (addr hello :http "http://$host:$port"))
($ curl -s (addr world :http "http://$host:$port"))))))
(run (from (linux/alpine)
($ wget -O- (addr hello :http "http://$host:$port"))
($ wget -O- (addr world :http "http://$host:$port"))))))
4 changes: 2 additions & 2 deletions docs/lit/bassics.lit
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ that allow it to do a lot with a little.
}{{{
(defn echo [msg]
(let [server (http-server msg)]
(from (linux/nixery.dev/shell/curl)
($ curl -s (addr server :http "http://$host:$port")))))
(from (linux/alpine)
($ wget -O- (addr server :http "http://$host:$port")))))

(echo "Hello, world!")
}}}{
Expand Down
53 changes: 3 additions & 50 deletions docs/lit/index.lit
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ release}{https://github.com/vito/bass/releases/latest} and skim the
}{{{
(defn echo [msg]
(let [server (http-server msg)]
(from (linux/nixery.dev/shell/curl)
($ curl -s (addr server :http "http://$host:$port")))))
(from (linux/alpine)
($ wget -O- (addr server :http "http://$host:$port")))))

(echo "Hello, world!")
}}}{
Expand Down Expand Up @@ -180,7 +180,7 @@ release}{https://github.com/vito/bass/releases/latest} and skim the
provenance:
}{{{
(let [repro (mkfile ./file.json (json built))]
(from (nixery.dev/gh)
(from (linux/nixery.dev/gh)
($ gh release create v0.0.1 $repro)))
}}}

Expand Down Expand Up @@ -223,53 +223,6 @@ release}{https://github.com/vito/bass/releases/latest} and skim the
the \code{bass.lock} file in-place.
}

\demo-literate{building images}{
Bass eliminates the need for one-off \code{Dockerfiles} and toilsome image
registry push/pull.

You just write thunks instead!
}{{{
(def wget
(from (linux/alpine)
($ apk add wget)))

(-> (from wget
($ wget --version))
(read :lines)
next)
}}}{
\link{Nix}{https://nixos.org} fans are probably seething right now. This
isn't \t{hermetic} at all! The version of \code{wget} is a total wildcard!
What if it changes? The house of cards could come crumbling down!

Worry not: you can use any command you want to build images. You can use
\code{nix build} or any other tool to create an \link{OCI image
tarball}{https://github.com/opencontainers/image-spec/blob/main/image-layout.md}
and then use that image for other thunks.
}{{{
(use (.git (linux/alpine/git))
; a module for doing cached nix builds
(git:github/vito/tabs/ref/main/nix.bass))

; an image with wget installed
(def image
{:file (nix:result
(cd git:github/vito/tabs/ref/main/
($ nix build ".#wget"))
./image.tar)
:platform {:os "linux"}
:tag "latest"})

(-> (from image
($ wget --version))
(read :lines)
next)
}}}{
Bass does everything it can to support \t{hermetic} thunks, but it stops
short of enforcing the practice. If Nix isn't worth the investment yet, YOLO
and \code{apt-get} away and fix it when it breaks.
}

\demo-literate{webhook-driven CI/CD}{
\link{Bass Loop}{https://loop.bass-lang.org} is a public service for calling
Bass code in response to webhooks.
Expand Down

0 comments on commit 17282c2

Please sign in to comment.