···106106107107The following are supported:
108108109109-- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
110110-- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
111111-- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
112112-- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
113113-- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
114114-- [`example`](https://tdg.docbook.org/tdg/5.0/example.html)
109109+- `caution`
110110+- `important`
111111+- `note`
112112+- `tip`
113113+- `warning`
114114+- `example`
115115116116Example admonitions require a title to work.
117117If you don't provide one, the manual won't be built.
+12-17
doc/using/configuration.chapter.md
···11# Global configuration {#chap-packageconfig}
2233-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:
33+Nix comes with certain defaults about which packages can and cannot be installed, based on a package's metadata.
44+By default, Nix will prevent installation if any of the following criteria are true:
4556- The package is thought to be broken, and has had its `meta.broken` set to `true`.
67···10111112- 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`.
12131313-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.
1414+Each of these criteria can be altered in the Nixpkgs configuration.
14151515-Each of these criteria can be altered in the nixpkgs configuration.
1616+:::{.note}
1717+All this is checked during evaluation already, and the check includes any package that is evaluated.
1818+In particular, all build-time dependencies are checked.
1919+:::
16201717-The nixpkgs configuration for a NixOS system is set in the `configuration.nix`, as in the following example:
1818-1919-```nix
2020-{
2121- nixpkgs.config = {
2222- allowUnfree = true;
2323- };
2424-}
2525-```
2626-2727-However, this does not allow unfree software for individual users. Their configurations are managed separately.
2828-2929-A user's nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
2121+A user's Nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
30223123```nix
3224{
···3426}
3527```
36283737-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.
2929+:::{.caution}
3030+Unfree software is not tested or built in Nixpkgs continuous integration, and therefore not cached.
3131+Most unfree licenses prohibit either executing or distributing the software.
3232+:::
38333934## Installing broken packages {#sec-allow-broken}
4035
···11# Customising Packages {#sec-customising-packages}
2233-Some packages in Nixpkgs have options to enable or disable optional
44-functionality or change other aspects of the package.
33+The Nixpkgs configuration for a NixOS system is set by the {option}`nixpkgs.config` option.
44+55+::::{.example}
66+# Globally allow unfree packages
77+88+```nix
99+{
1010+ nixpkgs.config = {
1111+ allowUnfree = true;
1212+ };
1313+}
1414+```
1515+1616+:::{.note}
1717+This only allows unfree software in the given NixOS configuration.
1818+For users invoking Nix commands such as [`nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build), Nixpkgs is configured independently.
1919+See the [Nixpkgs manual section on global configuration](https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig) for details.
2020+:::
2121+::::
2222+2323+<!-- TODO(@fricklerhandwerk)
2424+all of the following should go to the Nixpkgs manual, it has nothing to do with NixOS
2525+-->
2626+2727+Some packages in Nixpkgs have options to enable or disable optional functionality, or change other aspects of the package.
528629::: {.warning}
77-Unfortunately, Nixpkgs currently lacks a way to query available
88-configuration options.
3030+Unfortunately, Nixpkgs currently lacks a way to query available package configuration options.
931:::
10321133::: {.note}
+1-1
nixos/modules/services/networking/knot.nix
···226226 };
227227228228 settings = mkOption {
229229- type = types.attrs;
229229+ type = types.submodule { freeformType = types.attrs; };
230230 default = {};
231231 description = ''
232232 Extra configuration as nix values.
···11+{
22+ lib,
33+ stdenv,
44+ fetchFromGitHub,
55+ substituteAll,
66+ callPackage,
77+}:
88+99+# Note for maintainers:
1010+#
1111+# These packages are only allowed to be packaged under the the condition that we
1212+# - patch source/creator/config.d to not point to upstream's bug tracker
1313+# - use the "barebones" configuration to remove the mascot and logo from the build
1414+#
1515+# We have received permission by the owner to go ahead with the packaging, as we have met all the criteria
1616+# https://github.com/NixOS/nixpkgs/pull/288841#issuecomment-1950247467
1717+1818+let
1919+ mkGeneric = builderArgs: callPackage ./generic.nix { inherit builderArgs; };
2020+in
2121+{
2222+ inochi-creator = mkGeneric rec {
2323+ pname = "inochi-creator";
2424+ appname = "Inochi Creator";
2525+ version = "0.8.4";
2626+2727+ src = fetchFromGitHub {
2828+ owner = "Inochi2D";
2929+ repo = "inochi-creator";
3030+ rev = "v${version}";
3131+ hash = "sha256-wsB9KIZyot2Y+6QpQlIXRzv3cPCdwp2Q/ZfDizAKJc4=";
3232+ };
3333+3434+ dubLock = ./creator-dub-lock.json;
3535+3636+ patches = [
3737+ # Upstream asks that we change the bug tracker URL to not point to the upsteam bug tracker
3838+ (substituteAll {
3939+ src = ./support-url.patch;
4040+ assignees = "TomaSajt"; # should be a comma separated list of the github usernames of the maintainers
4141+ })
4242+ # Change how duplicate locales differentiate themselves (the store paths were too long)
4343+ ./translations.patch
4444+ ];
4545+4646+ meta = {
4747+ # darwin has slightly different build steps
4848+ broken = stdenv.isDarwin;
4949+ changelog = "https://github.com/Inochi2D/inochi-creator/releases/tag/${src.rev}";
5050+ description = "An open source editor for the Inochi2D puppet format";
5151+ };
5252+ };
5353+5454+ inochi-session = mkGeneric rec {
5555+ pname = "inochi-session";
5656+ appname = "Inochi Session";
5757+ version = "0.8.3";
5858+5959+ src = fetchFromGitHub {
6060+ owner = "Inochi2D";
6161+ repo = "inochi-session";
6262+ rev = "v${version}";
6363+ hash = "sha256-yq/uMWEeydZun07/7hgUaAw3IruRqrDuGgbe5NzNYxw=";
6464+ };
6565+6666+ dubLock = ./session-dub-lock.json;
6767+6868+ preFixup = ''
6969+ patchelf $out/share/inochi-session/inochi-session --add-needed cimgui.so
7070+ '';
7171+7272+ dontStrip = true; # symbol lookup error: undefined symbol: , version
7373+7474+ meta = {
7575+ # darwin has slightly different build steps, aarch fails to build because of some lua related error
7676+ broken = stdenv.isDarwin || stdenv.isAarch64;
7777+ changelog = "https://github.com/Inochi2D/inochi-session/releases/tag/${src.rev}";
7878+ description = "An application that allows streaming with Inochi2D puppets";
7979+ };
8080+ };
8181+}
+139
pkgs/applications/misc/inochi2d/generic.nix
···11+{
22+ lib,
33+ buildDubPackage,
44+ fetchFromGitHub,
55+ writeShellScriptBin,
66+77+ cmake,
88+ gettext,
99+ copyDesktopItems,
1010+ makeDesktopItem,
1111+ makeWrapper,
1212+1313+ dbus,
1414+ freetype,
1515+ SDL2,
1616+ gnome,
1717+1818+ builderArgs,
1919+}:
2020+2121+let
2222+ cimgui-src = fetchFromGitHub {
2323+ owner = "Inochi2D";
2424+ repo = "cimgui";
2525+ rev = "49bb5ce65f7d5eeab7861d8ffd5aa2a58ca8f08c";
2626+ hash = "sha256-XcnZbIjwq7vmYBnMAs+cEpJL8HB8wrL098FXGxC+diA=";
2727+ fetchSubmodules = true;
2828+ };
2929+3030+ inherit (builderArgs)
3131+ pname
3232+ appname
3333+ version
3434+ dubLock
3535+ meta
3636+ ;
3737+in
3838+buildDubPackage (
3939+ builderArgs
4040+ // {
4141+ nativeBuildInputs = [
4242+ cmake # used for building `i2d-imgui`
4343+ gettext # used when generating translations
4444+ copyDesktopItems
4545+ makeWrapper
4646+4747+ # A fake git implementation to be used by the `gitver` package
4848+ # It is a dependency of the main packages and the `inochi2d` dub dependency
4949+ # A side effect of this script is that `inochi2d` will have the same version listed as the main package
5050+ (writeShellScriptBin "git" "echo v${version}")
5151+ ];
5252+5353+ buildInputs = [
5454+ dbus
5555+ freetype
5656+ SDL2
5757+ ];
5858+5959+ dontUseCmakeConfigure = true;
6060+6161+ # these deps are not listed inside `dub.sdl`, so they didn't get auto-generated
6262+ # these are used for generating version info when building
6363+ dubLock = lib.recursiveUpdate (lib.importJSON dubLock) {
6464+ dependencies = {
6565+ gitver = {
6666+ version = "1.6.1";
6767+ sha256 = "sha256-NCyFik4FbD7yMLd5zwf/w4cHwhzLhIRSVw1bWo/CZB4=";
6868+ };
6969+ semver = {
7070+ version = "0.3.2";
7171+ sha256 = "sha256-l6c9hniUd5xNsJepq8x30e0JTjmXs4pYUmv4ws+Nrn4=";
7272+ };
7373+ };
7474+ };
7575+7676+ postConfigure = ''
7777+ cimgui_dir=("$DUB_HOME"/packages/i2d-imgui/*/i2d-imgui)
7878+7979+ # `i2d-imgui` isn't able to find SDL2 by default due to it being written in lower case
8080+ # this is only an issue when compiling statically (session)
8181+ substituteInPlace "$cimgui_dir/dub.json" \
8282+ --replace-fail '"sdl2"' '"SDL2"'
8383+8484+ # The `i2d-cimgui` dub dependency fetched inside the auto-generated `*-deps.nix` file
8585+ # which doesn't know that it's actually a git repo, so it doesn't fetch its submodules.
8686+ # Upstream uses a cmake script to fetch the `cimgui` submodule anyway, which we can't do
8787+ # We get around this by manually pre-fetching the submodule and copying it into the right place
8888+ cp -r --no-preserve=all ${cimgui-src}/* "$cimgui_dir/deps/cimgui"
8989+9090+ # Disable the original cmake fetcher script
9191+ substituteInPlace "$cimgui_dir/deps/CMakeLists.txt" \
9292+ --replace-fail "PullSubmodules(" "# PullSubmodules(" \
9393+ --replace-fail "\''${cimgui_SUBMOD_DIR}" "cimgui"
9494+ '';
9595+9696+ preBuild = ''
9797+ # Generate translations (if possible)
9898+ . gentl.sh
9999+100100+ # Use the fake git to generate version info
101101+ dub build --skip-registry=all --compiler=ldc2 --build=release --config=meta
102102+ '';
103103+104104+ # Use the "barebones" configuration so that we don't include the mascot and icon files in out build
105105+ dubFlags = [ "--config=barebones" ];
106106+107107+ installPhase = ''
108108+ runHook preInstall
109109+110110+ mkdir -p $out/share/${pname}
111111+ cp -r out/* $out/share/${pname}
112112+113113+ runHook postInstall
114114+ '';
115115+116116+ desktopItems = [
117117+ (makeDesktopItem {
118118+ name = pname;
119119+ desktopName = appname;
120120+ exec = pname;
121121+ comment = meta.description;
122122+ categories = [ "Utility" ];
123123+ })
124124+ ];
125125+126126+ postFixup = ''
127127+ # Add support for `open file` dialog
128128+ makeWrapper $out/share/${pname}/${pname} $out/bin/${pname} \
129129+ --prefix PATH : ${lib.makeBinPath [ gnome.zenity ]}
130130+ '';
131131+132132+ meta = {
133133+ homepage = "https://inochi2d.com/";
134134+ license = lib.licenses.bsd2;
135135+ mainProgram = pname;
136136+ maintainers = with lib.maintainers; [ tomasajt ];
137137+ } // meta;
138138+ }
139139+)
···11+diff --git a/source/creator/config.d b/source/creator/config.d
22+index 4289703..d8dea4e 100644
33+--- a/source/creator/config.d
44++++ b/source/creator/config.d
55+@@ -30,7 +30,7 @@ enum INC_BANNER_ARTIST_PAGE = "https://mastodon.art/@nighteden";
66+ /**
77+ URI for bug reports, for unofficial builds this SHOULD be changed.
88+ */
99+-enum INC_BUG_REPORT_URI = "https://github.com/Inochi2D/inochi-creator/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBUG%5D";
1010++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:";
1111+1212+ /**
1313+ URI for feature requests, for the most part this doesn't need to be changed
···2233buildGoModule rec {
44 pname = "credhub-cli";
55- version = "2.9.28";
55+ version = "2.9.29";
6677 src = fetchFromGitHub {
88 owner = "cloudfoundry-incubator";
99 repo = "credhub-cli";
1010 rev = version;
1111- sha256 = "sha256-2LHWbTvxE8awSUm33XocjWxrY8dosMEaCPOx85+tj4s=";
1111+ sha256 = "sha256-6icF+Dg4IdCjeqcX058aewj702oCoch6VYqgdCVPoNc=";
1212 };
13131414 # these tests require network access that we're not going to give them
-7
pkgs/tools/admin/mycli/default.nix
···4242 "mycli/packages/paramiko_stub/__init__.py"
4343 ];
44444545- disabledTests = [
4646- # Note: test_auto_escaped_col_names is currently failing due to a bug upstream.
4747- # TODO: re-enable this test once there is a fix upstream. See
4848- # https://github.com/dbcli/mycli/issues/1103 for details.
4949- "test_auto_escaped_col_names"
5050- ];
5151-5245 postPatch = ''
5346 substituteInPlace setup.py \
5447 --replace "cryptography == 36.0.2" "cryptography"