This shows you the differences between two versions of the page.
| gnucap:nix_on_debian [2024/02/21 05:25] felixs created | gnucap:nix_on_debian [2024/02/22 05:03] (current) felixs add alternative to build, formatting | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| <code> | <code> | ||
| (root)# apt install nix-bin | (root)# apt install nix-bin | ||
| + | </code> | ||
| + | It may be required to set up nix manually. | ||
| + | <code> | ||
| + | (user)[~]$ mkdir -p .local/share/nix/root/nix | ||
| + | (root)# mount -o bind ~user/.local/share/nix/root/nix/ /nix | ||
| + | </code> | ||
| + | |||
| + | The package description is in a git repo hosted on github. | ||
| + | (TODO: find mirror.) | ||
| + | |||
| + | <code> | ||
| (user)$ cd /some/where | (user)$ cd /some/where | ||
| (user)$ git clone https://github.com/nixos/nixpkgs | (user)$ git clone https://github.com/nixos/nixpkgs | ||
| (user)$ cd nixpkgs | (user)$ cd nixpkgs | ||
| - | (user)$ nix-build . -A gnucap-full | + | </code> | 
| - | (user)$ cd | + | |
| - | [..] | + | |
| - | (root)# mount -o bind ~user/.local/share/nix/root/nix/ /nix # is this needed? | + | To build the packages (from master and/or for development purposes), do | 
| + | <code> | ||
| + | (user)[nixpkgs]$ nix-build . -A gnucap-full | ||
| + | </code> | ||
| + | |||
| + | Alternatively, select the official unstable repo and use binary packages | ||
| + | <code> | ||
| + | (user)[nixpkgs]$ git switch nixpkgs-unstable | ||
| + | </code> | ||
| + | |||
| + | The packages are now available inside nix-shell. | ||
| + | |||
| + | <code> | ||
| + | (user)[nixpkgs]$ cd | ||
| + | [..] | ||
| - | (user)$ nix-shell -p gnucap-full -I nixpkgs=/some/where/nixpkgs | + | (user)[~]$ nix-shell -p gnucap-full -I nixpkgs=/some/where/nixpkgs | 
| [nix-shell:~]$ gnucap | [nix-shell:~]$ gnucap | ||
| [..] | [..] | ||
| gnucap> _ | gnucap> _ | ||
| </code> | </code> | ||