-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nexusmods-app: 0.4.1 -> 0.5.2 #318647
Conversation
6a88ec9
to
ccb781e
Compare
d7324a5
to
d89e1d1
Compare
I cant build ( |
1008eb7
to
629f6b8
Compare
There was a problem hiding this 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?
Thank you for the help!
That would be great! I was about to ask 😁
You have contributed to this PR, but it's probably easiest to add yourself in a separate PR. |
629f6b8
to
d69cbaf
Compare
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 |
cd73659
to
ff49220
Compare
c95a5c0
to
7fb2db9
Compare
7fb2db9
to
3e9797d
Compare
I get the same error with
Is that DLL part of If we're not missing anything, it should be on the 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" "$@"
I don't think we propagate any data files (other than the |
|
I'm guessing you're running into a dependency issue. We don't directly reference |
There was a problem hiding this 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
181307e
to
50e3047
Compare
There was a problem hiding this 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.
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>
bd88aa6
to
8e951c2
Compare
How's this? I tried applying all the changes from the discussion above.
|
Also, I can't find any .desktop files in
Diff looks good. How's it run on your end? I still have two issues outstanding: Desktop files don't seem to be installedI 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 I think we need to do something in the install phase to copy "data" files over to I think this was already an issue with the 0.4.1 package. I can't figure out how to launch the UI
However I suspect I am missing something or hitting an upstream bug? |
Huh, |
I wonder if Nexus-Mods/NexusMods.App#1345 or some other upstream issue/pr is related? |
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
I don't think the logs are verbose enough for us, though. |
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 Correction: |
Also @MattSturgeon, the |
Thanks for continuing to look into this. Both myself and @l0b0 have limited dotnet experience, so this is very helpful!
Based on how it's declared (and documented) in this file I'm pretty sure it is a build prop not an env var.
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? |
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. |
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. |
What would be the easiest for you? I was thinking about having a
|
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 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}/'
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 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"; |
There was a problem hiding this comment.
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?
Description of changes
Release notes
Commits
Closes #317852.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.