Question:
Project description CryptPad is a collaborative office suite that is end-to-end encrypted and open-source. Enable this a service for NixOS. Metadata homepage URL: source URL: license: agpl2 platforms: unix, linux, darwin, ...
CryptPad used to be included in nixpkgs, but it was removed because there weren't enough maintainers. The removal occurred with the commits and .
Not quite true: it was removed because they had a strong dependency on out-of-date software. . Now, there is an ongoing effort to re-introduce it in : .

<ins> { buildNpmPackage, fetchFromGitHub, lib, makeBinaryWrapper, nixosTests, nodejs, rdfind, }: let version = "2024.6.0"; # nix version of install-onlyoffice.sh # a later version could rebuild from sdkjs/web-apps as per # https://github.com/cryptpad/onlyoffice-builds/blob/main/build.sh onlyoffice_build = rev: hash: fetchFromGitHub { inherit rev hash; owner = "cryptpad"; repo = "onlyoffice-builds"; }; onlyoffice_install = oo: '' oo_dir="$out_cryptpad/www/common/onlyoffice/dist/${oo.subdir}" cp -a "${onlyoffice_build oo.rev oo.hash}/." "$oo_dir" chmod -R +w "$oo_dir" echo "${oo.rev}" > "$oo_dir/.commit" ''; onlyoffice_versions = [ { subdir = "v1"; rev = "4f370beb"; hash = "sha256-TE/99qOx4wT2s0op9wi+SHwqTPYq/H+a9Uus9Zj4iSY="; } { subdir = "v2b"; rev = "d9da72fd"; hash = "sha256-SiRDRc2vnLwCVnvtk+C8PKw7IeuSzHBaJmZHogRe3hQ="; } { subdir = "v4"; rev = "6ebc6938"; hash = "sha256-eto1+8Tk/s3kbUCpbUh8qCS8EOq700FYG1/KiHyynaA="; } { subdir = "v5"; rev = "88a356f0"; hash = "sha256-8j1rlAyHlKx6oAs2pIhjPKcGhJFj6ZzahOcgenyeOCc="; } { subdir = "v6"; rev = "abd8a309"; hash = "sha256-BZdExj2q/bqUD3k9uluOot2dlrWKA+vpad49EdgXKww="; } { subdir = "v7"; rev = "9d8b914a"; hash = "sha256-M+rPJ/Xo2olhqB5ViynGRaesMLLfG/1ltUoLnepMPnM="; } ]; in buildNpmPackage { inherit version; pname = "cryptpad"; src = fetchFromGitHub { owner = "cryptpad"; repo = "cryptpad"; rev = version; hash = "sha256-huIhhnjatkaVfm1zDeqi88EX/nAUBQ0onPNOwn7hrX4="; }; npmDepsHash = "sha256-Oh1fBvP7OXC+VDiH3D+prHmi8pRrxld06n30sqw5apY="; nativeBuildInputs = [ makeBinaryWrapper rdfind ]; patches = [ # fix httpSafePort setting # https://github.com/cryptpad/cryptpad/pull/1571 ./0001-env.js-fix-httpSafePort-handling.patch ]; # cryptpad build tries to write in cache dir makeCacheWritable = true; # 'npm build run' (scripts/build.js) generates a customize directory, but: # - that is not installed by npm install # - it embeds values from config into the directory, so needs to be # run before starting the server (it's just a few quick replaces) # Skip it here. dontNpmBuild = true; postInstall = '' out_cryptpad="$out/lib/node_modules/cryptpad" # 'npm run install:components' (scripts/copy-component.js) copies # required node modules to www/component in the build tree... # Move to install directory manually. npm run install:components mv www/components "$out_cryptpad/www/" # install OnlyOffice (install-onlyoffice.sh without network) mkdir -p "$out_cryptpad/www/common/onlyoffice/dist" ${lib.concatMapStringsSep "n" onlyoffice_install onlyoffice_versions} rdfind -makehardlinks true -makeresultsfile false "$out_cryptpad/www/common/onlyoffice/dist" # cryptpad assumes it runs in the source directory and also outputs # its state files there, which is not exactly great for us. # There are relative paths everywhere so just substituing source paths # is difficult and will likely break on a future update, instead we # make links to the required source directories before running. # The build.js step populates 'customize' from customize.dist and config; # one would normally want to re-run it after modifying config but since it # would overwrite user modifications only run it if there is no customize # directory. makeWrapper "${lib.getExe nodejs}" "$out/bin/cryptpad"  --add-flags "$out_cryptpad/server.js"  --run "for d in customize.dist lib www; do ln -sf "$out_cryptpad/$d" .; done"  --run "if ! [ -d customize ]; then "${lib.getExe nodejs}" "$out_cryptpad/scripts/build.js"; fi" ''; passthru.tests.cryptpad = nixosTests.cryptpad; meta = { description = "Collaborative office suite, end-to-end encrypted and open-source."; homepage = "https://cryptpad.org/"; license = lib.licenses.agpl3Plus; mainProgram = "cryptpad"; maintainers = with lib.maintainers; [ martinetd ]; }; } </ins>


Question:
Package name: mathematica Latest released version: 13.2.0 <!-- Search your package here: --- Current version on the unstable channel: 13.2.0 Current version on the stable/release channel: 9.0.0 <!-- 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.
No need to open an issue for every package update PR that you're about to file.

let versions = [ { <ins> version = "13.2.1"; lang = "en"; language = "English"; sha256 = "sha256-GA2k+jvE4mTJsIbMHce5c516h/glHLnXdthEfnNmk0w="; installer = "Mathematica_13.2.1_LINUX.sh"; } { version = "13.2.1"; lang = "en"; language = "English"; sha256 = "sha256-ZvgG2W/gjQIo4hyXHsGta5FyTslrz/ltOe/ZK/U2Sx8="; installer = "Mathematica_13.2.1_BNDL_LINUX.sh"; } { </ins> version = "13.2.0"; lang = "en"; language = "English";


Question:
Steps to reproduce the behavior: -env -i gotop Happy to provide more info if needed. <!-- 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.
Maybe we can apply as a patch.
can you try latest master ? gotop 4.2.0 should aleady contain patch mentioned by

ldflags = [ "-s" "-w" "-X main.Version=v${version}" ]; <ins> # prevent `error: 'TARGET_OS_MAC' is not defined` env.CGO_CFLAGS = "-Wno-undef-prefix"; </ins> nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];


Question:
Linux app for streaming music from YouTube. <!-- Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account. --Metadata homepage URL: source URL: license: mit platforms: linux
I'd be interested in doing this if its not too hard, I'll look into it.
The package is almost done, had some complications including unpackaged dependencies, but it should be good to go within the next few days.
Just waiting for a merge now.

<ins> { lib , fetchFromGitLab , python3Packages , wrapGAppsHook4 , gst_all_1 , gobject-introspection , yt-dlp , libadwaita , libsoup_3 , glib-networking }: python3Packages.buildPythonApplication rec { pname = "monophony"; version = "2.3.1"; format = "other"; sourceRoot = "source/source"; src = fetchFromGitLab { owner = "zehkira"; repo = "monophony"; rev = "v${version}"; hash = "sha256-dpRTHsujaIwzgr+qY5LC9xtXz40g3akdpEiHuxiilZM="; }; pythonPath = with python3Packages; [ mpris-server pygobject3 ytmusicapi ]; nativeBuildInputs = [ python3Packages.nuitka gobject-introspection wrapGAppsHook4 ]; buildInputs = [ libadwaita # needed for gstreamer https libsoup_3 glib-networking ] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gstreamer ]); installFlags = [ "prefix=$(out)" ]; preFixup = '' buildPythonPath "$pythonPath" gappsWrapperArgs+=( --prefix PYTHONPATH : "$program_PYTHONPATH" --prefix PATH : "${lib.makeBinPath [yt-dlp]}" # needed for gstreamer https --prefix LD_LIBRARY_PATH : "${libsoup_3.out}/lib" ) ''; meta = with lib; { homepage = "https://gitlab.com/zehkira/monophony"; description = "Linux app for streaming music from YouTube"; longDescription = "Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account."; license = licenses.agpl3Plus; mainProgram = "monophony"; platforms = platforms.linux; maintainers = with maintainers; [ quadradical ]; }; } </ins>


Question:
Linux app for streaming music from YouTube. <!-- Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account. --Metadata homepage URL: source URL: license: mit platforms: linux
I'd be interested in doing this if its not too hard, I'll look into it.
The package is almost done, had some complications including unpackaged dependencies, but it should be good to go within the next few days.
Just waiting for a merge now.

<ins> { lib , buildPythonPackage , fetchPypi , emoji , pydbus , pygobject3 , unidecode , setuptools }: buildPythonPackage rec { pname = "mpris-server"; version = "0.4.2"; pyproject = true; src = fetchPypi { pname = "mpris_server"; inherit version; hash = "sha256-p3nM80fOMtRmeKvOXuX40Fu9xH8gPgYyneXbUS678fE="; }; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ emoji pydbus pygobject3 unidecode ]; pythonImportsCheck = [ "mpris_server" ]; # upstream has no tests doCheck = false; meta = with lib; { description = "Publish a MediaPlayer2 MPRIS device to D-Bus"; homepage = "https://pypi.org/project/mpris-server/"; license = licenses.agpl3Only; maintainers = with maintainers; [ quadradical ]; }; } </ins>


Question:
Linux app for streaming music from YouTube. <!-- Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account. --Metadata homepage URL: source URL: license: mit platforms: linux
I'd be interested in doing this if its not too hard, I'll look into it.
The package is almost done, had some complications including unpackaged dependencies, but it should be good to go within the next few days.
Just waiting for a merge now.

mpmath = callPackage ../development/python-modules/mpmath { }; <ins> mpris-server = callPackage ../development/python-modules/mpris-server { }; </ins> mpv = callPackage ../development/python-modules/mpv { inherit (pkgs) mpv; };


Question:
I'm trying to do something similar to the following: Apparently, however, does not translate the Nix list into a Bash array as I'd expect. I see the following error: Add to the attributes which contains a argument with whitespace. For example: This results in a bash array with the following items (one per line): Use the following patch to print the array members: Please run and paste the result.
Using flags with spaces as a derivation attribute can . I'd append to in , as explained in the link:
Thanks for your comment. That's frustrating. I wonder if should have an argument at all, if it works sometimes. Also, I think manipulating in does not work as the defined by run first.
Spaces can be supported if some quoting is to : This is also how it's done in Python's build-support:

# Inherit arguments from the derivation <del> makeWrapperArgs=( ${makeWrapperArgs-} ) </del> <ins> declare -a derivationMakeWrapperArgs="( ${makeWrapperArgs-} )" makeWrapperArgs=( "${derivationMakeWrapperArgs[@]}" ) </ins> # First argument is the executable you want to wrap, # the second is the destination for the wrapper.


Question:
While rebuilding on this system that requires the package a failure while building has been occurring since NixOS 22.11. One of the tests fails.
I am not the maintainer of this package. Maybe can help? also have a look at:
Silly me for not checking and just the current release, disabling tests is a hell of a workaround but definitely works!
I'm also not a maintainer of the package, but I'm happy to fix it nonetheless :) There's an issue in that we don't have a good way of setting HDF5PLUGINPATH appropriately. Maybe I'll come back and fix this at some point, but for now this will do...

nativeBuildInputs = [ cmake ninja ]; buildInputs = [ netcdf hdf5 curl ]; <del> # 10 - cxx4_test_filter (Failed) # Setting Filter....Caught unexpected exception. doCheck = false; </del> <ins> doCheck = true; </ins> enableParallelChecking = false; <ins> preCheck = '' export HDF5_PLUGIN_PATH=${netcdf}/lib/hdf5-plugins ''; </ins> meta = { description = "C++ API to manipulate netcdf files";


Question:
While rebuilding on this system that requires the package a failure while building has been occurring since NixOS 22.11. One of the tests fails.
I am not the maintainer of this package. Maybe can help? also have a look at:
Silly me for not checking and just the current release, disabling tests is a hell of a workaround but definitely works!
I'm also not a maintainer of the package, but I'm happy to fix it nonetheless :) There's an issue in that we don't have a good way of setting HDF5PLUGINPATH appropriately. Maybe I'll come back and fix this at some point, but for now this will do...

{ lib, stdenv , fetchurl, unzip , hdf5 <ins> , bzip2 , libzip , zstd , szipSupport ? false , szip </ins> , libxml2 , m4 , curl # for DAP


Question:
While rebuilding on this system that requires the package a failure while building has been occurring since NixOS 22.11. One of the tests fails.
I am not the maintainer of this package. Maybe can help? also have a look at:
Silly me for not checking and just the current release, disabling tests is a hell of a workaround but definitely works!
I'm also not a maintainer of the package, but I'm happy to fix it nonetheless :) There's an issue in that we don't have a good way of setting HDF5PLUGINPATH appropriately. Maybe I'll come back and fix this at some point, but for now this will do...

hdf5 libxml2 mpi <del> ]; </del> <ins> bzip2 libzip zstd ] ++ lib.optional szipSupport szip; </ins> passthru = { inherit mpiSupport mpi;


Question:
While rebuilding on this system that requires the package a failure while building has been occurring since NixOS 22.11. One of the tests fails.
I am not the maintainer of this package. Maybe can help? also have a look at:
Silly me for not checking and just the current release, disabling tests is a hell of a workaround but definitely works!
I'm also not a maintainer of the package, but I'm happy to fix it nonetheless :) There's an issue in that we don't have a good way of setting HDF5PLUGINPATH appropriately. Maybe I'll come back and fix this at some point, but for now this will do...

"--enable-dap" "--enable-shared" "--disable-dap-remote-tests" <ins> "--with-plugin-dir=${placeholder "out"}/lib/hdf5-plugins" </ins> ] ++ (lib.optionals mpiSupport [ "--enable-parallel-tests" "CC=${mpi}/bin/mpicc" ]); <ins> enableParallelBuilding = true; </ins> disallowedReferences = [ stdenv.cc ]; postFixup = ''


Question:
Neovim frequently coredump It is hard to reproduce the behavior, it always breaks down in unexpected situations no core dump ! <!-- 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.
It might be caused by neo-tree. I haven't seen any crashes since I moved from neo-tree to nvimtree.
Also pretty sure it's neo-tree, I have the same issue . I've already built debug symbols for and am waiting for the next crash to get a detailed report.
not nixpkgs relevant (report to neovim with stacktrace).

export VIMRUNTIME=$PWD/runtime ''; <ins> separateDebugInfo = true; </ins> meta = with lib; { description = "Vim text editor fork focused on extensibility and agility"; longDescription = ''


Question:
Neovim frequently coredump It is hard to reproduce the behavior, it always breaks down in unexpected situations no core dump ! <!-- 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.
It might be caused by neo-tree. I haven't seen any crashes since I moved from neo-tree to nvimtree.
Also pretty sure it's neo-tree, I have the same issue . I've already built debug symbols for and am waiting for the next crash to get a detailed report.
not nixpkgs relevant (report to neovim with stacktrace).

enableParallelBuilding = true; <ins> # separateDebugInfo breaks static build # https://github.com/NixOS/nixpkgs/issues/219466 separateDebugInfo = !stdenv.hostPlatform.isStatic; </ins> doCheck = true; # Some of the tests use localhost networking.


Question:
grub fails with nixos-rebuild switch -I nixpkgs=/home/lethal/nixpkgs
The issue title here is highly uninformative, which is why I didn't find this when checking for duplicates. :P

<ins> { stdenv, fetchurl, bison, m4 }: stdenv.mkDerivation { name = "flex-2.5.35"; src = fetchurl { url = mirror://sourceforge/flex/flex-2.5.35.tar.bz2; sha256 = "0ysff249mwhq0053bw3hxh58djc0gy7vjan2z1krrf9n5d5vvv0b"; }; buildInputs = [ bison ]; propagatedNativeBuildInputs = [ m4 ]; crossAttrs = { preConfigure = '' export ac_cv_func_malloc_0_nonnull=yes export ac_cv_func_realloc_0_nonnull=yes ''; }; meta = { homepage = http://flex.sourceforge.net/; description = "A fast lexical analyser generator"; }; } </ins>


Question:
grub fails with nixos-rebuild switch -I nixpkgs=/home/lethal/nixpkgs
The issue title here is highly uninformative, which is why I didn't find this when checking for duplicates. :P

buggyBiosCDSupport = config.grub.buggyBiosCDSupport or true; }; <del> grub2 = callPackage ../tools/misc/grub/2.0x.nix { libusb = libusb1; }; </del> <ins> grub2 = callPackage ../tools/misc/grub/2.0x.nix { libusb = libusb1; flex = flex_2_5_35; }; </ins> grub2_efi = grub2.override { EFIsupport = true; };


Question:
grub fails with nixos-rebuild switch -I nixpkgs=/home/lethal/nixpkgs
The issue title here is highly uninformative, which is why I didn't find this when checking for duplicates. :P

checkstyle = callPackage ../development/tools/analysis/checkstyle { }; flex = callPackage ../development/tools/parsing/flex { }; <ins> flex_2_5_35 = callPackage ../development/tools/parsing/flex/2.5.35.nix { }; </ins> m4 = gnum4;


Question:
When running , sometimes fails to start with an error message: Run System: NixOS: Nix version: Nixpkgs version:
I can confirm this issue. It also delays restarting of other units (probably dependent services) after upgrade. I do: as a workaround when this happens, so that the other services can restart faster. It only happens on my physical machine. My v-server never had this problem.
Can confirm this is still happens on 17.09 (just happened right now, and has been happening on every single ).
My workaround is to use:
how do you specify that? I get:
there was a typo: UPDATE 2: One also need to make it a list to override!
The solution posted above no longer seems to work after upgrading to 18.09 - has anyone else solved this in a different way?
Ran into this issue when I didn't have the EFI boot partition mounted while rebuilding. I think I was starting up an old nixos configuration. Seems to work fine now.
I forgot to make it a list. The empty string makes systemd first resets the option so it can be overriden afterwards.
A potential fix is also here: I want to test this option a bit for myself first.

systemd.services.systemd-remount-fs.restartIfChanged = false; systemd.services.systemd-update-utmp.restartIfChanged = false; systemd.services.systemd-user-sessions.restartIfChanged = false; # Restart kills all active sessions. <ins> systemd.services.systemd-udev-settle.restartIfChanged = false; # Causes long delays in nixos-rebuild </ins> # Restarting systemd-logind breaks X11 # - upstream commit: https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101 # - systemd announcement: https://github.com/systemd/systemd/blob/22043e4317ecd2bc7834b48a6d364de76bb26d91/NEWS#L103-L112


Question:
See also Steps to reproduce the behavior: This is such as basic cross-compilation that I wonder whether something is wrong in my setup. However, the errors are surprising, because I thought most packages were cross-compilation aware enough to not run host binaries on the build platform. Please run and paste the result.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
was mentioned as a possible fix.
I can confirm that fixes this issue.

(b == armv7l && isCompatible a armv7a) (b == armv7l && isCompatible a armv7r) (b == armv7l && isCompatible a armv7m) <del> (b == armv7a && isCompatible a armv8a) (b == armv7r && isCompatible a armv8a) (b == armv7m && isCompatible a armv8a) (b == armv7a && isCompatible a armv8r) (b == armv7r && isCompatible a armv8r) (b == armv7m && isCompatible a armv8r) (b == armv7a && isCompatible a armv8m) (b == armv7r && isCompatible a armv8m) (b == armv7m && isCompatible a armv8m) </del> # ARMv8 <del> (b == armv8r && isCompatible a armv8a) (b == armv8m && isCompatible a armv8a) # XXX: not always true! Some arm64 cpus don’t support arm32 mode. </del> (b == aarch64 && a == armv8a) (b == armv8a && isCompatible a aarch64) <ins> (b == armv8r && isCompatible a armv8a) (b == armv8m && isCompatible a armv8a) </ins> # PowerPC (b == powerpc && isCompatible a powerpc64)


Question:
From a brief look at the updated cuda section in the manual, it would be logical to take as an argument, rather than the compiled string. And to expose that in via gets even further beyond the scope, so let's skip it Originally posted by in
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

requiredSystemFeatures = [ "big-parallel" ]; passthru = { <del> inherit cudaSupport cudaPackages gpuTargetString; cudaCapabilities = supportedCudaCapabilities; </del> <ins> inherit cudaSupport cudaPackages; </ins> # At least for 1.10.2 `torch.fft` is unavailable unless BLAS provider is MKL. This attribute allows for easy detection of its availability. blasProvider = blas.provider; <ins> } // lib.optionalAttrs cudaSupport { # NOTE: supportedCudaCapabilities isn't computed unless cudaSupport is true, so we can't use #   it in the passthru set above because a downstream package might try to access it even #   when cudaSupport is false. Better to have it missing than null or an empty list by default. cudaCapabilities = supportedCudaCapabilities; </ins> }; meta = with lib; {


Question:
From a brief look at the updated cuda section in the manual, it would be logical to take as an argument, rather than the compiled string. And to expose that in via gets even further beyond the scope, so let's skip it Originally posted by in
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

{ buildPythonPackage <del> , cudaSupport ? torch.cudaSupport or false # by default uses the value from torch </del> , fetchFromGitHub , lib , libjpeg_turbo


Question:
From a brief look at the updated cuda section in the manual, it would be logical to take as an argument, rather than the compiled string. And to expose that in via gets even further beyond the scope, so let's skip it Originally posted by in
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

}: let <del> inherit (torch) cudaPackages gpuTargetString; </del> <ins> inherit (torch) cudaCapabilities cudaPackages cudaSupport; </ins> inherit (cudaPackages) cudatoolkit cudaFlags cudaVersion; # NOTE: torchvision doesn't use cudnn; torch does!


Question:
From a brief look at the updated cuda section in the manual, it would be logical to take as an argument, rather than the compiled string. And to expose that in via gets even further beyond the scope, so let's skip it Originally posted by in
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

+ lib.optionalString cudaSupport '' export CC=${cudatoolkit.cc}/bin/cc export CXX=${cudatoolkit.cc}/bin/c++ <del> export TORCH_CUDA_ARCH_LIST="${gpuTargetString}" </del> <ins> export TORCH_CUDA_ARCH_LIST="${lib.concatStringsSep ";" cudaCapabilities}" </ins> export FORCE_CUDA=1 '';


Question:
The program Jabref will build, but give a JFX related error upon trying to run the program. Steps to reproduce the behavior: The program launches as it used to. Please run and paste the result.
It's fixed in but hasn't been merged.
Hi. Sorry for digging this up, but I'm having the same error for starting a JFX application inside Intellij IDEA, where is unable to find (or ). My hack to resolve this involves: Make sure that there is within your ( for example) Add the path to :Start Intellij IDEA from the shell. I felt like this is worth a separate issue (Intellij and JFX related), but wanted to ask it here first. Many thanks!
I can't understand what you want to ask... This issue is caused by the reason said in
I meant I had the same issue (missing for ), but in another context, and was wondering instead of that hacky workaround, is there any way to make my JFX application starts with no error.

, perl }: <ins> let versionReplace = { easybind = { snapshot = "2.2.1-SNAPSHOT"; pin = "2.2.1-20230117.075740-16"; }; afterburner = { snapshot = "testmoduleinfo-SNAPSHOT"; pin = "0e337d8773"; }; }; in </ins> stdenv.mkDerivation rec { <del> version = "5.7"; </del> <ins> version = "5.9"; </ins> pname = "jabref"; src = fetchFromGitHub { owner = "JabRef"; repo = "jabref"; rev = "v${version}"; <del> hash = "sha256-wzBaAaxGsMPh64uW+bBOiycYfVCW9H5FCn06r6XdxeE="; </del> <ins> hash = "sha256-uACmXas5L1NcxLwllkcbgCCt9bRicpQkiJkhkkVWDDY="; </ins> }; desktopItems = [


Question:
The program Jabref will build, but give a JFX related error upon trying to run the program. Steps to reproduce the behavior: The program launches as it used to. Please run and paste the result.
It's fixed in but hasn't been merged.
Hi. Sorry for digging this up, but I'm having the same error for starting a JFX application inside Intellij IDEA, where is unable to find (or ). My hack to resolve this involves: Make sure that there is within your ( for example) Add the path to :Start Intellij IDEA from the shell. I felt like this is worth a separate issue (Intellij and JFX related), but wanted to ask it here first. Many thanks!
I can't understand what you want to ask... This issue is caused by the reason said in
I meant I had the same issue (missing for ), but in another context, and was wondering instead of that hacky workaround, is there any way to make my JFX application starts with no error.

deps = stdenv.mkDerivation { pname = "${pname}-deps"; <del> inherit src version; </del> <ins> inherit src version postPatch; </ins> nativeBuildInputs = [ gradle perl ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) <del> gradle --no-daemon downloadDependencies </del> <ins> gradle --no-daemon downloadDependencies -Dos.arch=amd64 gradle --no-daemon downloadDependencies -Dos.arch=aarch64 </ins> ''; # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) installPhase = '' find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*.(jar|pom)'  | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/s]+))$# ($x = $2) =~ tr|.|/|; "install -Dm444 $1 $out/$x/$3/$4/''${($5 =~ s/-jvm//r)}" #e'  | sh <ins> mv $out/com/tobiasdiez/easybind/${versionReplace.easybind.pin}  $out/com/tobiasdiez/easybind/${versionReplace.easybind.snapshot} </ins> ''; # Don't move info to share/ forceShare = [ "dummy" ]; outputHashMode = "recursive"; <del> outputHash = { x86_64-linux = "sha256-OicHJVFxHGPE76bEDoLhkEhVcAJmplqjoh2I3nnVaLA="; aarch64-linux = "sha256-8QWmweptL/+pSO6DhfBLaLcBrfKd4TDsDoXs4TgXvew="; }.${stdenv.hostPlatform.system} or (throw "Unsupported system ${stdenv.hostPlatform.system}"); </del> <ins> outputHash = "sha256-s6GA8iT3UEVuELBgpBvzPJlVX+9DpfOQrEd3KIth8eA="; </ins> }; <ins> postPatch = '' # Pin the version substituteInPlace build.gradle  --replace 'com.github.JabRef:afterburner.fx:${versionReplace.afterburner.snapshot}'  'com.github.JabRef:afterburner.fx:${versionReplace.afterburner.pin}'  --replace 'com.tobiasdiez:easybind:${versionReplace.easybind.snapshot}'  'com.tobiasdiez:easybind:${versionReplace.easybind.pin}' ''; </ins> preBuild = '' # Include CSL styles and locales in our build cp -r buildres/csl/* src/main/resources/


Question:
The program Jabref will build, but give a JFX related error upon trying to run the program. Steps to reproduce the behavior: The program launches as it used to. Please run and paste the result.
It's fixed in but hasn't been merged.
Hi. Sorry for digging this up, but I'm having the same error for starting a JFX application inside Intellij IDEA, where is unable to find (or ). My hack to resolve this involves: Make sure that there is within your ( for example) Add the path to :Start Intellij IDEA from the shell. I felt like this is worth a separate issue (Intellij and JFX related), but wanted to ask it here first. Many thanks!
I can't understand what you want to ask... This issue is caused by the reason said in
I meant I had the same issue (missing for ), but in another context, and was wondering instead of that hacky workaround, is there any way to make my JFX application starts with no error.

# Resources in the jar can't be found, workaround copied from AUR cp -r build/resources $out/share/java/jabref <del> # workaround for https://github.com/NixOS/nixpkgs/issues/162064 </del> tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1 <del> unzip $out/lib/javafx-web-*-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/ </del> <ins> # remove openjfx libs for other platforms rm $out/lib/javafx-*-win.jar ${lib.optionalString stdenv.isAarch64 "$out/lib/javafx-*-linux.jar"} # workaround for https://github.com/NixOS/nixpkgs/issues/162064 unzip $out/lib/javafx-web-*.jar libjfxwebkit.so -d $out/lib/ </ins> DEFAULT_JVM_OPTS=$(sed -n -E "s/^DEFAULT_JVM_OPTS='(.*)'$/1/p" $out/bin/JabRef | sed -e "s|$APP_HOME|$out|g" -e 's/"//g') rm $out/bin/*


Question:
The program Jabref will build, but give a JFX related error upon trying to run the program. Steps to reproduce the behavior: The program launches as it used to. Please run and paste the result.
It's fixed in but hasn't been merged.
Hi. Sorry for digging this up, but I'm having the same error for starting a JFX application inside Intellij IDEA, where is unable to find (or ). My hack to resolve this involves: Make sure that there is within your ( for example) Add the path to :Start Intellij IDEA from the shell. I felt like this is worth a separate issue (Intellij and JFX related), but wanted to ask it here first. Many thanks!
I can't understand what you want to ask... This issue is caused by the reason said in
I meant I had the same issue (missing for ), but in another context, and was wondering instead of that hacky workaround, is there any way to make my JFX application starts with no error.

}; jabref = callPackage ../applications/office/jabref { <del> jdk = javaPackages.compiler.openjdk18; </del> <ins> jdk = jdk19.override { enableJavaFX = true; }; gradle = gradle_7; </ins> }; jack_capture = callPackage ../applications/audio/jack-capture { };


Question:
lbreakouthd fails to launch with "libGL error: MESA-LOADER: failed to open iris" Steps to reproduce the behavior: lbreaouthd with lbreakouthd launches Framework laptop with intel graphics. Please run and paste the result.
keep an eye on the and tell me if anything goes wrong

{ lib , stdenv , fetchurl <ins> , directoryListingUpdater </ins> , SDL2 , SDL2_image , SDL2_mixer , SDL2_ttf <del> , directoryListingUpdater </del> }: <del> stdenv.mkDerivation rec { </del> <ins> stdenv.mkDerivation (self: { </ins> pname = "lbreakouthd"; <del> version = "1.1"; </del> <ins> version = "1.1.1"; </ins> src = fetchurl { <del> url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz"; hash = "sha256-5hjS0aJ5f8Oe0aSuVgcV10h5OmWsaMHF5B9wYVFrlDY="; </del> <ins> url = "mirror://sourceforge/lgames/lbreakouthd-${self.version}.tar.gz"; hash = "sha256-ljnZpuV9HPPR5bgdbyE8gUtb4m+JppxGm3MV691sw7E="; </ins> }; buildInputs = [


Question:
lbreakouthd fails to launch with "libGL error: MESA-LOADER: failed to open iris" Steps to reproduce the behavior: lbreaouthd with lbreakouthd launches Framework laptop with intel graphics. Please run and paste the result.
keep an eye on the and tell me if anything goes wrong

hardeningDisable = [ "format" ]; passthru.updateScript = directoryListingUpdater { <del> inherit pname version; </del> <ins> inherit (self) pname version; </ins> url = "https://lgames.sourceforge.io/LBreakoutHD/"; extraRegex = "(?!.*-win(32|64)).*"; }; <del> meta = with lib; { broken = stdenv.isDarwin; </del> <ins> meta = { </ins> homepage = "https://lgames.sourceforge.io/LBreakoutHD/"; description = "A widescreen Breakout clone"; <del> license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres ]; </del> <ins> license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ AndersonTorres ]; </ins> inherit (SDL2.meta) platforms; <ins> broken = stdenv.isDarwin; </ins> }; <del> } </del> <ins> }) </ins>


Question:
Since the introduction of in (), derivations should use instead of to further reduce the usage of the attribute.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

let inherit (torch) cudaCapabilities cudaPackages cudaSupport; <del> inherit (cudaPackages) cudatoolkit cudaFlags cudaVersion; </del> <ins> inherit (cudaPackages) backendStdenv cudaVersion; </ins> # NOTE: torchvision doesn't use cudnn; torch does! #   For this reason it is not included.


Question:
Since the introduction of in (), derivations should use instead of to further reduce the usage of the attribute.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

# NOTE: We essentially override the compilers provided by stdenv because we don't have a hook #   for cudaPackages to swap in compilers supported by NVCC. + lib.optionalString cudaSupport '' <del> export CC=${cudatoolkit.cc}/bin/cc export CXX=${cudatoolkit.cc}/bin/c++ </del> <ins> export CC=${backendStdenv.cc}/bin/cc export CXX=${backendStdenv.cc}/bin/c++ </ins> export TORCH_CUDA_ARCH_LIST="${lib.concatStringsSep ";" cudaCapabilities}" export FORCE_CUDA=1 '';


Question:
NixOS unstable is affected by on Wayland. Steps to reproduce the behavior: signal-desktop on Wayland. No crash. Add any other context about the problem here. Please run and paste the result.
I am also getting a crash every once in a while on startup. Starting it again works so far and it seems stable after that. Don't know what to do about that.
I've fixed this locally by using the following overlay:
Apparently, Signal beta works again on Wayland.
Just adding a data point. Having Wayland disabled actually caused more bugs for me. Re-enabling Wayland via 's overlay helped fix my compositor crashing whenever I clicked on certain UI like "preferences" in the "file" menu. Currently running: with set to and have the following env variables set:

preFixup = '' gappsWrapperArgs+=( --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }" <del> --add-flags "''${NIXOS_OZONE_WL:+''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" </del> <ins> # Currently crashes see https://github.com/NixOS/nixpkgs/issues/222043 #--add-flags "''${NIXOS_OZONE_WL:+''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" </ins> --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} )


Question:
Steps to reproduce the behavior: Bisected: Introduced in
From the build log: What the heck is that meant to do? This test would pass if the reported size of the TIFF starts with a 7, a 9, or a pipe character, and fails otherwise? Surely this is an upstream gscan2pdf issue.
Issue reported to the gscan2pdf project: Since this should not be impacting the other features of the program, I think it's safe to temporarily disable that one test for that package on our side.
Disabling the test temporarily in:
With merged, let's close this. There's nothing we can do until upstream reacts.
Apparently upstream did update their test according to , but we need to wait for a new release containing the fix.

]); checkPhase = '' <ins> # Temporarily disable a test failing after a patch imagemagick update. # It might only due to the reporting and matching used in the test. # See https://github.com/NixOS/nixpkgs/issues/223446 # See https://sourceforge.net/p/gscan2pdf/bugs/417/ # #   Failed test 'valid TIFF created' #   at t/131_save_tiff.t line 44. #                   'test.tif TIFF 70x46 70x46+0+0 8-bit sRGB 10024B 0.000u 0:00.000 # ' #     doesn't match '(?^:test.tif TIFF 70x46 70x46+0+0 8-bit sRGB [7|9][.d]+K?B)' rm t/131_save_tiff.t </ins> # Temporarily disable a dubiously failing test: # t/169_import_scan.t ........................... 1/1 # #   Failed test 'variable-height scan imported with expected size'


Question:
If gdm is enabled with Gnome enabled, gdm will crash and not load into the login screen after logout or reboot. This is due to gdm using wayland as the default. Once wayland is disabled in gdm, the login works. Steps to reproduce the behavior: channel nixos-unstable, "sudo nixos-rebuild switch upgrade-all" with Gnome enabled and gdm enabled in will hang at the gdm check point. gdm wayland in and the reboot works but with Wayland not working. Reboot into gdm with Wayland <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --
I just hit the same issue. After updating to latest nixos-unstable, the boot hangs just before login screen I think this is related to , at least the workaround posted there worked for me also
Would be relevant with a machine without AMD graphics and without KDE? As, I am running Intel's build in graphics and using Gnome. Also, I did find a "workaround" by disabling wayland in gdm then nixos-unstable will boot.
I managed to work around this issue with on GNOME Wayland. Graphic card: Intel Xe Graphics (TGL GT2)
Totally worked! Thanks and ! Should I leave this open as this is a bug or a new config that needs to be applied to 23.05?

mesaPackage = mkOption { type = types.package; <del> default = pkgs.mesa_23; defaultText = literalExpression "pkgs.mesa_23"; </del> <ins> default = pkgs.mesa; defaultText = literalExpression "pkgs.mesa"; </ins> example = literalExpression "pkgs.mesa_22"; description = lib.mdDoc '' The Mesa driver package used for rendering support on the system.


Question:
If gdm is enabled with Gnome enabled, gdm will crash and not load into the login screen after logout or reboot. This is due to gdm using wayland as the default. Once wayland is disabled in gdm, the login works. Steps to reproduce the behavior: channel nixos-unstable, "sudo nixos-rebuild switch upgrade-all" with Gnome enabled and gdm enabled in will hang at the gdm check point. gdm wayland in and the reboot works but with Wayland not working. Reboot into gdm with Wayland <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --
I just hit the same issue. After updating to latest nixos-unstable, the boot hangs just before login screen I think this is related to , at least the workaround posted there worked for me also
Would be relevant with a machine without AMD graphics and without KDE? As, I am running Intel's build in graphics and using Gnome. Also, I did find a "workaround" by disabling wayland in gdm then nixos-unstable will boot.
I managed to work around this issue with on GNOME Wayland. Graphic card: Intel Xe Graphics (TGL GT2)
Totally worked! Thanks and ! Should I leave this open as this is a bug or a new config that needs to be applied to 23.05?

}; mesaPackage32 = mkOption { type = types.package; <del> default = pkgs.pkgsi686Linux.mesa_23; defaultText = literalExpression "pkgs.pkgsi686Linux.mesa_23"; </del> <ins> default = pkgs.pkgsi686Linux.mesa; defaultText = literalExpression "pkgs.pkgsi686Linux.mesa"; </ins> example = literalExpression "pkgs.pkgsi686Linux.mesa_22"; description = lib.mdDoc '' Same as {option}`mesaPackage` but for the 32-bit Mesa on 64-bit


Question:
Project description VMware OVF Tool is a command-line utility that helps you import and export OVF packages to and from many VMware products. A package already exists for Linux ARM and x86-64. VMWare ships package for macOS but, but support for it is missing from the package. Metadata homepage URL: source URL: license: unfree platforms: darwin
The main problem in my case is that I don't have an Apple machine nor somewhere to emulate one, so I might not be able to support this ovftool type.
Work in progress, doesn't function. I have a few questions on that PR about how to do this and not make it a complete mess.

<del> { lib, stdenv, fetchurl, system ? builtins.currentSystem, ovftoolBundles ? {} , autoPatchelfHook, makeWrapper, unzip , glibc, c-ares, libxcrypt-legacy, expat, icu60, xercesc, zlib </del> <ins> { autoPatchelfHook , c-ares , darwin , expat , fetchurl , glibc , icu60 , lib , libiconv , libredirect , libxcrypt-legacy , libxml2 , makeWrapper , stdenv , unzip , xercesc , zlib </ins> }: let <del> version = "4.6.2-22220919"; version_i686 = "4.6.0-21452615"; ovftoolZipUnpackPhase = '' runHook preUnpack unzip ${ovftoolSource} extracted=ovftool/ if [ -d "$extracted" ]; then echo "ovftool extracted successfully" >&2 else echo "Could not find $extracted - are you sure this is ovftool?" >&2 exit 1 fi runHook postUnpack ''; ovftoolSystems = let baseUrl = "https://vdc-download.vmware.com/vmwb-repository/dcr-public"; in { "i686-linux" = rec { name = "VMware-ovftool-${version_i686}-lin.i386.zip"; url = "${baseUrl}/7254abb2-434d-4f5d-83e2-9311ced9752e/57e666a2-874c-48fe-b1d2-4b6381f7fe97/${name}"; hash = "sha256-qEOr/3SW643G5ZQQNJTelZbUxB8HmxPd5uD+Gqsoxz0="; unpackPhase = ovftoolZipUnpackPhase; }; "x86_64-linux" = rec { name = "VMware-ovftool-${version}-lin.x86_64.zip"; url = "${baseUrl}/8a93ce23-4f88-4ae8-b067-ae174291e98f/c609234d-59f2-4758-a113-0ec5bbe4b120/${name}"; hash = "sha256-3B1cUDldoTqLsbSARj2abM65nv+Ot0z/Fa35/klJXEY="; unpackPhase = ovftoolZipUnpackPhase; </del> <ins> ovftoolSystems = let baseUrl = "https://vdc-download.vmware.com/vmwb-repository/dcr-public"; in { "i686-linux" = rec { name = "VMware-ovftool-${version}-lin.i386.zip"; # As of 2024-02-20 the "Zip of OVF Tool for 32-bit Linux" download link # on the v4.6.2 page links to v4.6.0. version = "4.6.0-21452615"; url = "${baseUrl}/7254abb2-434d-4f5d-83e2-9311ced9752e/57e666a2-874c-48fe-b1d2-4b6381f7fe97/${name}"; hash = "sha256-qEOr/3SW643G5ZQQNJTelZbUxB8HmxPd5uD+Gqsoxz0="; }; "x86_64-linux" = rec { name = "VMware-ovftool-${version}-lin.x86_64.zip"; version = "4.6.2-22220919"; url = "${baseUrl}/8a93ce23-4f88-4ae8-b067-ae174291e98f/c609234d-59f2-4758-a113-0ec5bbe4b120/${name}"; hash = "sha256-3B1cUDldoTqLsbSARj2abM65nv+Ot0z/Fa35/klJXEY="; }; "x86_64-darwin" = rec { name = "VMware-ovftool-${version}-mac.x64.zip"; version = "4.6.2-22220919"; url = "${baseUrl}/91091b23-280a-487a-a048-0c2594303c92/dc666e23-104f-4b9b-be11-6d88dcf3ab98/${name}"; hash = "sha256-AZufZ0wxt5DYjnpahDfy36W8i7kjIfEkW6MoELSx11k="; }; </ins> }; <del> }; ovftoolSystem = if builtins.hasAttr system ovftoolSystems then ovftoolSystems.${system} else throw "System '${system}' is unsupported by ovftool"; </del> <ins> ovftoolSystem = ovftoolSystems.${stdenv.system} or (throw "unsupported system ${stdenv.system}"); </ins> <del> ovftoolSource = if builtins.hasAttr system ovftoolBundles then ovftoolBundles.${system} else fetchurl { inherit (ovftoolSystem) name url hash; }; </del> in <del> stdenv.mkDerivation rec { </del> <ins> stdenv.mkDerivation { </ins> pname = "ovftool"; <del> inherit version; </del> <ins> inherit (ovftoolSystem) version; </ins> <del> src = ovftoolSource; </del> <ins> src = fetchurl { inherit (ovftoolSystem) name url hash; }; </ins> buildInputs = [ <del> glibc libxcrypt-legacy </del> c-ares expat icu60 <ins> libiconv libxcrypt-legacy </ins> xercesc zlib <ins> ] ++ lib.optionals stdenv.isLinux [ glibc ] ++ lib.optionals stdenv.isDarwin [ darwin.Libsystem libxml2 </ins> ]; <del> nativeBuildInputs = [ autoPatchelfHook makeWrapper unzip ]; preferLocalBuild = true; </del> <ins> nativeBuildInputs = [ unzip makeWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; </ins> <del> sourceRoot = "."; unpackPhase = ovftoolSystem.unpackPhase; </del> <ins> postUnpack = '' # The linux package wraps ofvtool.bin with ovftool. Wrapping # below in installPhase. # Rename to ovftool on install for all systems to ovftool if [[ -f ovftool.bin ]]; then mv -v ovftool.bin ovftool fi ''; </ins> <del> # Expects a directory named 'ovftool' containing the ovftool install. # Based on https://aur.archlinux.org/packages/vmware-ovftool/ # with the addition of a libexec directory and a Nix-style binary wrapper. </del> installPhase = '' runHook preInstall <del> if [ -d ovftool ]; then # Ensure we're in the staging directory cd ovftool fi # libraries install -m 755 -d "$out/lib/${pname}" # These all appear to be VMWare proprietary except for libgoogleurl and libcurl. # The rest of the libraries that the installer extracts are omitted here, # and provided in buildInputs. Since libcurl depends on VMWare's OpenSSL, # we have to use both here too. # # FIXME: can we replace libgoogleurl? Possibly from Chromium? # FIXME: tell VMware to use a modern version of OpenSSL. # install -m 644 -t "$out/lib/${pname}"  </del> <ins> # Based on https://aur.archlinux.org/packages/vmware-ovftool/ # with the addition of a libexec directory and a Nix-style binary wrapper. # Almost all libs in the package appear to be VMware proprietary except for # libgoogleurl and libcurl. The rest of the libraries that the installer # extracts are omitted here, and provided in buildInputs. Since libcurl # depends on VMware's OpenSSL, both libs are still used. # FIXME: Replace libgoogleurl? Possibly from Chromium? # FIXME: Tell VMware to use a modern version of OpenSSL. As of ovftool # v4.6.2 ovftool uses openssl-1.0.2zh which in seems to be the extended # support LTS release: https://www.openssl.org/support/contracts.html # Install all libs that are not patched in preFixup. # Darwin dylibs are under `lib` in the zip. install -m 755 -d "$out/lib" install -m 644 -t "$out/lib"  '' + lib.optionalString stdenv.isLinux '' libcrypto.so.1.0.2  libcurl.so.4  </ins> libgoogleurl.so.59  <ins> libssl.so.1.0.2  </ins> libssoclient.so  <del> libvim-types.so libvmacore.so libvmomi.so  libcurl.so.4 libcrypto.so.1.0.2 libssl.so.1.0.2 # libexec binaries install -m 755 -d "$out/libexec/${pname}" install -m 755 -t "$out/libexec/${pname}" ovftool.bin install -m 644 -t "$out/libexec/${pname}" icudt44l.dat # libexec resources </del> <ins> libvim-types.so  libvmacore.so  libvmomi.so '' + lib.optionalString stdenv.isDarwin '' lib/libcrypto.1.0.2.dylib  lib/libcurl.4.dylib  lib/libgoogleurl.59.0.30.45.2.dylib  lib/libssl.1.0.2.dylib  lib/libssoclient.dylib  lib/libvim-types.dylib  lib/libvmacore.dylib  lib/libvmomi.dylib '' + '' # Install libexec binaries # ovftool expects to be run relative to certain directories, namely `env`. # Place the binary and those dirs in libexec. install -m 755 -d "$out/libexec" install -m 755 -t "$out/libexec" ovftool install -m 644 -t "$out/libexec" icudt44l.dat # Install other libexec resources that need to be relative to the `ovftool` # binary. </ins> for subdir in "certs" "env" "env/en" "schemas/DMTF" "schemas/vmware"; do <del> install -m 755 -d "$out/libexec/${pname}/$subdir" install -m 644 -t "$out/libexec/${pname}/$subdir" "$subdir"/*.* </del> <ins> install -m 755 -d "$out/libexec/$subdir" install -m 644 -t "$out/libexec/$subdir" "$subdir"/*.* </ins> done <del> # EULA/OSS files install -m 755 -d "$out/share/licenses/${pname}" install -m 644 -t "$out/share/licenses/${pname}"  "vmware.eula" "vmware-eula.rtf" "open_source_licenses.txt" # documentation files install -m 755 -d "$out/share/doc/${pname}" install -m 644 -t "$out/share/doc/${pname}" "README.txt" # binary wrapper; note that LC_CTYPE is defaulted to en_US.UTF-8 by # VMWare's wrapper script. We use C.UTF-8 instead. </del> <ins> # Install EULA/OSS files install -m 755 -d "$out/share/licenses" install -m 644 -t "$out/share/licenses"  "vmware.eula"  "vmware-eula.rtf"  "open_source_licenses.txt" # Install Docs install -m 755 -d "$out/share/doc" install -m 644 -t "$out/share/doc" "README.txt" # Install final executable </ins> install -m 755 -d "$out/bin" <del> makeWrapper "$out/libexec/${pname}/ovftool.bin" "$out/bin/ovftool"  --set-default LC_CTYPE C.UTF-8  </del> <ins> makeWrapper "$out/libexec/ovftool" "$out/bin/ovftool"  '' + lib.optionalString stdenv.isLinux '' </ins> --prefix LD_LIBRARY_PATH : "$out/lib" <ins> '' + lib.optionalString stdenv.isDarwin '' --prefix DYLD_LIBRARY_PATH : "$out/lib" '' + '' </ins> runHook postInstall ''; <del> preFixup = '' </del> <ins> preFixup = lib.optionalString stdenv.isLinux '' </ins> addAutoPatchelfSearchPath "$out/lib" <ins> '' + lib.optionalString stdenv.isDarwin '' change_args=() # Change relative @loader_path dylibs to absolute paths. for lib in $out/lib/*.dylib; do libname=$(basename $lib) change_args+=(-change "@loader_path/lib/$libname" "$out/lib/$libname") done # Patches for ovftool binary change_args+=(-change /usr/lib/libSystem.B.dylib ${darwin.Libsystem}/lib/libSystem.B.dylib) change_args+=(-change /usr/lib/libc++.1.dylib ${stdenv.cc.libcxx.cxxabi}/lib/libc++.1.dylib) change_args+=(-change /usr/lib/libiconv.2.dylib ${libiconv}/lib/libiconv.2.dylib) change_args+=(-change /usr/lib/libxml2.2.dylib ${libxml2}/lib/libxml2.2.dylib) change_args+=(-change /usr/lib/libz.1.dylib ${zlib}/lib/libz.1.dylib) change_args+=(-change @loader_path/lib/libcares.2.dylib ${c-ares}/lib/libcares.2.dylib) change_args+=(-change @loader_path/lib/libexpat.dylib ${expat}/lib/libexpat.dylib) change_args+=(-change @loader_path/lib/libicudata.60.2.dylib ${icu60}/lib/libicudata.60.2.dylib) change_args+=(-change @loader_path/lib/libicuuc.60.2.dylib ${icu60}/lib/libicuuc.60.2.dylib) change_args+=(-change @loader_path/lib/libxerces-c-3.2.dylib ${xercesc}/lib/libxerces-c-3.2.dylib) # Patch binary install_name_tool "''${change_args[@]}" "$out/libexec/ovftool" # Additional patches for ovftool dylibs change_args+=(-change /usr/lib/libresolv.9.dylib ${darwin.Libsystem}/lib/libresolv.9.dylib) change_args+=(-change @loader_path/libcares.2.dylib ${c-ares}/lib/libcares.2.dylib) change_args+=(-change @loader_path/libexpat.dylib ${expat}/lib/libexpat.dylib) change_args+=(-change @loader_path/libicudata.60.2.dylib ${icu60}/lib/libicudata.60.2.dylib) change_args+=(-change @loader_path/libicuuc.60.2.dylib ${icu60}/lib/libicuuc.60.2.dylib) change_args+=(-change @loader_path/libxerces-c-3.2.dylib ${xercesc}/lib/libxerces-c-3.2.dylib) # Add new abolute paths for other libs to all libs for lib in $out/lib/*.dylib; do libname=$(basename $lib) change_args+=(-change "@loader_path/$libname" "$out/lib/$libname") done # Patch all libs for lib in $out/lib/*.dylib; do libname=$(basename $lib) install_name_tool -id "$libname" "$lib" install_name_tool "''${change_args[@]}" "$lib" done ''; # These paths are need for install check tests propagatedSandboxProfile = lib.optionalString stdenv.isDarwin '' (allow file-read* (subpath "/usr/share/locale")) (allow file-read* (subpath "/var/db/timezone")) (allow file-read* (subpath "/System/Library/TextEncodings")) </ins> ''; doInstallCheck = true; <del> installCheckPhase = '' # This is a NixOS 22.11 image (doesn't actually matter) with a 1 MiB root disk that's all zero. # Make sure that it converts properly. mkdir -p ovftool-check cd ovftool-check </del> <ins> postInstallCheck = lib.optionalString stdenv.isDarwin '' export HOME=$TMPDIR # Construct a dummy /etc/passwd file - ovftool attempts to determine the # user's "real" home using this DUMMY_PASSWD="$(realpath $HOME/dummy-passwd)" cat > $DUMMY_PASSWD <<EOF $(whoami)::$(id -u):$(id -g)::$HOME:$SHELL EOF export DYLD_INSERT_LIBRARIES="${libredirect}/lib/libredirect.dylib" export NIX_REDIRECTS="/etc/passwd=$DUMMY_PASSWD" '' + '' mkdir -p ovftool-check && cd ovftool-check </ins> <del> $out/bin/ovftool ${./installCheckPhase.ova} nixos.ovf if [ ! -f nixos.ovf ] || [ ! -f nixos.mf ] || [ ! -f nixos-disk1.vmdk ]; then exit 1 fi </del> <ins> ovftool_with_args="$out/bin/ovftool --X:logToConsole" # `installCheckPhase.ova` is a NixOS 22.11 image (doesn't actually matter) # with a 1 MiB root disk that's all zero. Make sure that it converts # properly. $ovftool_with_args --schemaValidate ${./installCheckPhase.ova} $ovftool_with_args --sourceType=OVA --targetType=OVF ${./installCheckPhase.ova} nixos.ovf # Test that the output files are there test -f nixos.ovf test -f nixos.mf test -f nixos-disk1.vmdk $ovftool_with_args --schemaValidate nixos.ovf </ins> ''; meta = with lib; { <del> description = "VMWare tools for working with OVF, OVA, and VMX images"; </del> <ins> description = "VMware tools for working with OVF, OVA, and VMX images"; homepage = "https://developer.vmware.com/web/tool/ovf-tool/"; </ins> sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; <del> maintainers = with maintainers; [ numinit wolfangaukang ]; </del> <ins> maintainers = with maintainers; [ numinit wolfangaukang thanegill ]; </ins> platforms = builtins.attrNames ovftoolSystems; mainProgram = "ovftool"; <ins> knownVulnerabilities = [ "The bundled version of openssl 1.0.2zh in ovftool has open vulnerabilities." "CVE-2024-0727" "CVE-2023-5678" "CVE-2023-3817" "CVE-2009-3767" "CVE-2009-3766" "CVE-2009-3765" "CVE-2009-1390" ]; </ins> }; }


Question: Package name: organicmaps Latest released version: 2023.04.02-7Current version on the unstable channel: 2023.03.05-5 Current version on the stable/release channel: 2023.01.25-3 Notify maintainers Note for maintainers: Please tag this issue in your PR.

mkDerivation rec { pname = "organicmaps"; <del> version = "2023.03.05-5"; </del> <ins> version = "2023.04.02-7"; </ins> src = fetchFromGitHub { owner = "organicmaps"; repo = "organicmaps"; rev = "${version}-android"; <del> sha256 = "sha256-PfudozmrL8jNS/99nxSn0B3E53W34m4/ZN0y2ucB2WI="; </del> <ins> sha256 = "sha256-xXBzHo7IOo2f1raGnpFcsvs++crHMI5SACIc345cX7g="; </ins> fetchSubmodules = true; };


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

# symbolic name and `patch' is the actual patch.  The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] <del> , ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name or "" != "pc" </del> <ins> , ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc" </ins> , extraMeta ? {} , isZen      ? false


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

, isHardened ? false # easy overrides to stdenv.hostPlatform.linux-kernel members <del> , autoModules ? stdenv.hostPlatform.linux-kernel.autoModules or true </del> <ins> , autoModules ? stdenv.hostPlatform.linux-kernel.autoModules </ins> , preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false , kernelArch ? stdenv.hostPlatform.linuxArch , kernelTests ? []


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ] ++ lib.optional (lib.versionAtLeast version "5.2") pahole; <ins> platformName = stdenv.hostPlatform.linux-kernel.name; </ins> # e.g. "defconfig" <del> kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig or "defconfig"; </del> <ins> kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig; # e.g. "bzImage" kernelTarget = stdenv.hostPlatform.linux-kernel.target; </ins> makeFlags = lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) stdenv.hostPlatform.linux-kernel.makeFlags ++ extraMakeFlags;


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

{ lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl <del> , libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole, ubootTools </del> <ins> , libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole </ins> , fetchpatch }:


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

}: let <del> config_ = config; in let </del> inherit (lib) hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

(buildPackages.deterministic-uname.override { inherit modDirVersion; }) ] ++ optional (lib.versionAtLeast version "5.13") zstd; <del> config = let attrName = attr: "CONFIG_" + attr; in { isSet = attr: hasAttr (attrName attr) config; getValue = attr: if config.isSet attr then getAttr (attrName attr) config else null; isYes = attr: (config.getValue attr) == "y"; isNo = attr: (config.getValue attr) == "n"; isModule = attr: (config.getValue attr) == "m"; isEnabled = attr: (config.isModule attr) || (config.isYes attr); isDisabled = attr: (!(config.isSet attr)) || (config.isNo attr); } // config_; isModular = config.isYes "MODULES"; kernelConf = stdenv.hostPlatform.linux-kernel; target = kernelConf.target or "vmlinux"; buildDTBs = kernelConf.DTB or false; </del> <ins> drvAttrs = config_: kernelConf: kernelPatches: configfile: let config = let attrName = attr: "CONFIG_" + attr; in { isSet = attr: hasAttr (attrName attr) config; getValue = attr: if config.isSet attr then getAttr (attrName attr) config else null; isYes = attr: (config.getValue attr) == "y"; isNo = attr: (config.getValue attr) == "n"; isModule = attr: (config.getValue attr) == "m"; isEnabled = attr: (config.isModule attr) || (config.isYes attr); isDisabled = attr: (!(config.isSet attr)) || (config.isNo attr); } // config_; isModular = config.isYes "MODULES"; buildDTBs = kernelConf.DTB or false; in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // { passthru = rec { inherit version modDirVersion config kernelPatches configfile moduleBuildDependencies stdenv; inherit isZen isHardened isLibre; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; baseVersion = lib.head (lib.splitString "-rc" version); kernelOlder = lib.versionOlder baseVersion; kernelAtLeast = lib.versionAtLeast baseVersion; }; inherit src; patches = map (p: p.patch) kernelPatches # Required for deterministic builds along with some postPatch magic. ++ optional (lib.versionOlder version "5.19") ./randstruct-provide-seed.patch ++ optional (lib.versionAtLeast version "5.19") ./randstruct-provide-seed-5.19.patch # Linux 5.12 marked certain PowerPC-only symbols as GPL, which breaks # OpenZFS; this was fixed in Linux 5.19 so we backport the fix # https://github.com/openzfs/zfs/pull/13367 ++ optional (lib.versionAtLeast version "5.12" && lib.versionOlder version "5.19" && stdenv.hostPlatform.isPower) (fetchpatch { url = "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=d9e5c3e9e75162f845880535957b7fd0b4637d23"; hash = "sha256-bBOyJcP6jUvozFJU0SPTOf3cmnTQ6ZZ4PlHjiniHXLU="; }); preUnpack = '' # The same preUnpack is used to build the configfile, # which does not have $dev. if [ -n "$dev" ]; then mkdir -p $dev/lib/modules/${modDirVersion} cd $dev/lib/modules/${modDirVersion} fi ''; postUnpack = '' mv -Tv "$sourceRoot" source 2>/dev/null || : export sourceRoot=$PWD/source ''; postPatch = '' sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|' # fixup for pre-5.4 kernels using the $(cd $foo && /bin/pwd) pattern # FIXME: remove when no longer needed substituteInPlace Makefile tools/scripts/Makefile.include --replace /bin/pwd pwd # Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic. # This way kernels can be bit-by-bit reproducible depending on settings # (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled). # See also https://kernelnewbies.org/BuildId sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|' # Some linux-hardened patches now remove certain files in the scripts directory, so the file may not exist. [[ -f scripts/ld-version.sh ]] && patchShebangs scripts/ld-version.sh # Set randstruct seed to a deterministic but diversified value. Note: # we could have instead patched gen-random-seed.sh to take input from # the buildFlags, but that would require also patching the kernel's # toplevel Makefile to add a variable export. This would be likely to # cause future patch conflicts. for file in scripts/gen-randstruct-seed.sh scripts/gcc-plugins/gen-random-seed.sh; do if [ -f "$file" ]; then substituteInPlace "$file"  --replace NIXOS_RANDSTRUCT_SEED  $(echo ${randstructSeed}${src} ${placeholder "configfile"} | sha256sum | cut -d ' ' -f 1 | tr -d 'n') break fi done patchShebangs scripts # also patch arch-specific install scripts for i in $(find arch -name install.sh); do patchShebangs "$i" done ''; configurePhase = '' runHook preConfigure export buildRoot=$(mktemp -d) echo "manual-config configurePhase buildRoot=$buildRoot pwd=$PWD" if [ -f "$buildRoot/.config" ]; then echo "Could not link $buildRoot/.config : file exists" exit 1 fi ln -sv ${configfile} $buildRoot/.config # reads the existing .config file and prompts the user for options in # the current kernel source that are not found in the file. make $makeFlags "''${makeFlagsArray[@]}" oldconfig runHook postConfigure make $makeFlags "''${makeFlagsArray[@]}" prepare actualModDirVersion="$(cat $buildRoot/include/config/kernel.release)" if [ "$actualModDirVersion" != "${modDirVersion}" ]; then echo "Error: modDirVersion ${modDirVersion} specified in the Nix expression is wrong, it should be: $actualModDirVersion" exit 1 fi buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)") cd $buildRoot ''; buildFlags = [ "DTC_FLAGS=-@" "KBUILD_BUILD_VERSION=1-NixOS" # Set by default in the kernel since a73619a845d5, # replicated here to apply to older versions. # Makes __FILE__ relative to the build directory. "KCPPFLAGS=-fmacro-prefix-map=$(sourceRoot)/=" ] ++ extraMakeFlags; installFlags = [ "INSTALL_PATH=$(out)" ] ++ (optional isModular "INSTALL_MOD_PATH=$(out)") ++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"]; preInstall = let # All we really need to do here is copy the final image and System.map to $out, # and use the kernel's modules_install, firmware_install, dtbs_install, etc. targets # for the rest. Easy, right? # # Unfortunately for us, the obvious way of getting the built image path, # make -s image_name, does not work correctly, because some architectures # (*cough* aarch64 *cough*) change KBUILD_IMAGE on the fly in their install targets, # so we end up attempting to install the thing we didn't actually build. # # Thankfully, there's a way out that doesn't involve just hardcoding everything. # # The kernel has an install target, which runs a pretty simple shell script # (located at scripts/install.sh or arch/$arch/boot/install.sh, depending on # which kernel version you're looking at) that tries to do something sensible. # # (it would be great to hijack this script immediately, as it has all the #   information we need passed to it and we don't need it to try and be smart, #   but unfortunately, the exact location of the scripts differs between kernel #   versions, and they're seemingly not considered to be public API at all) # # One of the ways it tries to discover what "something sensible" actually is # is by delegating to what's supposed to be a user-provided install script # located at ~/bin/installkernel. # # (the other options are: #   - a distribution-specific script at /sbin/installkernel, #        which we can't really create in the sandbox easily #   - an architecture-specific script at arch/$arch/boot/install.sh, #        which attempts to guess _something_ and usually guesses very wrong) # # More specifically, the install script exec's into ~/bin/installkernel, if one # exists, with the following arguments: # # $1: $KERNELRELEASE - full kernel version string # $2: $KBUILD_IMAGE - the final image path # $3: System.map - path to System.map file, seemingly hardcoded everywhere # $4: $INSTALL_PATH - path to the destination directory as specified in installFlags # # $2 is exactly what we want, so hijack the script and use the knowledge given to it # by the makefile overlords for our own nefarious ends. # # Note that the makefiles specifically look in ~/bin/installkernel, and # writeShellScriptBin writes the script to <store path>/bin/installkernel, # so HOME needs to be set to just the store path. # # FIXME: figure out a less roundabout way of doing this. installkernel = buildPackages.writeShellScriptBin "installkernel" '' cp -av $2 $4 cp -av $3 $4 ''; in '' installFlagsArray+=("-j$NIX_BUILD_CORES") export HOME=${installkernel} ''; # Some image types need special install targets (e.g. uImage is installed with make uinstall) installTargets = [ (kernelConf.installTarget or ( /**/ if kernelConf.target == "uImage" then "uinstall" else if kernelConf.target == "zImage" || kernelConf.target == "Image.gz" then "zinstall" else "install")) ]; postInstall = optionalString isModular '' if [ -z "''${dontStrip-}" ]; then installFlagsArray+=("INSTALL_MOD_STRIP=1") fi make modules_install $makeFlags "''${makeFlagsArray[@]}"  $installFlags "''${installFlagsArray[@]}" unlink $out/lib/modules/${modDirVersion}/build unlink $out/lib/modules/${modDirVersion}/source mkdir $dev/lib/modules/${modDirVersion}/build cd $dev/lib/modules/${modDirVersion}/source cp $buildRoot/{.config,Module.symvers} $dev/lib/modules/${modDirVersion}/build make modules_prepare $makeFlags "''${makeFlagsArray[@]}" O=$dev/lib/modules/${modDirVersion}/build # For reproducibility, removes accidental leftovers from a `cc1` call # from a `try-run` call from the Makefile rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d # Keep some extra files for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o  scripts/gdb/linux vmlinux vmlinux-gdb.py do if [ -e "$buildRoot/$f" ]; then mkdir -p "$(dirname "$dev/lib/modules/${modDirVersion}/build/$f")" cp -HR $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f fi done ln -s $dev/lib/modules/${modDirVersion}/build/vmlinux $dev # !!! No documentation on how much of the source tree must be kept # If/when kernel builds fail due to missing files, you can add # them here. Note that we may see packages requiring headers # from drivers/ in the future; it adds 50M to keep all of its # headers on 3.10 though. chmod u+w -R .. arch=$(cd $dev/lib/modules/${modDirVersion}/build/arch; ls) # Remove unused arches for d in $(cd arch/; ls); do if [ "$d" = "$arch" ]; then continue; fi if [ "$arch" = arm64 ] && [ "$d" = arm ]; then continue; fi rm -rf arch/$d done # Remove all driver-specific code (50M of which is headers) rm -fR drivers # Keep all headers find .  -type f -name '*.h' -print0 | xargs -0 -r chmod u-w # Keep linker scripts (they are required for out-of-tree modules on aarch64) find .  -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w # Keep root and arch-specific Makefiles chmod u-w Makefile arch/"$arch"/Makefile* # Keep whole scripts dir chmod u-w -R scripts # Delete everything not kept find . -type f -perm -u=w -print0 | xargs -0 -r rm # Delete empty directories find -empty -type d -delete # Remove reference to kmod sed -i Makefile -e 's|= ${buildPackages.kmod}/bin/depmod|= depmod|' ''; preFixup = '' # Don't strip $dev/lib/modules/*/vmlinux stripDebugList="$(cd $dev && echo lib/modules/*/build/*/)" ''; requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "The Linux kernel" + (if kernelPatches == [] then "" else " (with patches: " + lib.concatStringsSep ", " (map (x: x.name) kernelPatches) + ")"); license = lib.licenses.gpl2Only; homepage = "https://www.kernel.org/"; maintainers = lib.teams.linux-kernel.members ++ [ maintainers.thoughtpolice ]; platforms = platforms.linux; timeout = 14400; # 4 hours } // extraMeta; }; </ins> in assert lib.versionOlder version "5.8" -> libelf != null; assert lib.versionAtLeast version "5.8" -> elfutils != null; <del> stdenv.mkDerivation ({ </del> <ins> stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // { </ins> pname = "linux"; <del> inherit version src; </del> <ins> inherit version; enableParallelBuilding = true; </ins> depsBuildBuild = [ buildPackages.stdenv.cc ]; <del> nativeBuildInputs = [ bc gmp libmpc mpfr nettools openssl perl python3Minimal rsync ubootTools zstd ] ++ optional  (lib.versionOlder version "5.8") libelf ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] ++ optionals (lib.versionAtLeast version "5.2")  [ cpio pahole zlib ] ++ optional  (lib.versionAtLeast version "5.8")  elfutils; patches = map (p: p.patch) kernelPatches # Required for deterministic builds along with some postPatch magic. ++ optional (lib.versionOlder version "5.19") ./randstruct-provide-seed.patch ++ optional (lib.versionAtLeast version "5.19") ./randstruct-provide-seed-5.19.patch # Linux 5.12 marked certain PowerPC-only symbols as GPL, which breaks # OpenZFS; this was fixed in Linux 5.19 so we backport the fix # https://github.com/openzfs/zfs/pull/13367 ++ optional (lib.versionAtLeast version "5.12" && lib.versionOlder version "5.19" && stdenv.hostPlatform.isPower) (fetchpatch { url = "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=d9e5c3e9e75162f845880535957b7fd0b4637d23"; hash = "sha256-bBOyJcP6jUvozFJU0SPTOf3cmnTQ6ZZ4PlHjiniHXLU="; }); preUnpack = '' # The same preUnpack is used to build the configfile, # which does not have $dev. if [ -n "$dev" ]; then mkdir -p $dev/lib/modules/${modDirVersion} cd $dev/lib/modules/${modDirVersion} fi ''; postUnpack = '' mv -Tv "$sourceRoot" source 2>/dev/null || : export sourceRoot=$PWD/source ''; postPatch = '' sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|' # fixup for pre-4.15 kernels using the $(cd $foo && /bin/pwd) pattern # FIXME: remove when no longer needed substituteInPlace Makefile tools/scripts/Makefile.include --replace /bin/pwd pwd # Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic. # This way kernels can be bit-by-bit reproducible depending on settings # (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled). # See also https://kernelnewbies.org/BuildId sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|' # Some linux-hardened patches now remove certain files in the scripts directory, so the file may not exist. [[ -f scripts/ld-version.sh ]] && patchShebangs scripts/ld-version.sh # Set randstruct seed to a deterministic but diversified value. Note: # we could have instead patched gen-random-seed.sh to take input from # the buildFlags, but that would require also patching the kernel's # toplevel Makefile to add a variable export. This would be likely to # cause future patch conflicts. for file in scripts/gen-randstruct-seed.sh scripts/gcc-plugins/gen-random-seed.sh; do if [ -f "$file" ]; then substituteInPlace "$file"  --replace NIXOS_RANDSTRUCT_SEED  $(echo ${randstructSeed}${src} ${placeholder "configfile"} | sha256sum | cut -d ' ' -f 1 | tr -d 'n') break fi done patchShebangs scripts # also patch arch-specific install scripts for i in $(find arch -name install.sh); do patchShebangs "$i" done ''; configurePhase = '' runHook preConfigure export buildRoot=$TMPDIR/kernel-buildroot mkdir -p $buildRoot echo "manual-config configurePhase buildRoot=$buildRoot pwd=$PWD" if [ -f "$buildRoot/.config" ]; then echo "Could not link $buildRoot/.config : file exists" exit 1 fi ln -sv ${configfile} $buildRoot/.config # reads the existing .config file and prompts the user for options in # the current kernel source that are not found in the file. make $makeFlags "''${makeFlagsArray[@]}" oldconfig runHook postConfigure make $makeFlags "''${makeFlagsArray[@]}" prepare actualModDirVersion="$(cat $buildRoot/include/config/kernel.release)" if [ "$actualModDirVersion" != "${modDirVersion}" ]; then echo "Error: modDirVersion ${modDirVersion} specified in the Nix expression is wrong, it should be: $actualModDirVersion" exit 1 fi buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)") cd $buildRoot ''; </del> <ins> nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr zstd python3Minimal ] ++ optional  (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools ++ optional  (lib.versionOlder version "5.8") libelf ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] ++ optionals (lib.versionAtLeast version "5.2")  [ cpio pahole zlib ] ++ optional  (lib.versionAtLeast version "5.8")  elfutils ; </ins> hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];


Question:
Building powerpc kernels (I only tested pkgsCross.powernv, but examination of the kernel source code suggests to me that 32-bit powerpc, and well as big-endian 64-bit will be the same) is broken since This happens because on powerpc, the kernel target we install is vmlinux, rather than any derivative of it like zImage. The kernel build system will strip when creating such a derivative image, but because we install vmlinux directly, we get an unstripped image. This means the kernel contains references to its build directory, which since that PR will be the $dev output. AIUI, 64-bit POWER boots via kexec, and a zImage is a self-extracting kernel ELF image, so hopefully the fix would just be to switch the kernel target for powerpc to zImage, and things will work again, and POWER users will get smaller kernel images as a bonus. I'm not sure about 32-bit PowerPC, but this might be helpful. If we can't use an *Image target for any powerpc targets, there is also a target called that we could fall back to, but let's take the opportunity to evaluate whether anything else is more suitable first, when we're changing this stuff anyway. Apart from powerpc, the only we have that uses vmlinux as its kernel target is a MIPS machine called the Fuloong 2.0. I don't know how it boots.
I'll handle this. I don't have big-endian POWER hardware, but pointed out that qemu can probably boot a BE kernel under emulation at full hardware speeds. So if that works I can take care of the 32-bit POWER (which is mostly BE) too.
For reference, I managed to get a working kernel derivation for Power9 with Just setting building a zImage without fully stripping it afterwards wasn't enough. There still was a reference to in the debug info somewhere.
Yep, very plausible that there are other references as well. We had for x86 and RISC-V, although that specific issue didn't apply to other architectures.
I'll dig into this this evening. thank you for the tip! Also putting this link here so I don't lose it:
Verified (after fixing a bunch of other things) that is affected too. Thanks again for the heads up Working on a fix.
Edit: I meant to post this .
Fixed by

"ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" <del> ] ++ (kernelConf.makeFlags or []) </del> <ins> ] ++ (stdenv.hostPlatform.linux-kernel.makeFlags or []) </ins> ++ extraMakeFlags; karch = stdenv.hostPlatform.linuxArch; <del> buildFlags = [ "DTC_FLAGS=-@" "KBUILD_BUILD_VERSION=1-NixOS" # Set by default in the kernel since a73619a845d5, # replicated here to apply to older versions. # Makes __FILE__ relative to the build directory. "KCPPFLAGS=-fmacro-prefix-map=$(sourceRoot)/=" kernelConf.target ] ++ optional isModular "modules" ++ optional buildDTBs "dtbs" ++ extraMakeFlags; installFlags = [ "INSTALL_PATH=$(out)" ] ++ (optional isModular "INSTALL_MOD_PATH=$(out)") ++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"]; preInstall = let # All we really need to do here is copy the final image and System.map to $out, # and use the kernel's modules_install, firmware_install, dtbs_install, etc. targets # for the rest. Easy, right? # # Unfortunately for us, the obvious way of getting the built image path, # make -s image_name, does not work correctly, because some architectures # (*cough* aarch64 *cough*) change KBUILD_IMAGE on the fly in their install targets, # so we end up attempting to install the thing we didn't actually build. # # Thankfully, there's a way out that doesn't involve just hardcoding everything. # # The kernel has an install target, which runs a pretty simple shell script # (located at scripts/install.sh or arch/$arch/boot/install.sh, depending on # which kernel version you're looking at) that tries to do something sensible. # # (it would be great to hijack this script immediately, as it has all the #   information we need passed to it and we don't need it to try and be smart, #   but unfortunately, the exact location of the scripts differs between kernel #   versions, and they're seemingly not considered to be public API at all) # # One of the ways it tries to discover what "something sensible" actually is # is by delegating to what's supposed to be a user-provided install script # located at ~/bin/installkernel. # # (the other options are: #   - a distribution-specific script at /sbin/installkernel, #        which we can't really create in the sandbox easily #   - an architecture-specific script at arch/$arch/boot/install.sh, #        which attempts to guess _something_ and usually guesses very wrong) # # More specifically, the install script exec's into ~/bin/installkernel, if one # exists, with the following arguments: # # $1: $KERNELRELEASE - full kernel version string # $2: $KBUILD_IMAGE - the final image path # $3: System.map - path to System.map file, seemingly hardcoded everywhere # $4: $INSTALL_PATH - path to the destination directory as specified in installFlags # # $2 is exactly what we want, so hijack the script and use the knowledge given to it # by the makefile overlords for our own nefarious ends. # # Note that the makefiles specifically look in ~/bin/installkernel, and # writeShellScriptBin writes the script to <store path>/bin/installkernel, # so HOME needs to be set to just the store path. # # FIXME: figure out a less roundabout way of doing this. installkernel = buildPackages.writeShellScriptBin "installkernel" '' cp -av $2 $4 cp -av $3 $4 ''; in '' installFlagsArray+=("-j$NIX_BUILD_CORES") export HOME=${installkernel} ''; # Some image types need special install targets (e.g. uImage is installed with make uinstall) installTargets = [ (kernelConf.installTarget or ( /**/ if target == "uImage" then "uinstall" else if target == "zImage" || target == "Image.gz" then "zinstall" else "install")) ]; postInstall = optionalString isModular '' if [ -z "''${dontStrip-}" ]; then installFlagsArray+=("INSTALL_MOD_STRIP=1") fi make modules_install $makeFlags "''${makeFlagsArray[@]}"  $installFlags "''${installFlagsArray[@]}" unlink $out/lib/modules/${modDirVersion}/build unlink $out/lib/modules/${modDirVersion}/source mkdir $dev/lib/modules/${modDirVersion}/build cd $dev/lib/modules/${modDirVersion}/source cp $buildRoot/{.config,Module.symvers} $dev/lib/modules/${modDirVersion}/build make modules_prepare $makeFlags "''${makeFlagsArray[@]}" O=$dev/lib/modules/${modDirVersion}/build # For reproducibility, removes accidental leftovers from a `cc1` call # from a `try-run` call from the Makefile rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d # Keep some extra files for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o  scripts/gdb/linux vmlinux vmlinux-gdb.py do if [ -e "$buildRoot/$f" ]; then mkdir -p "$(dirname "$dev/lib/modules/${modDirVersion}/build/$f")" cp -HR $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f fi done ln -s $dev/lib/modules/${modDirVersion}/build/vmlinux $dev # !!! No documentation on how much of the source tree must be kept # If/when kernel builds fail due to missing files, you can add # them here. Note that we may see packages requiring headers # from drivers/ in the future; it adds 50M to keep all of its # headers on 3.10 though. chmod u+w -R .. arch=$(cd $dev/lib/modules/${modDirVersion}/build/arch; ls) # Remove unused arches for d in $(cd arch/; ls); do if [ "$d" = "$arch" ]; then continue; fi if [ "$arch" = arm64 ] && [ "$d" = arm ]; then continue; fi rm -rf arch/$d done # Remove all driver-specific code (50M of which is headers) rm -fR drivers # Keep all headers find .  -type f -name '*.h' -print0 | xargs -0 -r chmod u-w # Keep linker scripts (they are required for out-of-tree modules on aarch64) find .  -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w # Keep root and arch-specific Makefiles chmod u-w Makefile arch/"$arch"/Makefile* # Keep whole scripts dir chmod u-w -R scripts # Delete everything not kept find . -type f -perm -u=w -print0 | xargs -0 -r rm # Delete empty directories find -empty -type d -delete # Remove reference to kmod sed -i Makefile -e 's|= ${buildPackages.kmod}/bin/depmod|= depmod|' '' # unfortunately linux/arch/mips/Makefile does not understand installkernel # and simply copies to $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE) + lib.optionalString stdenv.hostPlatform.isMips '' mv $out/vmlinux-* $out/vmlinux || true mv $out/vmlinuz-* $out/vmlinuz || true mv $out/System.map-* $out/System.map ''; preFixup = '' # Don't strip $dev/lib/modules/*/vmlinux stripDebugList="$(cd $dev && echo lib/modules/*/build/*/)" '' + lib.optionalString (stdenv.hostPlatform.isMips) '' $STRIP -s $out/vmlinux || true ''; enableParallelBuilding = true; passthru = rec { inherit version modDirVersion config kernelPatches configfile moduleBuildDependencies stdenv; inherit isZen isHardened isLibre; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; baseVersion = lib.head (lib.splitString "-rc" version); kernelOlder = lib.versionOlder baseVersion; kernelAtLeast = lib.versionAtLeast baseVersion; }; requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "The Linux kernel" + (lib.optionalString (kernelPatches != []) ( " (with patches: " + lib.concatStringsSep ", " (map (x: x.name) kernelPatches) + ")" )); license = lib.licenses.gpl2Only; homepage = "https://www.kernel.org/"; maintainers = lib.teams.linux-kernel.members ++ [ maintainers.thoughtpolice ]; platforms = platforms.linux; badPlatforms = lib.optionals (lib.versionOlder version "4.15") [ "riscv32-linux" "riscv64-linux" ] ++ lib.optional (lib.versionOlder version "5.19") "loongarch64-linux"; timeout = 14400; # 4 hours } // extraMeta; } // optionalAttrs (pos != null) { inherit pos; } // optionalAttrs isModular { outputs = [ "out" "dev" ]; })) </del> <ins> } // (optionalAttrs (pos != null) { inherit pos; }))) </ins>


Question: The pkg-config file in pkg looks like this: The and variables are empty. The keyword is also empty. As a result, the flags returned by pkg-config are wrong and checking the version does not work. Note the empty and and that the package version is actually 3.0.1, i.e. = 3.0.0. and should point to the correct directories in the and outputs of the pkg.

}) ]; <ins> # Tweaks to fix undefined variable substitutions # https://github.com/HowardHinnant/date/pull/538#pullrequestreview-1373268697 postPatch = '' substituteInPlace date.pc.in  --replace '@CMAKE_INSTALL_LIB@' '@CMAKE_INSTALL_FULL_LIBDIR@'  --replace '@CMAKE_INSTALL_INCLUDE@' '@CMAKE_INSTALL_FULL_INCLUDEDIR@'  --replace '@PACKAGE_VERSION@' '${version}' ''; </ins> nativeBuildInputs = [ cmake ]; cmakeFlags = [