From ee7f16eab63f465e30efb813e99112af3eed62d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 12 Jun 2023 19:06:47 +0100 Subject: [PATCH] updated --- index.html | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/index.html b/index.html index da14ef0..fe3fcd5 100644 --- a/index.html +++ b/index.html @@ -724,7 +724,7 @@ that the package remains in the store for future use.

$ git clone https://codeberg.org/mhwombat/hello-flake
-fatal: destination path 'hello-flake' already exists and is not an empty directory.
+Cloning into 'hello-flake'...
 $ cd hello-flake
 $ ls
 flake.lock
@@ -1361,18 +1361,7 @@ opportunity to check your understanding of flakes.

-
fatal: destination path 'hello-flake' already exists and is not an empty directory.
-$ nix develop
-building '/nix/store/2fmfckcb2vhx21jgicjgcwiasz0iw43x-hello-flake-env.drv'...
-these 4 paths will be fetched (1.80 MiB download, 11.01 MiB unpacked):
-  /nix/store/33lnr4ji9f4d2cdigrwc1d4pbkjy4vq9-bash-interactive-5.2-p15-man
-  /nix/store/pk3kkaafln68gzxawk57qp9m5h5285va-bash-interactive-5.2-p15
-  /nix/store/q5mhssfls6iych80439511vz7539gd95-ncurses-6.4
-  /nix/store/s8axd2sknp45d2jmxkasmq8zxd1mv068-readline-8.2p1
-copying path '/nix/store/33lnr4ji9f4d2cdigrwc1d4pbkjy4vq9-bash-interactive-5.2-p15-man' from 'https://cache.nixos.org'...
-copying path '/nix/store/q5mhssfls6iych80439511vz7539gd95-ncurses-6.4' from 'https://cache.nixos.org'...
-copying path '/nix/store/s8axd2sknp45d2jmxkasmq8zxd1mv068-readline-8.2p1' from 'https://cache.nixos.org'...
-copying path '/nix/store/pk3kkaafln68gzxawk57qp9m5h5285va-bash-interactive-5.2-p15' from 'https://cache.nixos.org'...
+
$ nix develop
@@ -1549,7 +1538,6 @@ correctly.

$ nix develop
 warning: Git tree '/home/amy/codeberg/nix-book/source/hello-flake' is dirty
-building '/nix/store/9al266fwb9cbyk95ysv2xpplnad75lia-hello-flake-env.drv'...
 $ which cowsay # is it available now?
 which: no cowsay in (/nix/store/2y0q33dmn7846bpqcnfch4a0q2q6dmya-patchelf-0.15.0/bin:/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin:/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin:/nix/store/v1nar35045dqwf8yy572yvbbcg2w2678-glibc-2.37-8-bin/bin:/nix/store/arbxkmcgv9h8pjgj95c6d7r86yb77rl5-coreutils-9.1/bin:/nix/store/f83wjm5wpcxxbzwmr56q9iclsn0simph-binutils-wrapper-2.40/bin:/nix/store/f4qnwzv6y0nq8lix33jr5ykkyybs6fxf-binutils-2.40/bin:/nix/store/arbxkmcgv9h8pjgj95c6d7r86yb77rl5-coreutils-9.1/bin:/nix/store/j5wraaxv16fcl10x11566a3807nr4nlr-findutils-4.9.0/bin:/nix/store/q951w69v8kbdrw6shdpibnl594yfr0by-diffutils-3.9/bin:/nix/store/93z4n7zy5hwpn06279jlmak75jmq1db1-gnused-4.9/bin:/nix/store/c01b2gmx1fjjkpnvj6bxy9q49g8qkpka-gnugrep-3.7/bin:/nix/store/4rwqxm67y0zkbxjg14zl9fdxf30cpgvy-gawk-5.2.1/bin:/nix/store/lcfhnr6wrj9ssd3dxs39sprvz6qrxlj5-gnutar-1.34/bin:/nix/store/2nprqmdmjmy5i2sii7j21fznmkwimqcr-gzip-1.12/bin:/nix/store/gz0kx5v2asvlbf7gzr4v24h7dpza70zf-bzip2-1.0.8-bin/bin:/nix/store/vg9f8pmd2g0x3gb53nxwkw3yxizl3jpk-gnumake-4.4.1/bin:/nix/store/zlf0f88vj30sc7567b80l52d19pbdmy2-bash-5.2-p15/bin:/nix/store/swf1dckghdx7nza1lxz6s462pafwd7wa-patch-2.7.6/bin:/nix/store/z5818pmhspx5772s4cp6ckhwhbin2f09-xz-5.4.2-bin/bin:/nix/store/0xpv4lac3ybc6hm9gg7ywkdazs4vsj8l-file-5.44/bin:/home/amy/github/wain-tools:/home/amy/github/bin:/home/amy/github/wain-tools:/home/amy/github/bin:/nix/store/dsfcdjmymlc18wzk0hssycwifg4wznan-bash-interactive-5.1-p16/bin:/nix/store/4ccwc439gkpk91gflh6zsyx12fkfcggx-patchelf-0.15.0/bin:/nix/store/y372k7srz9jm7v9sv2cs84g3crz27z1s-gcc-wrapper-11.3.0/bin:/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/bin:/nix/store/fi1521530hy97gwjfdlgiqb4wad2g13d-glibc-2.35-224-bin/bin:/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin:/nix/store/l5i2w0w446pqsnpdxrlsf3azy5aspfxq-binutils-wrapper-2.39/bin:/nix/store/9n9gjvzci75gp2sh1c4rh626dhizqynl-binutils-2.39/bin:/nix/store/gx0iyarrz7jcnac1yllhgzffi75y4gs8-asciidoctor-2.0.18/bin:/nix/store/bbi6z65bazdzmawxaxr1kvgbn41sv9g0-python3.11-pygments-2.13.0/bin:/nix/store/szz6i32n70m8pxidw5zj294rka4m0yrz-python3.11-docutils-0.19/bin:/nix/store/536aws8kkljng4ggdakk8i1nfdqb4f4x-python3-3.11.3/bin:/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin:/nix/store/gn1s1s5z19cf0wiir2cd38jckcjc6kn6-findutils-4.9.0/bin:/nix/store/5l382qdhcyyjsyhfqqc0g15rmvs3rs4s-diffutils-3.8/bin:/nix/store/v0hg83sdv4v51c0prmdigry6wdmmpzmp-gnused-4.8/bin:/nix/store/pvb117r7fhwb08717ks21a6y9hlnp63b-gnugrep-3.7/bin:/nix/store/51sgpaxsi4sl46ii9fssvyp7n592if1m-gawk-5.1.1/bin:/nix/store/isycdamy5rsi0vq55fxz0438srx5z0hv-gnutar-1.34/bin:/nix/store/w9pbk66kf43wrpdcijjzc8vf8cymnaxy-gzip-1.12/bin:/nix/store/r84vlmw71jw2piv03n0jdhav2zsdvm6n-bzip2-1.0.8-bin/bin:/nix/store/cgbpv0vvz31qayvbf3bif2iznp46wcgl-gnumake-4.3/bin:/nix/store/kga2r02rmyxl14sg96nxbdhifq3rb8lc-bash-5.1-p16/bin:/nix/store/f1gvh42512gjf3378nmlw2vrx491yndq-patch-2.7.6/bin:/nix/store/y8z2dmbxdapyzpcrhfbdv875l5v7ddpi-xz-5.2.7-bin/bin:/nix/store/cmnq5bja0h0an1k3cyb36blkfci8nxaf-file-5.43/bin:/nix/store/dsfcdjmymlc18wzk0hssycwifg4wznan-bash-interactive-5.1-p16/bin:/nix/store/4ccwc439gkpk91gflh6zsyx12fkfcggx-patchelf-0.15.0/bin:/nix/store/y372k7srz9jm7v9sv2cs84g3crz27z1s-gcc-wrapper-11.3.0/bin:/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/bin:/nix/store/fi1521530hy97gwjfdlgiqb4wad2g13d-glibc-2.35-224-bin/bin:/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin:/nix/store/l5i2w0w446pqsnpdxrlsf3azy5aspfxq-binutils-wrapper-2.39/bin:/nix/store/9n9gjvzci75gp2sh1c4rh626dhizqynl-binutils-2.39/bin:/nix/store/0dip0kcky3jnjsp60xvk1cjzhv4yvj2s-python3.10-pelican-4.8.0/bin:/nix/store/089zdkxl8bbif25dqv3sx4nc9jyz6bh5-python3.10-chardet-5.0.0/bin:/nix/store/rpri9nb8xpwwqakyrqbg8zdslkjs2hd3-python3-3.10.11/bin:/nix/store/01axgc9g662lk663h93z2bp8clyy3hqn-python3.10-docutils-0.19/bin:/nix/store/v20lm65xzlndbw2mbihqj4xiasrvgs9w-python3.10-babel-2.11.0/bin:/nix/store/aba7b45bjy0aawqlblag6k4vg5qf44kh-python3.10-pygments-2.13.0/bin:/nix/store/zvylkc7cnar7majappcww2z826ls3sb7-python3.10-commonmark-0.9.1/bin:/nix/store/hkyfwv0yqhmyv7qvxc4g9w3ia534x391-python3.10-future-0.18.3/bin:/nix/store/5ag6v19kxlfnk6qbrrwy8wiq9m4il310-python3.10-unidecode-1.3.4/bin:/nix/store/w3f9jkinz72jyklfsgwmrfmhm4czsmga-python3.10-markdown-3.4.1/bin:/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin:/nix/store/gn1s1s5z19cf0wiir2cd38jckcjc6kn6-findutils-4.9.0/bin:/nix/store/5l382qdhcyyjsyhfqqc0g15rmvs3rs4s-diffutils-3.8/bin:/nix/store/v0hg83sdv4v51c0prmdigry6wdmmpzmp-gnused-4.8/bin:/nix/store/pvb117r7fhwb08717ks21a6y9hlnp63b-gnugrep-3.7/bin:/nix/store/51sgpaxsi4sl46ii9fssvyp7n592if1m-gawk-5.1.1/bin:/nix/store/isycdamy5rsi0vq55fxz0438srx5z0hv-gnutar-1.34/bin:/nix/store/w9pbk66kf43wrpdcijjzc8vf8cymnaxy-gzip-1.12/bin:/nix/store/r84vlmw71jw2piv03n0jdhav2zsdvm6n-bzip2-1.0.8-bin/bin:/nix/store/cgbpv0vvz31qayvbf3bif2iznp46wcgl-gnumake-4.3/bin:/nix/store/kga2r02rmyxl14sg96nxbdhifq3rb8lc-bash-5.1-p16/bin:/nix/store/f1gvh42512gjf3378nmlw2vrx491yndq-patch-2.7.6/bin:/nix/store/y8z2dmbxdapyzpcrhfbdv875l5v7ddpi-xz-5.2.7-bin/bin:/nix/store/cmnq5bja0h0an1k3cyb36blkfci8nxaf-file-5.43/bin:/home/amy/github/wain-tools:/home/amy/github/bin:/home/amy/github/wain-tools:/home/amy/github/bin:/home/amy/github/wain-tools:/home/amy/github/bin:/run/wrappers/bin:/home/amy/.nix-profile/bin:/etc/profiles/per-user/amy/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin)
 $ ./hello-flake
@@ -1563,9 +1551,6 @@ $ ./hello-flake
 
$ nix run
 warning: Git tree '/home/amy/codeberg/nix-book/source/hello-flake' is dirty
-this derivation will be built:
-  /nix/store/bd1vzfl035i4lf28p0bzksb9gc8l9x2p-hello-flake.drv
-building '/nix/store/bd1vzfl035i4lf28p0bzksb9gc8l9x2p-hello-flake.drv'...
 /nix/store/kds93y2fq5mwaca3d60rywz4c5xj0wqq-hello-flake/bin/hello-flake: line 3: cowsay: command not found
@@ -1602,7 +1587,7 @@ don’t need to git push the changes until we’re ready to share t
$ git commit hello-flake flake.nix -m 'added bovine feature'
-[main 8572547] added bovine feature
+[main 7c75517] added bovine feature
  2 files changed, 7 insertions(+), 1 deletion(-)
 $ nix run
 /nix/store/kds93y2fq5mwaca3d60rywz4c5xj0wqq-hello-flake/bin/hello-flake: line 3: cowsay: command not found
@@ -1694,10 +1679,9 @@ directory and create a git repository.

$ mkdir hello-python
-mkdir: cannot create directory ‘hello-python’: File exists
 $ cd hello-python
 $ git init
-Reinitialized existing Git repository in /home/amy/codeberg/nix-book/source/hello-python/.git/
+Initialized empty Git repository in /home/amy/codeberg/nix-book/source/hello-python/.git/
@@ -1934,7 +1918,8 @@ something like this.

$ nix run
-Hello from inside a Python program built with a Nix flake!
+warning: Git tree '/home/amy/codeberg/nix-book/source/hello-python' is dirty +error: getting status of '/nix/store/0ccnxa25whszw7mgbgyzdm4nqc0zwnm8-source/flake.nix': No such file or directory
@@ -1946,6 +1931,9 @@ repo before building or running the flake.

$ git add flake.nix setup.py hello.py
 $ nix run
+warning: Git tree '/home/amy/codeberg/nix-book/source/hello-python' is dirty
+warning: creating lock file '/home/amy/codeberg/nix-book/source/hello-python/flake.lock'
+warning: Git tree '/home/amy/codeberg/nix-book/source/hello-python' is dirty
 Hello from inside a Python program built with a Nix flake!
@@ -1959,13 +1947,12 @@ repo, and commit all important files.

$ git add flake.lock
 $ git commit -a -m 'initial commit'
-On branch master
-Untracked files:
-  (use "git add <file>..." to include in what will be committed)
-	dist/
-	hello_flake_python.egg-info/
-
-nothing added to commit but untracked files present (use "git add" to track)
+[master (root-commit) 45bb306] initial commit + 4 files changed, 127 insertions(+) + create mode 100644 flake.lock + create mode 100644 flake.nix + create mode 100644 hello.py + create mode 100644 setup.py