···106107The following are supported:
108109-- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
110-- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
111-- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
112-- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
113-- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
114-- [`example`](https://tdg.docbook.org/tdg/5.0/example.html)
115116Example admonitions require a title to work.
117If you don't provide one, the manual won't be built.
···106107The following are supported:
108109+- `caution`
110+- `important`
111+- `note`
112+- `tip`
113+- `warning`
114+- `example`
115116Example admonitions require a title to work.
117If you don't provide one, the manual won't be built.
+12-17
doc/using/configuration.chapter.md
···1# Global configuration {#chap-packageconfig}
23-Nix comes with certain defaults about what packages can and cannot be installed, based on a package's metadata. By default, Nix will prevent installation if any of the following criteria are true:
045- The package is thought to be broken, and has had its `meta.broken` set to `true`.
6···1011- The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered in to the package's `meta.knownVulnerabilities`.
1213-Note that all this is checked during evaluation already, and the check includes any package that is evaluated. In particular, all build-time dependencies are checked. `nix-env -qa` will (attempt to) hide any packages that would be refused.
1415-Each of these criteria can be altered in the nixpkgs configuration.
0001617-The nixpkgs configuration for a NixOS system is set in the `configuration.nix`, as in the following example:
18-19-```nix
20-{
21- nixpkgs.config = {
22- allowUnfree = true;
23- };
24-}
25-```
26-27-However, this does not allow unfree software for individual users. Their configurations are managed separately.
28-29-A user's nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
3031```nix
32{
···34}
35```
3637-Note that we are not able to test or build unfree software on Hydra due to policy. Most unfree licenses prohibit us from either executing or distributing the software.
0003839## Installing broken packages {#sec-allow-broken}
40
···1# Global configuration {#chap-packageconfig}
23+Nix comes with certain defaults about which packages can and cannot be installed, based on a package's metadata.
4+By default, Nix will prevent installation if any of the following criteria are true:
56- The package is thought to be broken, and has had its `meta.broken` set to `true`.
7···1112- The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered in to the package's `meta.knownVulnerabilities`.
1314+Each of these criteria can be altered in the Nixpkgs configuration.
1516+:::{.note}
17+All this is checked during evaluation already, and the check includes any package that is evaluated.
18+In particular, all build-time dependencies are checked.
19+:::
2021+A user's Nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
0000000000002223```nix
24{
···26}
27```
2829+:::{.caution}
30+Unfree software is not tested or built in Nixpkgs continuous integration, and therefore not cached.
31+Most unfree licenses prohibit either executing or distributing the software.
32+:::
3334## Installing broken packages {#sec-allow-broken}
35
···1# Customising Packages {#sec-customising-packages}
23-Some packages in Nixpkgs have options to enable or disable optional
4-functionality or change other aspects of the package.
0000000000000000000000056::: {.warning}
7-Unfortunately, Nixpkgs currently lacks a way to query available
8-configuration options.
9:::
1011::: {.note}
···1# Customising Packages {#sec-customising-packages}
23+The Nixpkgs configuration for a NixOS system is set by the {option}`nixpkgs.config` option.
4+5+::::{.example}
6+# Globally allow unfree packages
7+8+```nix
9+{
10+ nixpkgs.config = {
11+ allowUnfree = true;
12+ };
13+}
14+```
15+16+:::{.note}
17+This only allows unfree software in the given NixOS configuration.
18+For users invoking Nix commands such as [`nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build), Nixpkgs is configured independently.
19+See the [Nixpkgs manual section on global configuration](https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig) for details.
20+:::
21+::::
22+23+<!-- TODO(@fricklerhandwerk)
24+all of the following should go to the Nixpkgs manual, it has nothing to do with NixOS
25+-->
26+27+Some packages in Nixpkgs have options to enable or disable optional functionality, or change other aspects of the package.
2829::: {.warning}
30+Unfortunately, Nixpkgs currently lacks a way to query available package configuration options.
031:::
3233::: {.note}
+1-1
nixos/modules/services/networking/knot.nix
···226 };
227228 settings = mkOption {
229- type = types.attrs;
230 default = {};
231 description = ''
232 Extra configuration as nix values.
···226 };
227228 settings = mkOption {
229+ type = types.submodule { freeformType = types.attrs; };
230 default = {};
231 description = ''
232 Extra configuration as nix values.
···1+{
2+ lib,
3+ stdenv,
4+ fetchFromGitHub,
5+ substituteAll,
6+ callPackage,
7+}:
8+9+# Note for maintainers:
10+#
11+# These packages are only allowed to be packaged under the the condition that we
12+# - patch source/creator/config.d to not point to upstream's bug tracker
13+# - use the "barebones" configuration to remove the mascot and logo from the build
14+#
15+# We have received permission by the owner to go ahead with the packaging, as we have met all the criteria
16+# https://github.com/NixOS/nixpkgs/pull/288841#issuecomment-1950247467
17+18+let
19+ mkGeneric = builderArgs: callPackage ./generic.nix { inherit builderArgs; };
20+in
21+{
22+ inochi-creator = mkGeneric rec {
23+ pname = "inochi-creator";
24+ appname = "Inochi Creator";
25+ version = "0.8.4";
26+27+ src = fetchFromGitHub {
28+ owner = "Inochi2D";
29+ repo = "inochi-creator";
30+ rev = "v${version}";
31+ hash = "sha256-wsB9KIZyot2Y+6QpQlIXRzv3cPCdwp2Q/ZfDizAKJc4=";
32+ };
33+34+ dubLock = ./creator-dub-lock.json;
35+36+ patches = [
37+ # Upstream asks that we change the bug tracker URL to not point to the upsteam bug tracker
38+ (substituteAll {
39+ src = ./support-url.patch;
40+ assignees = "TomaSajt"; # should be a comma separated list of the github usernames of the maintainers
41+ })
42+ # Change how duplicate locales differentiate themselves (the store paths were too long)
43+ ./translations.patch
44+ ];
45+46+ meta = {
47+ # darwin has slightly different build steps
48+ broken = stdenv.isDarwin;
49+ changelog = "https://github.com/Inochi2D/inochi-creator/releases/tag/${src.rev}";
50+ description = "An open source editor for the Inochi2D puppet format";
51+ };
52+ };
53+54+ inochi-session = mkGeneric rec {
55+ pname = "inochi-session";
56+ appname = "Inochi Session";
57+ version = "0.8.3";
58+59+ src = fetchFromGitHub {
60+ owner = "Inochi2D";
61+ repo = "inochi-session";
62+ rev = "v${version}";
63+ hash = "sha256-yq/uMWEeydZun07/7hgUaAw3IruRqrDuGgbe5NzNYxw=";
64+ };
65+66+ dubLock = ./session-dub-lock.json;
67+68+ preFixup = ''
69+ patchelf $out/share/inochi-session/inochi-session --add-needed cimgui.so
70+ '';
71+72+ dontStrip = true; # symbol lookup error: undefined symbol: , version
73+74+ meta = {
75+ # darwin has slightly different build steps, aarch fails to build because of some lua related error
76+ broken = stdenv.isDarwin || stdenv.isAarch64;
77+ changelog = "https://github.com/Inochi2D/inochi-session/releases/tag/${src.rev}";
78+ description = "An application that allows streaming with Inochi2D puppets";
79+ };
80+ };
81+}
···1+{
2+ lib,
3+ buildDubPackage,
4+ fetchFromGitHub,
5+ writeShellScriptBin,
6+7+ cmake,
8+ gettext,
9+ copyDesktopItems,
10+ makeDesktopItem,
11+ makeWrapper,
12+13+ dbus,
14+ freetype,
15+ SDL2,
16+ gnome,
17+18+ builderArgs,
19+}:
20+21+let
22+ cimgui-src = fetchFromGitHub {
23+ owner = "Inochi2D";
24+ repo = "cimgui";
25+ rev = "49bb5ce65f7d5eeab7861d8ffd5aa2a58ca8f08c";
26+ hash = "sha256-XcnZbIjwq7vmYBnMAs+cEpJL8HB8wrL098FXGxC+diA=";
27+ fetchSubmodules = true;
28+ };
29+30+ inherit (builderArgs)
31+ pname
32+ appname
33+ version
34+ dubLock
35+ meta
36+ ;
37+in
38+buildDubPackage (
39+ builderArgs
40+ // {
41+ nativeBuildInputs = [
42+ cmake # used for building `i2d-imgui`
43+ gettext # used when generating translations
44+ copyDesktopItems
45+ makeWrapper
46+47+ # A fake git implementation to be used by the `gitver` package
48+ # It is a dependency of the main packages and the `inochi2d` dub dependency
49+ # A side effect of this script is that `inochi2d` will have the same version listed as the main package
50+ (writeShellScriptBin "git" "echo v${version}")
51+ ];
52+53+ buildInputs = [
54+ dbus
55+ freetype
56+ SDL2
57+ ];
58+59+ dontUseCmakeConfigure = true;
60+61+ # these deps are not listed inside `dub.sdl`, so they didn't get auto-generated
62+ # these are used for generating version info when building
63+ dubLock = lib.recursiveUpdate (lib.importJSON dubLock) {
64+ dependencies = {
65+ gitver = {
66+ version = "1.6.1";
67+ sha256 = "sha256-NCyFik4FbD7yMLd5zwf/w4cHwhzLhIRSVw1bWo/CZB4=";
68+ };
69+ semver = {
70+ version = "0.3.2";
71+ sha256 = "sha256-l6c9hniUd5xNsJepq8x30e0JTjmXs4pYUmv4ws+Nrn4=";
72+ };
73+ };
74+ };
75+76+ postConfigure = ''
77+ cimgui_dir=("$DUB_HOME"/packages/i2d-imgui/*/i2d-imgui)
78+79+ # `i2d-imgui` isn't able to find SDL2 by default due to it being written in lower case
80+ # this is only an issue when compiling statically (session)
81+ substituteInPlace "$cimgui_dir/dub.json" \
82+ --replace-fail '"sdl2"' '"SDL2"'
83+84+ # The `i2d-cimgui` dub dependency fetched inside the auto-generated `*-deps.nix` file
85+ # which doesn't know that it's actually a git repo, so it doesn't fetch its submodules.
86+ # Upstream uses a cmake script to fetch the `cimgui` submodule anyway, which we can't do
87+ # We get around this by manually pre-fetching the submodule and copying it into the right place
88+ cp -r --no-preserve=all ${cimgui-src}/* "$cimgui_dir/deps/cimgui"
89+90+ # Disable the original cmake fetcher script
91+ substituteInPlace "$cimgui_dir/deps/CMakeLists.txt" \
92+ --replace-fail "PullSubmodules(" "# PullSubmodules(" \
93+ --replace-fail "\''${cimgui_SUBMOD_DIR}" "cimgui"
94+ '';
95+96+ preBuild = ''
97+ # Generate translations (if possible)
98+ . gentl.sh
99+100+ # Use the fake git to generate version info
101+ dub build --skip-registry=all --compiler=ldc2 --build=release --config=meta
102+ '';
103+104+ # Use the "barebones" configuration so that we don't include the mascot and icon files in out build
105+ dubFlags = [ "--config=barebones" ];
106+107+ installPhase = ''
108+ runHook preInstall
109+110+ mkdir -p $out/share/${pname}
111+ cp -r out/* $out/share/${pname}
112+113+ runHook postInstall
114+ '';
115+116+ desktopItems = [
117+ (makeDesktopItem {
118+ name = pname;
119+ desktopName = appname;
120+ exec = pname;
121+ comment = meta.description;
122+ categories = [ "Utility" ];
123+ })
124+ ];
125+126+ postFixup = ''
127+ # Add support for `open file` dialog
128+ makeWrapper $out/share/${pname}/${pname} $out/bin/${pname} \
129+ --prefix PATH : ${lib.makeBinPath [ gnome.zenity ]}
130+ '';
131+132+ meta = {
133+ homepage = "https://inochi2d.com/";
134+ license = lib.licenses.bsd2;
135+ mainProgram = pname;
136+ maintainers = with lib.maintainers; [ tomasajt ];
137+ } // meta;
138+ }
139+)
···1+diff --git a/source/creator/config.d b/source/creator/config.d
2+index 4289703..d8dea4e 100644
3+--- a/source/creator/config.d
4++++ b/source/creator/config.d
5+@@ -30,7 +30,7 @@ enum INC_BANNER_ARTIST_PAGE = "https://mastodon.art/@nighteden";
6+ /**
7+ URI for bug reports, for unofficial builds this SHOULD be changed.
8+ */
9+-enum INC_BUG_REPORT_URI = "https://github.com/Inochi2D/inochi-creator/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBUG%5D";
10++enum INC_BUG_REPORT_URI = "https://github.com/NixOS/nixpkgs/issues/new?assignees=@assignees@&labels=0.kind%3A+bug&projects=&template=bug_report.md&title=inochi-creator:";
11+12+ /**
13+ URI for feature requests, for the most part this doesn't need to be changed
···23buildGoModule rec {
4 pname = "credhub-cli";
5- version = "2.9.28";
67 src = fetchFromGitHub {
8 owner = "cloudfoundry-incubator";
9 repo = "credhub-cli";
10 rev = version;
11- sha256 = "sha256-2LHWbTvxE8awSUm33XocjWxrY8dosMEaCPOx85+tj4s=";
12 };
1314 # these tests require network access that we're not going to give them
···23buildGoModule rec {
4 pname = "credhub-cli";
5+ version = "2.9.29";
67 src = fetchFromGitHub {
8 owner = "cloudfoundry-incubator";
9 repo = "credhub-cli";
10 rev = version;
11+ sha256 = "sha256-6icF+Dg4IdCjeqcX058aewj702oCoch6VYqgdCVPoNc=";
12 };
1314 # these tests require network access that we're not going to give them
-7
pkgs/tools/admin/mycli/default.nix
···42 "mycli/packages/paramiko_stub/__init__.py"
43 ];
4445- disabledTests = [
46- # Note: test_auto_escaped_col_names is currently failing due to a bug upstream.
47- # TODO: re-enable this test once there is a fix upstream. See
48- # https://github.com/dbcli/mycli/issues/1103 for details.
49- "test_auto_escaped_col_names"
50- ];
51-52 postPatch = ''
53 substituteInPlace setup.py \
54 --replace "cryptography == 36.0.2" "cryptography"