Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nexusmods-app: 0.4.1 -> 0.5.2 #318647

Closed
wants to merge 1 commit into from
Closed

Conversation

l0b0
Copy link
Contributor

@l0b0 l0b0 commented Jun 9, 2024

Description of changes

Release notes

Commits

  • Don't include upstream's 7zz binary
  • Tell the app it is a distro package
  • Document more of the build configuration
  • Format using nixfmt-rfc-style

Closes #317852.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jun 10, 2024
@l0b0 l0b0 force-pushed the nexusmods-app-update branch from 6a88ec9 to ccb781e Compare June 10, 2024 01:21
@l0b0 l0b0 force-pushed the nexusmods-app-update branch 2 times, most recently from d7324a5 to d89e1d1 Compare June 10, 2024 01:54
@MattSturgeon
Copy link
Contributor

I cant build (error : No space left on device [/build/source/NexusMods.App.sln]), but that's probably because I have / mounted as tmpfs...

@l0b0 l0b0 force-pushed the nexusmods-app-update branch from 1008eb7 to 629f6b8 Compare June 10, 2024 02:33
Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

While I'm not experienced in dotnet, I am excited about the nexusmods-app. Therefore I'm tempted to add myself as a maintainer.

Should I open a PR to do that, or is normal procedure to wait until actually contributing something to the package?

@l0b0
Copy link
Contributor Author

l0b0 commented Jun 10, 2024

Looks good.

Thank you for the help!

While I'm not experienced in dotnet, I am excited about the nexusmods-app. Therefore I'm tempted to add myself as a maintainer.

That would be great! I was about to ask 😁

Should I open a PR to do that, or is normal procedure to wait until actually contributing something to the package?

You have contributed to this PR, but it's probably easiest to add yourself in a separate PR.

@l0b0 l0b0 force-pushed the nexusmods-app-update branch from 629f6b8 to d69cbaf Compare June 10, 2024 03:17
@qubitnano
Copy link
Contributor

This builds but I get a crash when running:

[nix-shell:~/.cache/nixpkgs-review/pr-318647-3/results/nexusmods-app/bin]$ ./NexusMods.App 
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

File name: 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at Microsoft.Extensions.Hosting.HostBuilder..ctor()
   at NexusMods.App.Program.BuildSettingsHost() in /build/source/src/NexusMods.App/Program.cs:line 171
   at NexusMods.App.Program.Main(String[] args) in /build/source/src/NexusMods.App/Program.cs:line 39
Aborted (core dumped)

@l0b0
Copy link
Contributor Author

l0b0 commented Jun 10, 2024

This builds but I get a crash when running:

Same, and I have no idea what that error means. @erri120?

@erri120
Copy link

erri120 commented Jun 10, 2024

This builds but I get a crash when running:

Same, and I have no idea what that error means. @erri120?

If you refer to #318647 (comment) then that means the assembly Microsoft.Extensions.DependencyInjection.dll is either missing or the assembly loader couldn't find it. This can happen with funky build outputs and broken runtime paths. I'd suggest checking the output directory and see if NexusMods.App.deps.json exists and is valid.

@l0b0 l0b0 force-pushed the nexusmods-app-update branch 4 times, most recently from cd73659 to ff49220 Compare June 11, 2024 03:23
@l0b0 l0b0 force-pushed the nexusmods-app-update branch from c95a5c0 to 7fb2db9 Compare June 11, 2024 03:49
@ofborg ofborg bot requested a review from MattSturgeon June 11, 2024 04:04
@l0b0 l0b0 force-pushed the nexusmods-app-update branch from 7fb2db9 to 3e9797d Compare June 11, 2024 07:45
@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jun 11, 2024

This builds but I get a crash when running:

[nix-shell:~/.cache/nixpkgs-review/pr-318647-3/results/nexusmods-app/bin]$ ./NexusMods.App 
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

File name: 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at Microsoft.Extensions.Hosting.HostBuilder..ctor()
   at NexusMods.App.Program.BuildSettingsHost() in /build/source/src/NexusMods.App/Program.cs:line 171
   at NexusMods.App.Program.Main(String[] args) in /build/source/src/NexusMods.App/Program.cs:line 39
Aborted (core dumped)

I get the same error with nix run .#nexusmods-app

That means the assembly Microsoft.Extensions.DependencyInjection.dll is either missing or the assembly loader couldn't find it.

Is that DLL part of dotnet-runtime-8.0.6 or are we missing a dependency?

If we're not missing anything, it should be on the LD_LIBRARY_PATH somewhere... The wrapper script (installed at bin/NexusMods.App) looks like this in my build:

Details

#! /nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash -e
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+':'$LD_LIBRARY_PATH':'}
if [[ $LD_LIBRARY_PATH != *':''/nix/store/azbphnp68h4fkm0fsbird88bn76ggjsh-fontconfig-2.15.0-lib/lib'':'* ]]; then
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH'/nix/store/azbphnp68h4fkm0fsbird88bn76ggjsh-fontconfig-2.15.0-lib/lib'
fi
LD_LIBRARY_PATH=${LD_LIBRARY_PATH#':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%':'}
export LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+':'$LD_LIBRARY_PATH':'}
if [[ $LD_LIBRARY_PATH != *':''/nix/store/alryr2fk5z2n19s72q1yf0r71ych8jml-libICE-1.1.1/lib'':'* ]]; then
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH'/nix/store/alryr2fk5z2n19s72q1yf0r71ych8jml-libICE-1.1.1/lib'
fi
LD_LIBRARY_PATH=${LD_LIBRARY_PATH#':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%':'}
export LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+':'$LD_LIBRARY_PATH':'}
if [[ $LD_LIBRARY_PATH != *':''/nix/store/h8j225cl14p2yz55xa76rasfins4540w-libSM-1.2.4/lib'':'* ]]; then
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH'/nix/store/h8j225cl14p2yz55xa76rasfins4540w-libSM-1.2.4/lib'
fi
LD_LIBRARY_PATH=${LD_LIBRARY_PATH#':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%':'}
export LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+':'$LD_LIBRARY_PATH':'}
if [[ $LD_LIBRARY_PATH != *':''/nix/store/x9fw7rbdb34gq0f8q750kw344lbv9nk1-libX11-1.8.9/lib'':'* ]]; then
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH'/nix/store/x9fw7rbdb34gq0f8q750kw344lbv9nk1-libX11-1.8.9/lib'
fi
LD_LIBRARY_PATH=${LD_LIBRARY_PATH#':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%':'}
export LD_LIBRARY_PATH
export DOTNET_ROOT='/nix/store/wzpmhmjxv1rvh8z8zlliga2yql1y5ax8-dotnet-runtime-8.0.6'
PATH=${PATH:+':'$PATH':'}
PATH=${PATH/':''/nix/store/wzpmhmjxv1rvh8z8zlliga2yql1y5ax8-dotnet-runtime-8.0.6/bin'':'/':'}
PATH='/nix/store/wzpmhmjxv1rvh8z8zlliga2yql1y5ax8-dotnet-runtime-8.0.6/bin'$PATH
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
PATH=${PATH/':''/nix/store/rmk31w7i6ijps82v2zdy6jp2hpqz65x4-desktop-file-utils-0.27/bin'':'/':'}
PATH='/nix/store/rmk31w7i6ijps82v2zdy6jp2hpqz65x4-desktop-file-utils-0.27/bin'$PATH
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
export APPIMAGE='/nix/store/b711v6aacyapswz16dn1bq0pq168dkg9-nexusmods-app-0.5.1/bin/NexusMods.App'
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+':'$LD_LIBRARY_PATH':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH/':''/nix/store/lvq4hib247ayxib31hp7gryx444m1l3a-icu4c-73.2/lib'':'/':'}
LD_LIBRARY_PATH='/nix/store/lvq4hib247ayxib31hp7gryx444m1l3a-icu4c-73.2/lib'$LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH#':'}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%':'}
export LD_LIBRARY_PATH
exec "/nix/store/b711v6aacyapswz16dn1bq0pq168dkg9-nexusmods-app-0.5.1/lib/nexusmods-app/NexusMods.App"  "$@"

This can happen with funky build outputs and broken runtime paths. I'd suggest checking the output directory and see if NexusMods.App.deps.json exists and is valid.

I don't think we propagate any data files (other than the .desktop files). I'm not familiar with dotnet, but I think nixpkgs' dotnet toolchain is setup to not need manifests like that at runtime - everything should get baked into the wrapper script.

@erri120
Copy link

erri120 commented Jun 12, 2024

Is that DLL part of dotnet-runtime-8.0.6 or are we missing a dependency?

Microsoft.Extensions.DependencyInjection is just a normal NuGet package published by Microsoft.

@erri120
Copy link

erri120 commented Jun 12, 2024

I'm guessing you're running into a dependency issue. We don't directly reference Microsoft.Extensions.DependencyInjection. Instead we reference both Microsoft.Extensions.DependencyInjection.Abstraction and Microsoft.Extensions.Hosting. As such, Microsoft.Extensions.DependencyInjection is a transient dependency, and with enough version fuckery, this might be the problem.

Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still able to run nix run .#nexusmods-app -- associate-nxm with this patch:

Details

diff --git a/pkgs/by-name/ne/nexusmods-app/package.nix b/pkgs/by-name/ne/nexusmods-app/package.nix
index e5a688a33b4a..5162cc9d396a 100644
--- a/pkgs/by-name/ne/nexusmods-app/package.nix
+++ b/pkgs/by-name/ne/nexusmods-app/package.nix
@@ -49,13 +49,13 @@ buildDotnetModule rec {
   ];
 
   makeWrapperArgs = [
-    "--prefix PATH : ${lib.makeBinPath [ desktop-file-utils ]}"
     "--set APPIMAGE $out/bin/${meta.mainProgram}" # Make associating with nxm links work on Linux
   ];
 
   propagatedBuildInputs = [ (_7zz.override { inherit enableUnfree; }) ];
 
   runtimeDeps = [
+    desktop-file-utils
     fontconfig
     libICE
     libSM

pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ne/nexusmods-app/package.nix Show resolved Hide resolved
@l0b0 l0b0 force-pushed the nexusmods-app-update branch from 181307e to 50e3047 Compare June 20, 2024 23:35
Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As-per #318647 (comment), this fixes the build.

pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ne/nexusmods-app/package.nix Outdated Show resolved Hide resolved
Also:

- Don't include upstream's 7zz binary
- Tell the app it is a distro package
- Document more of the build configuration
- Format using nixfmt-rfc-style

Closes NixOS#317852.

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Co-authored-by: GGG <gggkiller2@gmail.com>
@l0b0 l0b0 force-pushed the nexusmods-app-update branch from bd88aa6 to 8e951c2 Compare June 20, 2024 23:45
@l0b0
Copy link
Contributor Author

l0b0 commented Jun 20, 2024

How's this? I tried applying all the changes from the discussion above. ./result/bin/NexusMods.App terminates immediately with exit code 0 on my machine. Also:

❯ nix run .#nexusmods-app -- associate-nxm
gio: file:///home/victor/my%20projects/nixpkgs/$out/bin/NexusMods.App: Error when getting information for file “/home/victor/my projects/nixpkgs/$out/bin/NexusMods.App”: No such file or directory

@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jun 20, 2024

Also, I can't find any .desktop files in result, even if I add

How's this? I tried applying all the changes from the discussion above.

Diff looks good. How's it run on your end?

I still have two issues outstanding:

Desktop files don't seem to be installed

I don't mean the nxm mimetype association done at runtime, rather the ones templated at build time.

I assume I should be able to find these in result/share after running nix build .#nexusmods-app?

I think we need to do something in the install phase to copy "data" files over to xdg_data_home? How do other packages handle their desktop files, man pages, etc? I was under the impression copyDesktopItems was supposed to handle this for us.

I think this was already an issue with the 0.4.1 package.

I can't figure out how to launch the UI

nix run .#nexusmods-app -- --help works fine, and some other commands like nix run .#nexusmods-app -- associate-nxm.

However nix run .#nexusmods-app and nix run .#nexusmods-app -- as-main-ui both do nothing.

I suspect I am missing something or hitting an upstream bug?

@MattSturgeon
Copy link
Contributor

Also:

❯ nix run .#nexusmods-app -- associate-nxm
gio: file:///home/victor/my%20projects/nixpkgs/$out/bin/NexusMods.App: Error when getting information for file “/home/victor/my projects/nixpkgs/$out/bin/NexusMods.App”: No such file or directory

Huh, associate-nxm worked fine for me. I wonder if something from my system env is affecting this? 🤔

@MattSturgeon
Copy link
Contributor

./result/bin/NexusMods.App terminates immediately with exit code 0 on my machine

I can't figure out how to launch the UI

nix run .#nexusmods-app -- --help works fine, and some other commands like nix run .#nexusmods-app -- associate-nxm.

However nix run .#nexusmods-app and nix run .#nexusmods-app -- as-main-ui both do nothing.

I suspect I am missing something or hitting an upstream bug?

I wonder if Nexus-Mods/NexusMods.App#1345 or some other upstream issue/pr is related?

@GGG-KILLER
Copy link
Contributor

GGG-KILLER commented Jun 21, 2024

Desktop files don't seem to be installed

I don't mean the nxm mimetype association done at runtime, rather the ones templated at build time.

I assume I should be able to find these in result/share after running nix build .#nexusmods-app?

buildDotnetModule doesn't do anything special with respect to those, it'd have to be something in the nexus app csproj itself that generates the .desktop files for other tools to find it.

I can't figure out how to launch the UI

nix run .#nexusmods-app -- --help works fine, and some other commands like nix run .#nexusmods-app -- associate-nxm.

However nix run .#nexusmods-app and nix run .#nexusmods-app -- as-main-ui both do nothing.

I suspect I am missing something or hitting an upstream bug?

It could be that our build command is still different from the one that is run on upstream, if they have verbose build logs it'd be good to check the actual command being ran and compare to ours

@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jun 21, 2024

It could be that our build command is still different from the one that is run on upstream, if they have verbose build logs it'd be good to check the actual command being ran and compare to ours

This workflow run was for the 0.5.2 release. That workflow ran build-archive andbuild-appimage jobs. The former ran the following dotnet publish command:

dotnet publish "/home/runner/work/NexusMods.App/NexusMods.App/src/NexusMods.App" \
  -r linux-x64 \
  "-p:DefineConstants=INSTALLATION_METHOD_ARCHIVE" \
  -p:Version=0.5.2 \
  --self-contained true \
  -c Release \
  -p:TieredCompilation=true \
  -p:PublishReadyToRun=true \
  -p:PublishSingleFile=true \
  -o "/tmp/KuiperZone.PupNet/com.nexusmods.app-linux-x64-Release-Zip/AppDir/Publish"

I don't think the logs are verbose enough for us, though.

@GGG-KILLER
Copy link
Contributor

GGG-KILLER commented Jun 21, 2024

I think I've figured out a few issues, I'm testing some things and will update if I find anything.

One of the issues is that INSTALLATION_METHOD_PACKAGE_MANAGER and NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR are being set incorrectly, they should be set using --property:DefineConstants=INSTALLATION_METHOD_PACKAGE_MANAGER,NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR.
I'm gonna try to make the build process more similar to the ones in the GHA logs.

Correction: INSTALLATION_METHOD_PACKAGE_MANAGER needs to be set using DefineConstants, NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR seems to be an env var??? I'll leave it on --property for now and see if it works.

@GGG-KILLER
Copy link
Contributor

Also @MattSturgeon, the .desktop file is generated by their packing tool (PupNet), so we'd have to emulate the .desktop file creation on our side to have it.

@MattSturgeon
Copy link
Contributor

I think I've figured out a few issues, I'm testing some things and will update if I find anything.

Thanks for continuing to look into this. Both myself and @l0b0 have limited dotnet experience, so this is very helpful!

NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR seems to be an env var??? I'll leave it on --property for now and see if it works.

Based on how it's declared (and documented) in this file I'm pretty sure it is a build prop not an env var.

Also, the .desktop file is generated by their packing tool (PupNet), so we'd have to emulate the .desktop file creation on our side to have it.

Good to know. Based on Nexus-Mods/NexusMods.App#1669, Nexus-Mods/NexusMods.App#1668 and similar issues, upstream seem keen to streamline the packaging process. I wonder if they'd be willing to move desktop files into the "main" build process?

@GGG-KILLER
Copy link
Contributor

GGG-KILLER commented Jun 21, 2024

Ok, I've managed to make some progress, although I don't know how this happened exactly 😅

image

It seems like the APPIMAGE that is being set through the makeWrapper isn't reading $out correctly.

@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jun 21, 2024

although I don't know how this happened exactly 😅

Same error as #318647 (comment) but in a GUI dialog.

I also get that error on my fully-nixos machine, though a opensuse machine (with nix installed) didn't have the error.

@GGG-KILLER
Copy link
Contributor

For now the changes I've made are the following:

diff --git a/pkgs/by-name/ne/nexusmods-app/package.nix b/pkgs/by-name/ne/nexusmods-app/package.nix
index 5162cc9d396a..ddf9cb63920f 100644
--- a/pkgs/by-name/ne/nexusmods-app/package.nix
+++ b/pkgs/by-name/ne/nexusmods-app/package.nix
@@ -38,7 +38,7 @@ buildDotnetModule rec {
 
   dotnetBuildFlags = [
     # Tell the app it is a distro package; affects wording in update prompts
-    "--property:INSTALLATION_METHOD_PACKAGE_MANAGER=1"
+    "--property:DefineConstants=INSTALLATION_METHOD_PACKAGE_MANAGER"
 
     # Don't include upstream's 7zz binary; we use the nixpkgs version
     "--property:NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR=1"
@@ -49,7 +49,7 @@ buildDotnetModule rec {
   ];
 
   makeWrapperArgs = [
-    "--set APPIMAGE $out/bin/${meta.mainProgram}" # Make associating with nxm links work on Linux
+    "--set APPIMAGE ${placeholder "out"}/bin/${meta.mainProgram}" # Make associating with nxm links work on Linux
   ];
 
   propagatedBuildInputs = [ (_7zz.override { inherit enableUnfree; }) ];

still trying to get the UI to work but unable to.

@erri120
Copy link

erri120 commented Jun 21, 2024

Good to know. Based on Nexus-Mods/NexusMods.App#1669, Nexus-Mods/NexusMods.App#1668 and similar issues, upstream seem keen to streamline the packaging process. I wonder if they'd be willing to move desktop files into the "main" build process?

What would be the easiest for you? I was thinking about having a nexusmods-app.desktop and nexusmods-app-nxm.desktop file inside the repo itself, containing everything except the Path value. Example:

[Desktop Entry]
Name=NexusMods.App NXM Handler
Terminal=false
Type=Application
Exec=NexusMods.App protocol-invoke --url %u
NoDisplay=true
MimeType=x-scheme-handler/nxm

Exec and either be a full path or just the file name. We can't use a static full path, and if you just have a file name, then the executable has to be inside $PATH, as detailed by the specs.

@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jun 21, 2024

What would be the easiest for you? I was thinking about having a nexusmods-app.desktop and nexusmods-app-nxm.desktop file inside the repo itself, containing everything except the Path value.

I think that'd probably work for us.

IDK about other distros, but for our purposes it should be fine to just have templates we can modify with sed.

We'd probably do something like this:

# Nix's string interpolation will replace ${lib.getExe nexusmods-app} with something like
# /nix/store/zcpv3243hwcyg9q8dv2h84sbivfxnq42-nexusmods-app-0.5.2/bin/NexusMods.App
sed -e 's/^Exec=[^ ]\+/Exec=${lib.getExe nexusmods-app}/'

Exec could either be a full path or just the file name. We can't use a static full path, and if you just have a file name, then the executable has to be inside $PATH, as detailed by the specs.

I think some distros like to specify an "install prefix" that build scripts should remove from any absolute paths, though it's been a while since I messed with other distro's packaging systems.

I think practically speaking, the binary would likely be on the PATH whenever a .desktop file is being used to run it, however I think we'd still rather inject the absolute nix-store path into the files to avoid any weird edge-cases.

Incidentally, the associate-nxm command seems to be doing what we'd expect (at least on systems where we don't get the gio error). It correctly uses the absolute path, meaning it'd still work if someone ran the app ephemerally (without installing persistently to PATH etc), at least until the build gets gc'd from the nix store.

I haven't fully thought through whether we'd prefer to use this runtime mimetype association or to install that statically at build time 🤔

};

projectFile = "NexusMods.App.sln";
projectFile = "src/NexusMods.App/NexusMods.App.csproj";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that making this change stops all the dotnet test tests from running. Perhaps this change can be removed once #327651 is in?

MattSturgeon added a commit to MattSturgeon/nixpkgs that referenced this pull request Aug 22, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update request: nexusmods-app 0.4.1 → 0.5.2
7 participants