jiebi/CodeConvo huggingface dataset:
Change:
name = "something-hook"; propagatedBuildInputs = [ pkgs.commandsomething ]; depsTargetTargetPropagated = [ pkgs.libsomething ]; <del> } ./script.sh </del> <ins> } ./script.sh; </ins> ``` ### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example} ```nix <del> pkgs.makeSetupHook { </del> <ins> pkgs.makeSetupHook { </ins> name = "run-hello-hook"; <del> propagatedBuildInputs = [ pkgs.hello ]; substitutions = { shell = "${pkgs.bash}/bin/bash"; }; passthru.tests.greeting = callPackage ./test { }; meta.platforms = lib.platforms.linux; } (writeScript "run-hello-hook.sh" '' #!@shell@ hello '') </del> <ins> # Put dependencies here if they have hooks or necessary dependencies propagated # otherwise prefer direct paths to executables. propagatedBuildInputs = [ pkgs.hello pkgs.cowsay ]; substitutions = { shell = "${pkgs.bash}/bin/bash"; cowsay = "${pkgs.cowsay}/bin/cowsay"; }; } ( writeScript "run-hello-hook.sh" '' #!@shell@ # the direct path to the executable has to be here because # this will be run when the file is sourced # at which point '$PATH' has not yet been populated with inputs @cowsay@ cow _printHelloHook() { hello } preConfigureHooks+=(_printHelloHook) '' ); </ins> ``` ## Attributes {#sec-pkgs.makeSetupHook-attributes}

Discussion:
The in the nixpkgs manual has this example: But it isn't clear how this is supposed to be used. suggests that the hook is self-contained in its dependency, but this example fails to build: With Give a minimal example usage of it. <!-- make sure this issue is not redundant or obsolete --- [x] checked [latest Nixpkgs manual] ([source][nixpkgs-source]) and [latest NixOS manual] ([source][nixos-source]) [x] checked [open documentation issues] for possible duplicates [x] checked [open documentation pull requests] for possible solutions [latest Nixpkgs manual]: [latest NixOS manual]: [nixpkgs-source]: [nixos-source]: [open documentation issues]: [open documentation pull requests]: Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
, imagemagick , mesa , libdrm <del> , flutter </del> <ins> , flutter316 </ins> , pulseaudio , makeDesktopItem , gnome

Discussion:
Package name: Flutter Latest released version: 3.19.0 <!-- Search your package here: --- Current version on the unstable channel: 3.16.7 Current version on the stable/release channel: 3.13.8 <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. --Note for maintainers: Please tag this issue in your PR. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
buildInputs = [ vim-customized ]; buildPhase = '' <ins> runHook preBuild </ins> # generate the helptags vim -u NONE -c "helptags $(pwd)/doc" -c q <ins> runHook postBuild </ins> ''; <del> patches = [ ./helptags.patch ]; </del> <ins> patches = [ # Don't generate helptags at runtime into read-only $SPACEVIMDIR ./helptags.patch ]; </ins> installPhase = '' <ins> runHook preInstall </ins> mkdir -p $out/bin cp -r $(pwd) $out/SpaceVim

Discussion:
Describe the bug Each time spacevim is started, the "startify" onboarding prompt is displayed, followed by an error message. To Reproduce Steps to reproduce the behavior: prompt (or or ) fails to proceed ( ) over to confirm the bug persists Expected behavior The prompt should be shown at most once at first startup. Upstream behavior would be to show it once and save in the user's home directory, nixified behavior would be to never show this and get customized configuration information from the derivation. Screenshots If applicable, add screenshots to help explain your problem. ! ! Additional context Inspection reveals that the sets to point to the generated toml file instead of a directory containing it. One approach would be to synthesize that directory with a small derivation. AFAICT does not host anything else but I could be mistaken. That being said, it gets to () so this could be used to symlink plugins maybe...? The error message is Also last month. Notify maintainers Metadata Please run and paste the result. system: host os: multi-user?: sandbox: version: channels(root): channels(louis): nixpkgs: Maintainer information:
Change:
mesonBuildType = "release"; <del> mesonFlags = lib.optionals glfwSupport [ "-Ddxvk_native_wsi=glfw" ]; </del> doCheck = true; passthru.updateScript = gitUpdater { rev-prefix = "v"; };

Discussion:
Package name: dxvk Latest released version: <!-- Search your package here: --- Current version on the unstable channel: 2.3.1 Current version on the stable/release channel: 2.3.1 <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. --Note for maintainers: Please tag this issue in your PR. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
User = cfg.user; ExecStart = "${pkg}/bin/celery --app paperless beat --loglevel INFO"; Restart = "on-failure"; <ins> LoadCredential = lib.optionalString (cfg.passwordFile != null) "PAPERLESS_ADMIN_PASSWORD:${cfg.passwordFile}"; </ins> }; environment = env;

Discussion:
I want to use but with and residing on an NFS mounted path. My NFS server is secured to only allow access from . I also have enabled on my NFS server, as is the recommended best practice. But the paperless module uses tmpfiles to ensure those directories are created, but root does not have permission to create files in the nfs share. Result: To be clear the nfs mounted path is so and are inside the mount. Notably the paperless service still works, if I ensure those directories exist myself. But the tmpfiles rules setup service still errors out. One workaround I thought might work would be to set and to and then set those env vars myself. However the NixOS module requires those two options to be set. Possible fixes: sub-directories could be created inside a systemd service that is running as the user. this wouldn't work without some shenangiams because if the dir is something like the user won't have permissions to make and optional so the admin can manage setting them this isn't ideal because then the user also has to muck with a flag to bypass the and let the admin manage it themselves. this my favored option I'm happy to open a PR if the maintainers like one of those options. Steps to reproduce the behavior: with and on nfs monts those directories don't exist in the nfs mount should work without error. Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
$ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch ``` <del> If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`: - `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it. - `stripLen`: Remove the first `stripLen` components of pathnames in the patch. - `extraPrefix`: Prefix pathnames by this string. - `excludes`: Exclude files matching these patterns (applies after the above arguments). - `includes`: Include only files matching these patterns (applies after the above arguments). - `revert`: Revert the patch. Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `sha256` argument is changed as well. </del> ## Package tests {#sec-package-tests} Tests are important to ensure quality and make reviews and automatic updates easy.

Discussion:
has only basic documentation for its so far. For example, the and / options aren't documented. That makes it very error-prone to use. For example, it would be useful to know that runs before . That means that if you have paths like and you try to keep only the parts using then this won't work, because will already strip off and , so your won't work and there is no you could possibly write to achieve the goal. That would be nice to know ahead of time.
In addition to documenting the options, some guidelines on when to use and when to add a patch to the nixpkgs repo would be helpful. This question comes up frequently in PRs.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . on the on .
I still think this should be documented.
I marked this as stale due to inactivity. &rarr;
still
would you be up to starting a PR on what you figured out so far? Happy to review what you come up with, and add notes :-)
I marked this as stale due to inactivity. &rarr;
Here's what we have currently documented, in : It seems that the options are documented now, only the detail that if is used, it is handled before ? I didn't quiet understand what you tried to explain
Documented in .
I think the confusing part here is that the arguments for are documented in , not . I'll send a PR moving it to the latter location, and a hyperlink to the former.
PR up at , PTAL.
Change:
<del> { stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut, darwin }: </del> <ins> { stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut , Cocoa,  OpenGL }: </ins> stdenv.mkDerivation rec { name = "bullet-${version}";

Discussion:
! See the . This is to discuss Darwin-specific issues for ZHF. (or more)
Change:
''; in map (x: "${x} ${escapeShellArgs [ stateDir runtimeDir logsDir ]}") [ <del> "+${ownConfigTokens}" # runs as root unconfigureRunner </del> <ins> "+${unconfigureRunner}" # runs as root </ins> configureRunner <del> "+${disownConfigTokens}" # runs as root </del> setupRuntimeDir ];

Discussion:
After rebooting the machine, the systemd service fails to start due to an "invalid user: ‘github-runner’" Steps to reproduce the behavior: The systemd service enters the state : It does not happen after every reboot. I have not found the circumstances that make the systemd service fail. One workaround to bring the service back to the running state is to manually restart . Please run and paste the result. Maintainer information:
Thanks for raising this. I guess I ran into this as well already but didn't give it too much thought. Now, after reading systemd.service(5) again, I believe we should prefix with instead of : I'm not sure that's really the issue but it seems like the user/group () is not always set up when systemd runs . It appears would make sure they exist. I'm going to open a PR. Regardless of fixing this issue (which I hope it does), it makes sense to use instead of .
Wow, thanks for the quick response! I will check out your PR soon.
Change:
]; cargoTestFlags = [ <del> "--features" "test-cranelift,test-jit" </del> <ins> "--features" "test-cranelift" # Can't use test-jit : # error: Package `wasmer-workspace v2.0.0 (/build/source)` does not have the feature `test-jit` </ins> ]; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";

Discussion:
name: wasmer current version: 1.0.2 desired version: 2.0.0 maintainers: Please tag this issue in your PR.
Change:
# The credentials should be stored in a secure keychain already, so the benefit of this is questionable # in the first place. rm -rf $out/lib/vscode/resources/app/node_modules/vscode-encrypt <del> # Unbundle libglvnd as VSCode doesn't include libGLESv2.so.2 which is necessary for GPU acceleration rm -rf $out/lib/vscode/libGLESv2.so </del> '') + '' runHook postInstall '';

Discussion:
With the last , gpu acceleration broke for non-wayland. Error code: I can confirm that I have gpu acceleration working when I pin vscode nixpkgs to which is the parent commit of I also tried the following, linking libglvnd's libGLESv2 into vscode directory. The error changed and terminal rendering completely broke with a black screen: postInstall = '' ln -sf ''; Steps to reproduce the behavior: VScode with the --verbose flag, so it outputs details about the startup and other stuff how it complains about missing library. code --status to see check that it's indeed using software rendering. VSCode uses gpu acceleration. See Please run and paste the result.
In general when you are not loading bundled/vendor libraries, then all the libraries ideally should be loaded from the system (especially if they are related) otherwise you run into problems. Try doing what you did in but also for which is provided by the package. I think also provides for that matter.
Almost works. There is a different error now. says for gpu accel instead of . But terminal rendering is still laggy.
Maybe I should go ahead and do the same for , , too. Edit: I tried linking libvulkan and libvkswiftshader but it didn't change anything. I couldn't figure out where to find a so couldn't try that but I doubt it's related. I also took a look at and tried in , both with and . But it complained about missing in so that didn't work.
Try:
It's still looking for a after either or . doesn't contain neither nor .
Would it make sense to bring bundled back so that it works for everybody? Would bringing it back break
I think if you have the it should continue to work for Wayland, and if you remove the it should work for X11 (it seems to explicitly try to load the bundled library). If you can test that and it does actually work it is probably a good enough solution.
Change:
postInstall = '' mkdir -p $out/share/{applications,pixmaps} <del> cp $src/nwg-panel-config.desktop $out/share/applications/ cp $src/nwg-shell.svg $src/nwg-panel.svg $out/share/pixmaps/ </del> <ins> cp $src/nwg-panel-config.desktop nwg-processes.desktop $out/share/applications/ cp $src/nwg-shell.svg $src/nwg-panel.svg nwg-processes.svg $out/share/pixmaps/ </ins> ''; preFixup = '' makeWrapperArgs+=( "''${gappsWrapperArgs[@]}" --prefix XDG_DATA_DIRS : "$out/share" <del> --prefix PATH : "${lib.makeBinPath [ light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}" </del> <ins> --prefix PATH : "${lib.makeBinPath [ hyprland light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}" </ins> ) '';

Discussion:
Package name: nwg-panel Latest released version: 0.9.19 Current version on the unstable channel: 0.9.16 Current version on the stable/release channel: 0.9.16 Notify maintainers Note for maintainers: Should remove the dependency for Sway since nwg-panel works other WM like Hyperland, and python-dasbus need to be as an dependency for system tray to work Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
patches = [ ./license.patch <del> ./cfg80211_ibss_joined-channel-parameter.patch ./netdev-3.17.patch ./cfg80211_inform_bss-3.18.patch </del> <ins> ./linux-recent.patch ./gcc.patch </ins> ]; makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";

Discussion:
It will likely be enough to grab a patch from another distro. Maybe I'll look into it tomorrow.
Builds now, but I didn't try running it.
Change:
src = fetchFromGitHub { owner = "ValvePython"; <del> repo = pname; rev = "v${version}"; </del> <ins> repo = "vdf"; rev = "refs/tags/v${version}"; </ins> hash = "sha256-6ozglzZZNKDtADkHwxX2Zsnkh6BE8WbcRcC9HkTTgPU="; }; <ins> patches = [ # Support appinfo.vdf v29 (required by protontricks 1.12.0) (fetchpatch2 { url = "https://github.com/Matoking/vdf/commit/981cad270c2558aeb8eccaf42cfcf9fabbbed199.patch"; hash = "sha256-kLAbbB0WHjxq4rokLoGTPx43BU44EshteR59Ey9JnXo="; }) ]; </ins> nativeCheckInputs = [ mock pytestCheckHook ]; pythonImportsCheck = [ "vdf" ]; <ins> # Use nix-update-script instead of the default python updater # The python updater requires GitHub releases, but vdf only uses tags passthru.updateScript = nix-update-script { }; </ins> meta = with lib; { description = "Library for working with Valve's VDF text format"; homepage = "https://github.com/ValvePython/vdf";

Discussion:
Package name: protontricks Latest released version: 1.12.0 <!-- Search your package here: --- Current version on the unstable channel: 1.11.1 Current version on the stable/release channel: 1.11.1 <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. -- Note for maintainers: Please tag this issue in your PR. Solves the following bug / problem Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Change:
config = mkIf cfg.enable { <del> environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme; </del> <ins> environment.variables = { QT_QPA_PLATFORMTHEME = cfg.platformTheme; QT_STYLE_OVERRIDE = mkIf (! (isQt5ct || isLxqt || isKde)) cfg.style; }; </ins> <del> environment.variables.QT_STYLE_OVERRIDE = mkIf (! (isQt5ct || isLxqt || isKde)) cfg.style; </del> <ins> environment.profileRelativeSessionVariables = let qtVersions = with pkgs; [ qt5 qt6 ]; in { QT_PLUGIN_PATH = map (qt: "/${qt.qtbase.qtPluginPrefix}") qtVersions; QML2_IMPORT_PATH = map (qt: "/${qt.qtbase.qtQmlPrefix}") qtVersions; }; </ins> environment.systemPackages = packages;

Discussion:
After , I have set: But any qt6 application says: This is definitly related to QTPLUGINPATH, because if I export QTPLUGINPATH like this: Everthing works fine. Open any qt6 app <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- Please run and paste the result.
I think this may have worked by accident in Qt5. Because I can't find documentation to confirm that this behavior is intentional, but Qt5 searches for plugins in every entry + , but Qt6 only searches directly in entries in (or ) and does not make up extra search paths based on Therefore since is in , Qt5 searches , even though it isn't specified in So we should probably be setting for all versions in regardless, unless that behavior in Qt5 is intentional (even then, explicitly adding it to is clearer)
I've opened to fix this
Change:
<ins> { lib, appimageTools, fetchurl }: appimageTools.wrapType2 rec { pname = "xlights"; version = "2023.11"; src = fetchurl { url = "https://github.com/smeighan/xLights/releases/download/${version}/xLights-${version}-x86_64.AppImage"; hash = "sha256-WUBN/Gjnsj2eUL03sXIYWgzLA7FNN7h+qpWlnXBdnw8="; }; meta = with lib; { description = "xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers."; homepage = "https://xlights.org"; license = licenses.gpl3; maintainers = with maintainers; [ kashw2 ]; platforms = platforms.linux; }; } </ins>

Discussion:
Project description xLights is a free and open source program that enables you to design, create and play amazing lighting displays through the use of DMX controllers, E1.31 Ethernet controllers and more. With it you can layout your display visually then assign effects to the various items throughout your sequence. This can be in time to music (with beat-tracking built into xLights) or just however you like. Metadata homepage URL: source URL: license: GPLv3 platforms: linux, darwin,
Change:
echo "${metadata}" | base64 --decode > $out/metadata.json ''; }; <del> dontBuild = true; </del> <ins> nativeBuildInputs = with pkgs; [ glib ]; buildPhase = '' runHook preBuild if [ -d schemas ]; then glib-compile-schemas --strict schemas fi runHook postBuild ''; </ins> installPhase = '' runHook preInstall mkdir -p $out/share/gnome-shell/extensions/

Discussion:
Unable to launch the extension due to the following error: Steps to reproduce the behavior: Extension should just launch without error ! Add any other context about the problem here.
Same issue with night-theme-switcher. explanation from upstream:
Brilliant. So, I think that means that glib-compile-schemas will need to be somehow at runtime.
I'm still having this issue in 23.05, it doesn't look like the fix has been backported to the stable branch yet - is there a way to kick that off? I don't know the official way to request backports or how to chase them.
Gnome extensions are pretty volatile in nature, and I don't know of anybody who is doing the work of maintaining them on stable releases. I personally recommend you to simply overlay the attribute in your configuration with an unstable channel.
Bit of a nixpkgs noob here, but how would one go about doing that with a flake? Looking to get VS Code dark/light theme settings follow GNOME and need Night Theme Switcher as workaround until and is fixed.
How would one do this? I only have the following overlay currently defined: And: But this still results in the same error I originally reported with no compiled schema file that I can see. How should I overlay the whole attribute?
I have as an overlay. How to apply something like that when using flakes, I have no idea.
Thanks Not yet using flakes but have now got this working using just the following in my NixOS config:
Got it working in flakes - see my full . From how I had it laid out I just needed to add the overlays array that tracked to the pkgs spec I made for my home-manager configs, and then add that to my existing NixOS configuration outputs. Hopefully this is more adaptable to basic usage:
Change:
<ins> { pkgs ? import ../../../.. { config = {}; overlays = []; } }: let inherit (pkgs) figlet hello writeText ; in { hello = hello; figlet = figlet; norefs = writeText "hi" "hello"; helloRef = writeText "hi" "hello ${hello}"; helloFigletRef = writeText "hi" "hello ${hello} ${figlet}"; } </ins>

Discussion:
There is an issue in the test by . This line introduces a dependency on the contents of nixpkgs, making every change evaluate with a different hash. cc
Steps to reproduce:
You're absolutely right, but I don't think I see the impact of this fact. It's not recursed into (no /) and it's not even built by ofborg. The test needs to compare results, but perhaps the actual evaluation can be removed from it; injected as store paths by the test runner instead. It won't make the test easier to read :(
This currently impacts every ofborg evaluation. For example:
I have no idea how to solve this. Why would ofborg have a different hash for multiple evaluations? Cause it puts stuff in the nixpkgs path?
is the whole Nixpkgs source tree, which kinda always changes. Here's a solution . Not pretty but still quick to run outside the sandbox and solves this issue.
Still an issue ?
Ofborg doesn't rebase PRs so if the PR is based on a master that's of the wrong age, you'll still see this happen. Please check that the PR includes the improved test.
I did, and it's been more than 12 hours since the commit landed. At the same time my original repro doesn't see the issue:
It's a broader issue that applies to all NixOS tests, , but it went under the radar.
This seems to be fixed now. Thanks for looking into this!