Cheatsheet: Difference between revisions
imported>Mkohler m "direct dependencies" is more clear than "immediate dependencies" |
imported>Legendofmiracles m small issues |
||
Line 271: | Line 271: | ||
|In Debian, apt-get source gets both the patched upstream source and the recipe for the package. Those need two steps in Nix. | |In Debian, apt-get source gets both the patched upstream source and the recipe for the package. Those need two steps in Nix. | ||
To find the package's attribute path: <syntaxhighlight lang="console">$nix-env -qaP emacs</syntaxhighlight> or <syntaxhighlight lang="console">$ nox emacs</syntaxhighlight> | To find the package's attribute path: <syntaxhighlight lang="console">$ nix-env -qaP emacs</syntaxhighlight> or <syntaxhighlight lang="console">$ nox emacs</syntaxhighlight> | ||
To download the source as specified by the package recipe: <syntaxhighlight lang="bash">nix-build '<nixpkgs>' -A emacs.src</syntaxhighlight> | To download the source as specified by the package recipe: <syntaxhighlight lang="bash">nix-build '<nixpkgs>' -A emacs.src</syntaxhighlight> | ||
The patched source is usually not a derivation itself, but can be produced for most packages with the following command: <syntaxhighlight lang="bash">nix-shell '<nixpkgs>' -A emacs\ | The patched source is usually not a derivation itself, but can be produced for most packages with the following command: <syntaxhighlight lang="bash">nix-shell '<nixpkgs>' -A emacs\ | ||
Line 294: | Line 294: | ||
|- | |- | ||
|Install a .deb | |Install a .deb | ||
|<syntaxhighlight lang="console"> | |<syntaxhighlight lang="console">$ sudo dpkg -i package.deb</syntaxhighlight> | ||
| | | | ||
|Install dpkg with Nix, then <syntaxhighlight lang="bash">dpkg -i package.deb</syntaxhighlight> While this is technically possible it will in all likelihood not work. | |Install dpkg with Nix, then <syntaxhighlight lang="bash">dpkg -i package.deb</syntaxhighlight> While this is technically possible it will in all likelihood not work. | ||
Line 317: | Line 317: | ||
"/nix/store/nlpnx21yjdjx2ii7ln4kcmbm0x1vy7w9-libXtst-1.2.3" | "/nix/store/nlpnx21yjdjx2ii7ln4kcmbm0x1vy7w9-libXtst-1.2.3" | ||
$ nix-build '<nixpkgs>' --no-build-output -A xorg.libXtst | |||
/nix/store/nlpnx21yjdjx2ii7ln4kcmbm0x1vy7w9-libXtst-1.2.3 | /nix/store/nlpnx21yjdjx2ii7ln4kcmbm0x1vy7w9-libXtst-1.2.3 | ||
</syntaxHighlight> | </syntaxHighlight> |