Commit Graph

229 Commits

Author SHA1 Message Date
Gabriella Gonzalez
44c6fdabc2 Add documentation 2022-12-19 17:03:45 -08:00
Christian Kemper
f6ae4479ea dockerTools: allowing architecture to be specified
... for buildImage, buildLayeredImage and streamLayeredImage,
adding docs and tests.
2022-12-08 20:29:09 +01:00
Colin Arnott
bac379f30a
doc: use sri hash syntax
The nixpkgs manual contains references to both sri hash and explicit
sha256 attributes. This is at best confusing to new users. Since the
final destination is exclusive use of sri hashes, see nixos/rfcs#131,
might as well push new users in that direction gently.

Notable exceptions to sri hash support are builtins.fetchTarball,
cataclysm-dda, coq, dockerTools.pullimage, elixir.override, and
fetchCrate. None, other than builtins.fetchTarball, are fundamentally
incompatible, but all currently accept explicit sha256 attributes as
input. Because adding backwards compatibility is out of scope for this
change, they have been left intact, but migration to sri format has been
made for any using old hash formats.

All hashes have been manually tested to be accurate, and updates were
only made for missing upstream artefacts or bugs.
2022-12-04 06:12:18 +00:00
Silvan Mosberger
a566d0842e
Merge pull request #172736 from infinisil/docker-nix-shell 2022-11-26 20:21:59 +01:00
Sandro
3a05360e53
Merge pull request #200082 from panicgh/fetchgit-sparse-checkout 2022-11-21 20:00:56 +01:00
Robert Hensing
29352751cf
Merge pull request #196251 from hercules-ci/testers-build-failure-and-equal-contents
`testers`: Add `testBuildFailure` and `testEqualContents`
2022-11-21 06:17:00 +01:00
Nicolas Benes
f6b07f0e2f fetchgit: make sparseCheckout a list of strings
The `sparseCheckout` argument allows the user to specify directories or
patterns of files, which Git uses to filter files it should check-out.

Git expects a multi-line string on stdin ("newline-delimited list", see
`git-sparse-checkout(1)`), but within nixpkgs it is more consistent to
use a list of strings instead. The list elements are joined to a
multi-line string only before passing it to the builder script.

A deprecation warning is emitted if a (multi-line) string is passed to
`sparseCheckout`, but for the time being it is still accepted.
2022-11-15 19:45:33 +01:00
Ryan Mulligan
f3d0e1d5c3 nixpkgs/doc: fix admonition syntax
Match admonition syntax in

https://nixos.org/manual/nixpkgs/unstable/#chap-contributing
2022-11-08 07:30:20 -08:00
Robert Hensing
e20a362908 testers.testEqualContents: init 2022-10-27 14:06:38 +02:00
Robert Hensing
44d0f37833 testers.testBuildFailure: init 2022-10-27 14:06:38 +02:00
Silvan Mosberger
8ec0837a72 Introduce dockerTools.buildNixShellImage 2022-10-07 22:04:22 +02:00
Дамјан Георгиевски
4e385bec15
add documentation for the pkgs.portableService tool (#193081)
* add documentation for the pkgs.portableService tool

as introduced in 499aebcf34

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-07 10:37:56 +02:00
Ivar Scholten
6c40872147
doc/testers: testVersion -> testers.testVersion, add example 2022-09-15 22:46:37 +02:00
Robert Hensing
62b25a28fe
Merge pull request #170906 from Sohalt/dockerTools.ca-certificates.crt
dockerTools ca-certificates.crt helper
2022-08-31 14:08:02 +02:00
Alex James
c9af898255
dockerTools.buildImage: make VM memSize configurable
Fixes #186752. This adds buildVMMemorySize (defaults to 512 MiB) to
buildImage, which is passed to vm.runInLinuxVM. This is needed for
larger base images, which may otherwise cause container build failures
due to OOM in the VM.
2022-08-16 21:47:29 -05:00
Winter
dbd18a63a7 fetchgit: allow disabling cone mode for sparse checkouts, fix test 2022-08-14 23:03:07 +02:00
Florian Klink
00ff154265
Merge pull request #174093 from NixOS/doc-fakenss
nixos/doc: document fakeNss, binSh
2022-08-04 21:06:19 +07:00
Valentin Gagarin
671ce969a9
Merge pull request #179489 from Thornycrackers-Forks/fetcher-docs-update
doc/builders/fetchers: Add examples, reduce sentence complexity
2022-08-03 11:50:56 +02:00
Cody Hiar
3c2cd351d4 Add example error message. 2022-08-02 11:07:36 -06:00
Cody Hiar
9c292dd02e Updating sha256 to more realistic example 2022-08-02 10:55:15 -06:00
Cody Hiar
0e91d53cc5
Update doc/builders/fetchers.chapter.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-02 10:52:08 -06:00
Cody Hiar
0685e4a929
Update doc/builders/fetchers.chapter.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-02 10:51:38 -06:00
Cody Hiar
6d0bf6ae05
Update doc/builders/fetchers.chapter.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-02 10:51:09 -06:00
Cody Hiar
0444078dab
Update doc/builders/fetchers.chapter.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-02 10:50:22 -06:00
Cody Hiar
53ffebbe1f
Update doc/builders/fetchers.chapter.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-02 10:50:05 -06:00
Florian Klink
6e254a6c35 nixos/doc: update contents to copyToRoot
contents is deprecated now, use the copyToRoot attribute.
2022-08-01 13:41:41 +07:00
Florian Klink
4393ed8679 Update doc/builders/images/dockertools.section.md
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-08-01 13:34:20 +07:00
Florian Klink
d84e7842a5 nixos/doc: document fakeNss, binSh 2022-08-01 13:34:20 +07:00
Arnout Engelen
0dd7792b4c
nixpkgs/doc: remove unused unfree.xml
This section was broken out into its own file in efb55d2a42 but
apparently never actually got included anywhere.

Since then a more detailed section on using unfree packages has been
introduced.

Copied the introduction and removed the rest of the file.
2022-07-28 16:54:32 +02:00
Cody Hiar
f25dd50085
Update doc/builders/fetchers.chapter.md
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-07-18 11:26:51 -06:00
sohalt
c9d8e34fc4 dockerTools: document environment helpers 2022-07-07 14:50:23 +02:00
Robert Hensing
e007eb480c dockerTools.buildImage: Add copyToRoot to replace contents, explain usage 2022-07-06 07:30:24 +02:00
Cody Hiar
6a9987a095 Updated wording from code review 2022-07-04 14:39:11 -06:00
Cody Hiar
24e95a4461 Remove possessive apostrophes 2022-06-29 12:50:16 -06:00
Cody Hiar
48d5f38c6a doc/builders/fetchers: Add examples, reduce sentence complexity 2022-06-28 17:18:48 -06:00
adisbladis
02c180b646
Merge pull request #176324 from meebey/meebey/meebey-patch-1
doc/builders/images/dockertools: improve shadowSetup example
2022-06-21 20:24:20 +08:00
Mirco Bauer
ac66ff97ed doc/builders/images/dockertools: improve shadowSetup example
The example snippet will fail with this error as it is not self contained and
assumes `shadowSetup` was given:

    $ nix-build docker-image.nix
    error: undefined variable 'shadowSetup' at docker-image.nix:20:7

Instead use the full reference to `shadowSetup` in the example so it will work
as stated.
2022-06-05 09:45:58 +08:00
Florian Klink
1cefcfab2d nixos/doc: move fetchpatch documentation to fetcher documentation
… and link from the coding-conventions chapter to it.

Closes #48569.
2022-06-03 14:37:31 +02:00
Klemens Nanni
787a444596 doc: firefox: Show how to use PKCS#11 Proxy Module
`p11-kit-proxy.so` makes it able to use multiple PKCS#11 modules and
manage them through p11-kit(8).

Fix indentation while here.
2022-06-01 01:22:46 +02:00
Robert Hensing
e8ffb6a727 doc/testers: Mention nixosTests in nixosTest doc 2022-05-05 13:08:05 +02:00
Robert Hensing
7edb414660 testers.nixosTest: Move from top-level and improve docs 2022-05-05 12:48:47 +02:00
Sandro
beec499a8a
Merge pull request #163598 from SuperSamus/doc-builder-typos
doc/builders: fix typos
2022-05-03 09:41:34 +02:00
Artturin
41808d42d2 doc: move testers to their own chapter 2022-04-22 16:24:29 +03:00
jahway603
021d10cde0 added fetchFromGitea to docs 2022-03-21 12:39:17 -04:00
Artturi
b54e7571e2
Merge pull request #161739 from Artturin/gsettingsfhsenv 2022-03-15 00:03:56 +02:00
Martino Fontana
93d624a49a doc/builders: fix typos 2022-03-10 20:43:29 +01:00
Artturin
3e7e6ab84a buildFHSUserEnv{Chroot,Bubblewrap}: link gsettings-schemas to the FHS location
We shouldn't need to use wrapGAppsHook in expressions
that use this builder.
2022-03-03 01:22:09 +02:00
Jonathan Ringer
5f91781b55 treewide: remove steam-run-native 2022-03-02 12:25:45 -08:00
Zhong Jianxin
8c26b2d60f fetchgit: Add document for sparseCheckout 2022-01-24 11:23:56 +08:00
Robert Hensing
d75b85c5dc
Merge pull request #147690 from pasqui23/hosts
concatTextFile: init
2022-01-08 20:40:31 +01:00
Jonas Chevalier
1e910209ae
mkShell: make it buildable (#153194)
When I designed `mkShell`, I didn't have a good idea of what the output
should look like and so decided to make the build fail. In practice,
this causes quite a bit of confusion and complications because now the
shell cannot be part of a normal package set without failing the CI as
well.

This commit changes that build phase to record all the build inputs in a
file. That way it becomes possible to build it, makes sure that all the
build inputs get built as well, and also can be used as a GC root.
(by applying the same trick as #95536).

The documentation has also been improved to better describe what mkShell
does and how to use it.
2022-01-08 01:54:04 +01:00
Nguyễn Gia Phong
b97ccaa18d
fetchFromSourcehut: allow recursive fetching 2022-01-03 16:37:16 +07:00
Domen Kožar
4b1c74a735
Merge pull request #145103 from symphorien/nix-env-i
doc: minimize mentions of nix-env -i without -A in nixpkgs manual
2021-12-20 10:01:20 +00:00
Guillaume Girol
a15fbab8e9 doc: minimize mentions of nix-env -i without -A in nixpkgs manual 2021-12-18 12:00:00 +00:00
Pasquale
6f0eae6d37
docs: added examples to trivial builders section 2021-12-11 19:50:03 +01:00
Robert Hensing
ddda5f28e1 dockerTools: Keep fakechroot disabled by default
Avoid risk of breaking existing images by making it opt-in.
2021-12-04 13:49:10 +00:00
Robert Hensing
0e9bc9ffd1 dockerTools: Add fakechroot to fakeRootCommands 2021-12-04 13:49:10 +00:00
Pasquale
d2e237cbe1
concatText: documentation 2021-12-02 21:54:53 +01:00
Bernardo Meurer
0e4f04b74c
writeShellApplication: buildInputs -> runtimeInputs 2021-11-08 09:33:33 -08:00
Bernardo Meurer
89979c9c5b
writeShellApplication: init 2021-11-08 09:33:32 -08:00
github-actions[bot]
a70629a8e5
Merge master into staging-next 2021-09-27 18:01:07 +00:00
thomassdk
457ff3835c
doc: fix misspelling (#139623)
doc/builders/fetchers.chapter.md: fetcheres -> fetchers
2021-09-27 20:32:10 +08:00
Jörg Thalheim
e6c02cc4b4 nixpkgs/doc/glibc: better glibc link
also replace unicode symbol in case some environment cannot reproduce the
encoding or font symbol.
2021-09-22 20:29:41 +02:00
github-actions[bot]
5752e84b6c
Merge staging-next into staging 2021-09-21 18:01:49 +00:00
Robert Hensing
1648346444
Merge pull request #136022 from hercules-ci/fetcher-testing
Fetcher testing
2021-09-21 14:50:28 +02:00
Jörg Thalheim
a65e3b66cb
Merge pull request #137601 from fzakaria/faridzakaria/glibc-netbase
glibc: allow environment variable for /etc/ files (i.e. /etc/protocols)
2021-09-21 08:07:02 +01:00
Farid Zakaria
4687d7523b glibc: add dependency on netbase /etc/protocols
Add an explicit dependency on netbase for /etc/protocols

Certain functions in glibc look for files present in /etc such as getprotobyname which reads /etc/protocols.
If you are using Nix over a Linux installation, this file may not be present, and therefore it will cause errors.

- add netbase as a new package in nixpks
- add a dependency in glibc on it using postPatchPhase and substitute
the path

Fixes #124401
2021-09-19 19:37:56 -07:00
Robert Hensing
ac78ae80a4 invalidateFetcherByDrvHash move docs to manual 2021-09-19 20:27:32 +02:00
Robert Hensing
b502de6476 doc/builders/fetchers: Explain invalidateFetcherByDrvHash 2021-09-19 19:45:12 +02:00
Robert Hensing
f74b160832 doc/builders/fetchers: Document FOD caveats 2021-09-19 19:33:18 +02:00
github-actions[bot]
8fb1ff7c31
Merge master into staging-next 2021-08-26 18:01:02 +00:00
Luis-Hebendanz
d031843a1e firefox: Added checks for new addon behaviour since v91 2021-08-22 22:17:44 +02:00
Dominik Xaver Hörl
b4e9cd8596 docs: adjust to the new structure of kernel packages 2021-08-12 12:22:05 +02:00
adisbladis
f09a770d9c
Merge pull request #130021 from neosimsim/fix-emacs-override-examples
emacs: fix overrideScope' examples
2021-08-04 03:08:33 -05:00
Alexander Ben Nasrallah
c81250a1d3 emacs: fix overrideScope' examples 2021-07-12 16:48:10 +02:00
Mauricio Scheffer
a7784fe00a buildFHSUserEnv: document profile parameter 2021-07-11 18:12:19 +01:00
slotThe
2c529c3cb8 Link to Libera, Matrix instead of Freenode
The project has moved away from Freenode as an IRC network[1], and there
is now a quite large channel on Libera.  As such, we should point users
towards that instead.

This also changes all examples to refer to libera instead of freenode
as, with the recent deletion of all freenode channels, it is perhaps
where most communities are to be found nowadays.

Finally, also link to the official Matrix room[2] as an alternative to
IRC.

Related: https://github.com/NixOS/nixpkgs/pull/129384

[1]: https://discourse.nixos.org/t/join-us-on-matrix-at-nix-nixos-org-migrating-from-freenode
[2]: https://github.com/NixOS/rfcs/pull/94
2021-07-06 16:35:37 +02:00
Chris Martin
023489f623 docs: update Steam instructions to use steam-run-native package
pkgs.steam-run-native is defined as exactly the expression that
these instructions tell you to write, so the instruction is no
longer necessary since we can just tell you to use that.
2021-07-01 02:43:10 -06:00
Vladimír Čunát
2ee781417e
nixos/*: replace alsa* aliases
The attributes got renamed in PR #126440 and in some places this caused
evaluation errors, e.g. the tarball job was saying (locally)
> attribute 'alsaUtils' missing, at /build/source/nixos/modules/services/audio/alsa.nix:6:4
and I suspect that trunk-combined jobset's failure to evaluate was also caused.
2021-06-10 09:46:55 +02:00
Jan Tojnar
6ecc641d08
doc: prepare for commonmark
We are still using Pandoc’s Markdown parser, which differs from CommonMark spec slightly.

Notably:
- Line breaks in lists behave differently.
- Admonitions do not support the simpler syntax https://github.com/jgm/commonmark-hs/issues/75
- The auto_identifiers uses a different algorithm – I made the previous ones explicit.
- Languages (classes) of code blocks cannot contain whitespace so we have to use “pycon” alias instead of Python “console” as GitHub’s linguist

While at it, I also fixed the following issues:
- ShellSesssion was used
- Removed some pointless docbook tags.
2021-06-07 06:34:59 +02:00
Robert Hensing
ed4523186e writeReferencesToFile: docs and tests 2021-05-15 17:04:25 +02:00
Robert Hensing
cc60f81e69 writeDirectReferencesToFile: init 2021-05-15 17:04:25 +02:00
Jonas Chevalier
c6b62f2381
mkShell: introduce packages argument (#122180)
The distinction between the inputs doesn't really make sense in the
mkShell context.  Technically speaking, we should be using the
nativeBuildInputs most of the time.

So in order to make this function more beginner-friendly, add "packages"
as an attribute, that maps to nativeBuildInputs.

This commit also updates all the uses in nixpkgs.
2021-05-13 19:17:29 +02:00
Bobby Rong
228276fbd0 doc/builders/images/*.xml: Convert to markdown 2021-04-24 09:06:33 +08:00
Sandro
9419ed621f
Merge pull request #108919 from bryanasdev000/doc-dlib
dlib: Update doc to use CommonMark
2021-04-22 03:35:39 +02:00
Sandro
2df2e5f330
Merge pull request #118269 from midchildan/feat/fuse/add-darwin 2021-04-22 03:27:36 +02:00
midchildan
80651c123e
docs: add FUSE packaging tip for Darwin 2021-04-20 00:52:07 +09:00
Bryan A. S
a1e28d3740 doc/builders/packages/dlib.xml: Convert to markdown
Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
2021-04-13 03:40:27 -03:00
Sandro
e355946df1
Merge pull request #103546 from mnacamura/cdda-small-fix 2021-04-12 16:31:01 +02:00
Robert Hensing
58b21dea78
Merge pull request #116749 from vroad/docker-layered-image-fakeroot
dockerTools.streamLayeredImage: add fakeRootCommands option
2021-04-07 15:02:24 +02:00
Sandro
899cfc82b9
Delete citrix.xml 2021-04-01 09:38:47 +02:00
Ryan Mulligan
86eedf1785
Merge pull request #108918 from bryanasdev000/doc-citrix
citrix: Update doc to use CommonMark
2021-03-31 22:02:52 -07:00
Ryan Mulligan
d9b57bfc2c
Merge pull request #108917 from bryanasdev000/doc-ocitools
ocitools: Update doc to use CommonMark
2021-03-31 21:51:38 -07:00
Bernardo Meurer
fa9cd72c09
Merge pull request #117360 from midchildan/feat/fuse/darwin
fuse: use macfuse-stubs instead on Darwin
2021-03-24 21:18:40 +00:00
vroad
c420e650c9
dockerTools.streamLayeredImage: Update documentation
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2021-03-24 08:24:21 +09:00
Benjamin Hipple
561cc81ee6
Merge pull request #115857 from lbpdt/feature/docker-tools-layered-base-image
dockerTools.buildLayeredImage: support fromImage
2021-03-23 18:15:34 -04:00
midchildan
b67362d7f7
doc: add section for FUSE 2021-03-24 02:22:15 +09:00
Louis Blin
aae8588182 dockerTools.buildLayeredImage: support fromImage
It is now possible to pass a `fromImage` to `buildLayeredImage` and
`streamLayeredImage`, similar to what `buildImage` currently supports.

This will prepend the layers of the given base image to the resulting
image, while ensuring that at most `maxLayers` are used. It will also
ensure that environment variables from the base image are propagated
to the final image.
2021-03-23 14:50:42 +00:00
Bryan A. S
fdc7280a87 doc/builders/images/ocitools.xml: Convert to markdown
Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
2021-03-22 20:13:51 -03:00
Bryan A. S
dd50188f4b doc/builders/packages/citrix.xml: Convert to markdown
Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
2021-03-22 20:10:21 -03:00