Commit Graph

44 Commits

Author SHA1 Message Date
quantenzitrone
93a668bc54 squashfs-tools: rename from squashfsTools, enable structuredAttrs
upstream package is called squashfs-tools and other distros also call the package this way https://repology.org/project/squashfs-tools
2026-08-17 14:32:21 +02:00
Ben Siraphob
062d2b697e pkgs: fix typos in applications, data, desktops, games and misc
Assisted-by: Claude Code (claude-opus-5)
2026-08-02 11:15:27 -07:00
Gaetan Lepage
d4f0bfbdc5 {apptainer,singularity}: enable __structuredAttrs 2026-05-11 23:35:04 +00:00
Dyego Aurélio
28096cc5e3 treewide: apply nixfmt 1.2.0 2026-01-22 18:37:56 -03:00
Jonathan Davies
116036d574 treewide: Remove redundant versionCheckProgramArg = "--version"; with:
```shell
git grep -l -e 'versionCheckProgramArg = "--version";' -e 'versionCheckProgramArg = \[ "--version" \];' | while read f; do
  sed -i '/versionCheckProgramArg/d' "$f"
  sed -i '/^$/N;/\n$/D' "$f"
done
```
2025-11-20 10:39:02 +00:00
dish
1abe09920e singularity: remove un-needed backwards compat layer
Per the deleted comments, this was intended to be removed after 25.05
2025-10-03 22:19:06 -04:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Yueh-Shun Li
016a24e4dc apptainer, singularity: deprecate workarounds for vendorHash overriding
Remove obsolete overriding workarounds for vendorHash, deleteVendor and
proxyVendor (through the <pkg>.override interface).

The workaround functionality has been fixed by commit eed069a5bc
("buildGoModule: fix overrideAttrs overriding"), and these arguments can
now be overridden using <pkg>.overrideAttrs.
2025-03-31 19:49:54 +08:00
Gaetan Lepage
7066797504 {singularity,apptainer}: cleanup 2025-03-14 21:19:13 +05:30
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
Wolfgang Walther
ebd18cf115 treewide: replace substituteAll with replaceVars (#1)
Driving #237216 forward.
2024-12-15 22:25:35 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Aleksana
fe465a1c28 apptainer, singularity: fix the update instructions in the comment (#359528) 2024-12-06 22:54:07 +08:00
Yueh-Shun Li
037a7cbe01 apptainer: singularity: use lib.concatMapAttrsStringSep
Use concatMapAttrsStringSep helper function from the standard library
instead of the locally-improvised one.
2024-12-06 11:02:27 +08:00
Yueh-Shun Li
0254bc6782 apptainer, singularity: fix the update instructions in the comment 2024-12-06 00:53:10 +08:00
Wolfgang Walther
89981f1968 singularity: remove deprecated arguments
Those were scheduled for removal in 24.11.
2024-11-22 21:01:53 +01:00
Philip Taron
e1854c33b2 singularity: remove with statements
This is a generic meta, so it doesn't fall into the "simple" pattern as I see it.
2024-08-18 06:31:14 -07:00
Yueh-Shun Li
c3026ac986 apptainer, singularity: warn abuot argument deprecation
Warn when arguments newuidmapPath and newgidmapPath is used.
2024-06-03 07:53:30 +08:00
Yueh-Shun Li
f6d9b4b6fc apptainer, singularity: add argument systemBinPaths
Use systemBinPaths as the new way to specify system bin paths,
especifally for SUID'ed binaries.

Deprecate arguments setuidmapPath and setgidmapPath in favour of
systemBinPaths.

Add NixOS configuration option programs.singularity.systemBinPath, with
"/run/wrappers/bin" included by default.
2024-06-03 07:53:21 +08:00
Yueh-Shun Li
409cbbe61a apptainer, singularity: prioritize original defaultPath
Prefix the upstream-given defalutPath value over the one constructed by
defaultPathInputs.

Make SUID'ed binaries searchable out-of-the-box non-NixOS platforms.
2024-06-03 07:23:40 +08:00
Yueh-Shun Li
2ab0240295 apptainer, singularity: refactor defaultPath substitution
Add argument sourceFilesWithDefaultPaths to specify the "defaultPath"s
to substitute.

Passthru "sourceFilesWithDefaultPaths" for easier overriding.

Use "--replace-fail" during defalutPath substitution.
2024-04-26 14:45:53 +08:00
Yueh-Shun Li
7a8bdf766d apptainer, singularity: add mount to defaultPathInputs 2024-04-26 14:02:13 +08:00
Yueh-Shun Li
7b62cf00cb apptainer, singularity: avoid list absorption when appended by two more ++ 2024-04-25 14:05:53 +08:00
Yueh-Shun Li
39db1c03ef apptainer, singularity: format Nix expression with nixfmt
Make the Nix expression generic.nix and package.nix conformant to Nix
RFC 166.
2024-04-25 14:01:21 +08:00
Yueh-Shun Li
484782e7f4 apptainer: rearrange dependencies 2024-04-25 13:00:10 +08:00
Sergei Trofimovich
7dde9fa428 apptainer.gpuChecks.saxpy: fix the eval
Without the change the eval fails as:

    $ nix build --no-link -f. apptainer.gpuChecks.saxpy
    error:
           error: attribute 'image-saxpy' missing
           at pkgs/applications/virtualization/singularity/generic.nix:303:72:
              302|                 ''
              303|                   ${lib.getExe finalAttrs.finalPackage} exec --nv $@ ${finalAttrs.passthru.tests.image-saxpy} saxpy
                 |                                                                        ^
              304|                 '';
2024-03-16 20:29:17 +00:00
Someone Serge
562dd63932 apptainer: fix nvliblist.conf-based --nv
(cherry picked from commit 680bbed84f)
2024-01-10 20:47:55 +00:00
Someone Serge
231aca2b97 apptainer: add a cuda test
(cherry picked from commit 0c4fe1f452)
2024-01-10 20:47:34 +00:00
Someone Serge
c76883f955 apptainer: allow --nvccli with read-only images
(cherry picked from commit 07305dff4f)
2024-01-10 17:39:50 +00:00
Silvan Mosberger
bf01ec00a0 Merge pull request #250949 from ShamrockLee/apptainer-localstatedir
apptainer, singularity: use self-contained LOCALSTATEDIR by default
2023-11-23 01:37:54 +01:00
Justin Bedő
430b94c3a2 Merge pull request #230992 from ShamrockLee/singularity-nvidia
apptainer, singularity: fix wrapper PATH prefix
2023-08-25 14:41:20 +10:00
Yueh-Shun Li
ac77669531 apptainer, singularity: make LOCALSTATEDIR internal by default
Use "$out/var/lib" as LOCALSTATEDIR configuration value
by default intsead of "/var/lib"
as a way toward top-level-directory independent runtime.

Add input argument externalLocalStateDir to optionally specify the
path to external LOCALSTATEDIR if not null.

Add NixOS module option
programs.singularity.enableExternalLocalStateDir (default to true)
to use "/var/lib" as LOCALSTATEDIR.
2023-08-23 18:40:20 +08:00
Artturi
c831e7939f Merge pull request #242905 from Artturin/gomodu1 2023-07-14 01:36:16 +03:00
Artturin
1c29673fcc treewide: go-modules -> goModules
In 787af0f79f
I had to change ${go-modules} to $goModules to allow overrideAttrs to work;
However, env vars cannot contain -, so  i had to change go-modules too.
This in turn broke nix-update because it uses the go-modules attr.

Instead of making nix-update more complicated, make go-modules naming match cargoDeps.

`fd --type f | xargs sd '\bgo-modules\b' 'goModules'`
and revert change to pkgs/applications/misc/dstask/default.nix
and pkgs/servers/http/dave/default.nix
and pkgs/os-specific/darwin/plistwatch/default.nix

release note added
2023-07-14 00:18:06 +03:00
Robert Scott
8dda355280 apptainer: disable fortify3 hardening flag 2023-07-09 11:51:26 +01:00
Yueh-Shun Li
0fcf35ae58 singularity: specify "nvidia-container-cli path" 2023-05-19 06:57:18 +00:00
Yueh-Shun Li
466e154fb2 apptainer, singularity: fix wrapper PATH prefix
Fix the missing trailing /bin in f6e7fcc
2023-05-18 00:30:40 +00:00
Yueh-Shun Li
722948a942 singularity, apptainer: adjust dependencies 2023-04-08 17:13:35 +08:00
Yueh-Shun Li
f6e7fccfa6 apptainer, singularity: unify the PATH prefix to defaultPath and wrapProgram
Use defaultPathInputs to control both path prefixes,
reducing the number of input lists to maintain.
2023-04-06 12:40:09 +08:00
Yueh-Shun Li
1f32cee4d4 apptainer, singularity: add passthru.tests.image-hello-cowsay
Add image-building tests with singularity-tools
2023-04-05 04:08:29 +08:00
Felix Buehler
d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
Yueh-Shun Li
6e9902c7f6 apptainer: always specify either --with-suid or --without-suid build flag 2023-02-19 07:55:10 +00:00
Yueh-Shun Li
71a89291ee apptainer, singularity: enable non-FHS --fakeroot support
This patch provides input arguments `newuidmapPath` and `newgidmapPath`
for apptainer and singularity to specify the path to the SUID-ed executables
newuidmap and newgidmap where they are not available from the FHS PATH.

As NixOS places those suided executables in a non-FHS position
(/run/wrapper/bin), this patch provides
programs.singularity.enableFakeroot option and implement with the above
input parameters.
2023-02-08 18:04:05 +08:00
Yueh-Shun Li
50788d2fb0 apptainer, singularity: fix defaultPath and reflect upstream changes
Upstream changes:
singularity 3.8.7 (the legacy) -> apptainer 1.1.3 (the renamed) / singularity 3.10.4 (Sylabs's fork)

Build process:
*   Share between different sources
*   Fix the sed regexp to make defaultPath patch work
*   allowGoReference is now true
*   Provied input parameter removeCompat (default to false)
    that removes the compatible "*singularity*" symbolic links
    and related autocompletion files when projectName != "singularity"
*   Change localstatedir to /var/lib
*   Format with nixpkgs-fmt
*   Fix the defaultPath patching
    and use it instead of the `<executable> path` config directive
    deprecated in Apptainer
*   Provide dependencies for new functionalities such as
    squashfuse (unprivileged squashfs mount)
*   Provide an attribute `defaultPathInputs` to override
    prefix of container runtime default PATH

NixOS module programs.singularity:
*   Allow users to specify packages
*   Place related directories to /var/lib
*   Format with nixpkgs-fmt

singularity-tools:
*   Allow users to specify packages
*   Place related directories to /var/lib when building images in VM
2023-02-08 18:03:11 +08:00