# Announcing ygg

**URL:** <https://discourse.julialang.org/t/announcing-ygg/54687>\
**Category:** Package Announcements\
**Created:** [February 5, 2021, 2:03pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687 "2021-02-05T14:03:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 5, 2021, 2:03pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/1 "2021-02-05T14:03:03Z")

</div>

# `ygg`

[`ygg`](https://github.com/fredrikekre/ygg) is a simple installer for using [BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl) built binaries from [Yggdrasil](https://github.com/JuliaPackaging/Yggdrasil) outside of Julia. Installing `ygg` is simple (see the [README](https://github.com/fredrikekre/ygg#installation-and-usage)), and then installing binaries is even simpler. Here is an example of adding the `fzf` fuzzy finder:

```shell
$ ygg install fzf

```

The list of binaries that is currently available (see [README](https://github.com/fredrikekre/ygg#available-binaries)) is just the ones I have used myself. Adding new ones is, generally, as simple as adding a line in the Makefile as in [this commit](https://github.com/fredrikekre/ygg/commit/285a7129471a443d3e93524c27755022854d87b7). Feel free to add your favorite program to the list and make a pull request!

#### Why?

Most binaries can of course be installed using system package managers, but here are some reasons for using `ygg` instead:

- There are A LOT of stuff available in Yggdrasil.
- If you are using Julia it is likely that you already have the binaries inside `.julia/artifacts/*` and `ygg` makes them usable outside Julia too.
- Versions available in system package managers are often outdated whereas in Yggdrasil, generally, the latest versions are built. For example, my system package manager gives me `git` version 2.7, but from Yggdrasil you get version 2.27.

* * *

I know this is not directly related to Julia, but I hope some of you might find this useful!

/Fredrik

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [February 5, 2021, 2:26pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/2 "2021-02-05T14:26:46Z")

</div>

> [@fredrikekre](#):
>
> For example, my system package manager gives me `git` version 2.7, but from Yggdrasil you get version 2.27.

For anyone else that misread this at first: `x.27` is a newer version than `x.7`. It’s not `x.2.7` after all (note the extra dot).

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [February 6, 2021, 10:10pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/3 "2021-02-06T22:10:07Z")

</div>

7 posts were split to a new topic: [Disgruntled with JLLs](https://discourse.julialang.org/t/disgruntled-with-jlls/54760)

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [February 5, 2021, 4:16pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/4 "2021-02-05T16:16:26Z")

</div>

Excellent! I think of this like a Linux distro or Homebrew but portable to Windows, macOS, Linux and FreeBSD, instead of being only for one of those kinds of systems. Conda is a little like this but they use different compilers for different architectures, so the results are less comparable across systems.

But unlike Linux distros aside from Nix, everything it installs is immutable and content-addressed. Yggdrasil also differs from Nix in that it supports more than just Linux and instead of building packages from source, binaries are prebuilt for each target platform and can simply be downloaded, unpacked, put in the right place and used without compilation.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [February 6, 2021, 10:36pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/5 "2021-02-06T22:36:38Z")

</div>

Awesome! I for one, look forward to a linux distro that uses this as its package manager. 😃

Does this assume that the user has Julia installed already? If so, we should perhaps make that explicit. If Julia is not required to be installed to use this, then perhaps there’s a way we can use this for users to install julia itself, that’d be really nice.

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [February 6, 2021, 11:13pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/6 "2021-02-06T23:13:01Z")

</div>

> [@Mason](#):
>
> Does this assume that the user has Julia installed already?

Yes, it creates shims that are just small Julia scripts, so it does require a Julia install.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 6, 2021, 11:14pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/7 "2021-02-06T23:14:19Z")

</div>

> [@Mason](#):
>
> Does this assume that the user has Julia installed already?

Yea, I will add that to the README.

> [@simeonschaub](#):
>
> Yes, it creates shims that are just small Julia scripts, so it does require a Julia install.

The shims themselves are just bash scripts.

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [February 6, 2021, 11:17pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/8 "2021-02-06T23:17:34Z")

</div>

> [@fredrikekre](#):
>
> The shims themselves are just bash scripts.

Oops, sorry, I misread that. The bash script just ends up running the Julia script though, right?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 6, 2021, 11:18pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/9 "2021-02-06T23:18:45Z")

</div>

No, they just invoke the binary directly:

```julia
$ cat fzf 
#!/bin/bash
exec env LD_LIBRARY_PATH="..." PATH="..." fzf "$@"

```

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [February 6, 2021, 11:24pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/10 "2021-02-06T23:24:19Z")

</div>

Oh, I did not realize that. That’s super cool! At the risk of embarassing myself further, I did understand correctly though that to generate these, it installs the JLL and then extracts the path and environment from there?

Does ygg actually ensure that artifacts are not accidentally cleaned up when running `Pkg.gc()`?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 6, 2021, 11:25pm UTC](https://discourse.julialang.org/t/announcing-ygg/54687/11 "2021-02-06T23:25:45Z")

</div>

> [@simeonschaub](#):
>
> to generate these, it installs the JLL and then extracts the path and environment from there?

Yea correct.

> [@simeonschaub](#):
>
> Does ygg actually ensure that artifacts are not accidentally cleaned up when running `Pkg.gc()` ?

Kinda, since Pkg does not GC artifacts from active manifests, and `ygg` keeps the manifest around.

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [February 21, 2021, 5:57am UTC](https://discourse.julialang.org/t/announcing-ygg/54687/12 "2021-02-21T05:57:22Z")

</div>

> instead of building packages from source, binaries are prebuilt for each target platform and can simply be downloaded, unpacked, put in the right place and used without compilation.

FWIW that’s true in Nix too. The Nixpkgs cache has terabytes of built packages for [various platforms](https://hydra.nixos.org/machines).

> Yggdrasil also differs from Nix in that it supports more than just Linux

Nix works [on MacOS](https://wickedchicken.github.io/post/macos-nix-setup/) and I believe [on Windows too](https://nathan.gs/2019/04/12/nix-on-windows/).

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [February 21, 2021, 6:26am UTC](https://discourse.julialang.org/t/announcing-ygg/54687/13 "2021-02-21T06:26:18Z")

</div>

WSL is not Windows
