Jump to content

Cheatsheet: Difference between revisions

Elaborate a bit on the Nix's concept of package versioning
imported>Peterhoeg
No edit summary
imported>Patryk27
(Elaborate a bit on the Nix's concept of package versioning)
Line 165: Line 165:
|-
|-
|Install a particular version of a package
|Install a particular version of a package
|apt-get install package=version
|<syntaxhighlight lang="console">$ apt-get install package=version</syntaxhighlight>
|Nix itself has no understanding of package versions.
|Although Nix on its own doesn't understand the concept of package versioning, you can install and play with older (or newer!) software via https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs with https://lazamar.co.uk/nix-versions.
 
 
For instance, to launch an older version of Vim you could use:
<syntaxhighlight lang="console">
$ nix-shell \
    -p vim \
    -I nixpkgs=\https://github.com/NixOS/nixpkgs-channels/archive/4bba6650a6a5a2009e25bdeed8c1e871601a9bfb.tar.gz
</syntaxhighlight>
|
|
|-
|-
Anonymous user