Search

Items tagged with: nix


Introducing the mega Nonguix :P
ultrarare.space/en/posts/manag…

Here's English version! Updated for nix-shell-wrapper interface change and the new with-nix-profile. Added a new section for extra setups to workaround issues introduced by different packaging practices. Let me know if there're more of them.

#guix #nix


竊包不能算偷……竊包!打包人的事,能算偷麼? 😈
ultrarare.space/posts/manage-n…

Probably I'll translate it into en at some time. For now I just tell you what's new in the post:

  guix package --search-paths \
       -p /run/current-system/profile \
       -p /nix/store/csj09rkmgyjc9y7wzvscla2lavhwc0rg-readest-0.11.1
  ...
  export PATH="/run/current-system/profile/bin:/run/current-system/profile/sbin:/nix/store/csj09rkmgyjc9y7wzvscla2lavhwc0rg-readest-0.11.1/bin"
  export XDG_DATA_DIRS="/run/current-system/profile/share:/nix/store/csj09rkmgyjc9y7wzvscla2lavhwc0rg-readest-0.11.1/share"
  export XCURSOR_PATH="/run/current-system/profile/share/icons:/nix/store/csj09rkmgyjc9y7wzvscla2lavhwc0rg-readest-0.11.1/share/icons"

@hako@boiledscript.com:

Tweaked the interface a bit and added docstring. Here's code for nix-shell-wrapper and nix-shell-wrapper->package:
codeberg.org/hako/Rosenthal/sr…

Too many backslashes are used in the docstring, duplicating the examples here as well:

(nix-shell-wrapper "cowsay"
  '("github:NixOS/nixpkgs/nixos-26.05#coreutils"
    "github:NixOS/nixpkgs/nixos-26.05#cowsay")
  #:run-command '("env" "LANG=C.UTF-8" "cowsay" "hello"))

(nix-shell-wrapper "python-with-numpy"
  "with (import (builtins.getFlake \"github:NixOS/nixpkgs/nixos-26.05\") {}); python3.withPackages (ps: [ps.numpy])"
  #:expression? #t
  #:run-command '("python"))

#guix



#guix #nix


The media in this post is not displayed to visitors. To view it, please go to the original post.

Added a with-nix-profile macro. It can be used in package declaration of Guix System and Guix Home, transforming nix-shell-wrapper into packages and collecting Nix packages from them.

With the collected Nix packages, an additional build-nix-profile command is provided to build and link the resulted profile to the specified path, also registering GC root.

What's left is to write services to execute this build-nix-profile command and extend search paths ;)

To avoid loading incompatible libraries from the other distribution and crashing programs, like what may happen when using Guix and Nix on foreign distros, the constructed Nix profile won't contain executables and commands are provided by the nix shell wrappers.

See also the first few lists in codeberg.org/hako/Rosenthal/sr… and let me know what are missing.

#guix #nix

#guix #nix


The media in this post is not displayed to visitors. To view it, please go to the original post.

I didn't fully understand nix shell, so here's improved nix-shell-wrapper interface (haven't pushed yet). Probably interesting to Nix folks as well :)

#guix #nix

#guix #nix


#guix #nix


The media in this post is not displayed to visitors. To view it, please go to the original post.

Our Chinese folks have done a great job organizing NixCN Conference 2605!

Thank you to all our speakers!

Also, a special shout-out to Jiang Jianfeng, codeowner of Asterinas community, presenting Asterinas NixOS!

#NixOS #Nix


#guix #nix