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:
parent
fc1d3fa36f
commit
e55008fdb6
|
@ -13,13 +13,13 @@ Welcome to nix.dev
|
||||||
|
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
=================
|
-----------------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
|
:glob:
|
||||||
|
|
||||||
installation.rst
|
tutorials/index.rst
|
||||||
tutorials/*.rst
|
|
||||||
nix-pills.rst
|
nix-pills.rst
|
||||||
faq.rst
|
faq.rst
|
||||||
influences.rst
|
influences.rst
|
||||||
|
|
|
@ -7,7 +7,7 @@ web framework.
|
||||||
Create a new file ``default.nix``. This file is conventionally used for
|
Create a new file ``default.nix``. This file is conventionally used for
|
||||||
specifying packages:
|
specifying packages:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: nix
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ specifying packages:
|
||||||
|
|
||||||
You will also need a simple Flask app as ``main.py``:
|
You will also need a simple Flask app as ``main.py``:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: python
|
||||||
|
|
||||||
#! /usr/bin/env 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:
|
and a ``setup.py`` script:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: python
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ and a ``setup.py`` script:
|
||||||
|
|
||||||
Now build the package with:
|
Now build the package with:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
nix-build
|
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
|
``./result/bin/main.py``. We can still use the ``default.nix`` as a
|
||||||
shell environment to get the same result:
|
shell environment to get the same result:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
nix-shell default.nix
|
nix-shell default.nix
|
||||||
python3 main.py
|
python3 main.py
|
||||||
|
|
|
@ -9,7 +9,7 @@ software as you.
|
||||||
To get started, make a new folder and create a file called ``shell.nix``
|
To get started, make a new folder and create a file called ``shell.nix``
|
||||||
with the following contents:
|
with the following contents:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: nix
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ 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
|
with ``which`` and ``htop`` as inputs. To enter this environment, type
|
||||||
in:
|
in:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
nix-shell
|
nix-shell
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Q.
|
||||||
Now try ``which htop`` to check where the ``htop`` command is on-disk.
|
Now try ``which htop`` to check where the ``htop`` command is on-disk.
|
||||||
You should see something similar to this:
|
You should see something similar to this:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
/nix/store/y3w2i8kfdbfj9rx287ad52rahjpgv423-htop-2.2.0/bin/htop
|
/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
|
You can search for available packages using ``nix-env -qa``, for
|
||||||
example:
|
example:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
nix-env -qa python3
|
nix-env -qa python3
|
||||||
nix-env -qa nodejs
|
nix-env -qa nodejs
|
||||||
|
|
|
@ -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
|
other Linux distributions, MacOS and Windows via WSL using the install
|
||||||
script from our website:
|
script from our website:
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
curl -L https://nixos.org/nix/install | sh
|
curl -L https://nixos.org/nix/install | sh
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ signatures.)
|
||||||
|
|
||||||
Check that the installation was successful by running
|
Check that the installation was successful by running
|
||||||
|
|
||||||
.. code:: code
|
.. code:: bash
|
||||||
|
|
||||||
nix-channel --list
|
nix-channel --list
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue