cross-posted from: https://lemmy.today/post/34279957

guix shell sees to it that all of the dependencies (listed in the inputs and native-inputs sections) are available within the shell session it creates by downloading (or building, if necessary) the entire dependency tree.

Should you want/need more isolation from the host system, guix shell has you covered. The --pure flag will clear out most existing environments variables, such as $PATH, so that the resulting environment does not contain pointers to places like /usr. For more Docker-like isolation, the --container flag can be used, which will run the new shell session within a set of Linux namespaces so that the host system is inaccessible.

  • cecilkorik@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    14 days ago

    Guh, someday I am going to have to learn that bracket-based syntax (lisp?) that keeps popping up on particularly interesting projects but I can never be bothered to learn.

    • HaraldvonBlauzahn@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      9 days ago

      As a first approximation, there is not much to learn. The lisp syntax thing is a scarecrow for the uninformed

      In Python, you write:

      a = atan2(x, y)
      b = sin(x)
      c = b if x > a else 1
      # use values of a, b and c here
      

      Where the indentation is a block.

      In Scheme, you write:

      (let ((a (atan2 x y))
            (b (sin x))
            (c (if (> x a) b 1)))
             ; use values of a, b, and c here
      )
      

      Where the outer paren around “let” determines the scope of the binding, and the scope serves as an expression with a value (like in Rust), and scopes can be nested arbitrarily deep.

      • HaraldvonBlauzahn@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        9 days ago

        Plus, any good editor will arrange the indentation to make nesting clear. For experienced Lisp / Scheme programmers, the parens nearly disappear, like commas or semicolons for c++ programmers.

  • paequ2@lemmy.todayOP
    link
    fedilink
    arrow-up
    1
    ·
    13 days ago

    Other great resource is guix shell: Overview by Andrew.

    Although, one thing I’m still trying to understand is the difference between guix.scm and manifest.scm… The posted article only mentions guix.scm, but Andrew talks about both. But… he doesn’t really go into why there are two files and when you would use one or the other…