1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00

fix build

This commit is contained in:
Domen Kožar 2020-05-18 11:41:12 +02:00
parent fc1d3fa36f
commit e55008fdb6
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
4 changed files with 14 additions and 14 deletions

View file

@ -13,13 +13,13 @@ Welcome to nix.dev
Table of Contents
=================
-----------------
.. toctree::
:maxdepth: 3
:glob:
installation.rst
tutorials/*.rst
tutorials/index.rst
nix-pills.rst
faq.rst
influences.rst

View file

@ -7,7 +7,7 @@ web framework.
Create a new file ``default.nix``. This file is conventionally used for
specifying packages:
.. code:: code
.. code:: nix
{ pkgs ? import <nixpkgs> {} }:
@ -20,7 +20,7 @@ specifying packages:
You will also need a simple Flask app as ``main.py``:
.. code:: code
.. code:: python
#! /usr/bin/env python
@ -37,7 +37,7 @@ You will also need a simple Flask app as ``main.py``:
and a ``setup.py`` script:
.. code:: code
.. code:: python
from setuptools import setup
@ -52,7 +52,7 @@ and a ``setup.py`` script:
Now build the package with:
.. code:: code
.. code:: bash
nix-build
@ -65,7 +65,7 @@ You may notice we can run the application from the package like
``./result/bin/main.py``. We can still use the ``default.nix`` as a
shell environment to get the same result:
.. code:: code
.. code:: bash
nix-shell default.nix
python3 main.py

View file

@ -9,7 +9,7 @@ software as you.
To get started, make a new folder and create a file called ``shell.nix``
with the following contents:
.. code:: code
.. code:: nix
{ pkgs ? import <nixpkgs> {} }:
@ -24,7 +24,7 @@ Basically we import our package channel ``nixpkgs`` and make a shell
with ``which`` and ``htop`` as inputs. To enter this environment, type
in:
.. code:: code
.. code:: bash
nix-shell
@ -38,7 +38,7 @@ Q.
Now try ``which htop`` to check where the ``htop`` command is on-disk.
You should see something similar to this:
.. code:: code
.. code:: bash
/nix/store/y3w2i8kfdbfj9rx287ad52rahjpgv423-htop-2.2.0/bin/htop
@ -49,7 +49,7 @@ version.
You can search for available packages using ``nix-env -qa``, for
example:
.. code:: code
.. code:: bash
nix-env -qa python3
nix-env -qa nodejs

View file

@ -5,7 +5,7 @@ While NixOS is a Linux distribution based on Nix, you can install Nix on
other Linux distributions, MacOS and Windows via WSL using the install
script from our website:
.. code:: code
.. code:: bash
curl -L https://nixos.org/nix/install | sh
@ -14,7 +14,7 @@ signatures.)
Check that the installation was successful by running
.. code:: code
.. code:: bash
nix-channel --list