Skip to content

Commit

Permalink
nexusmods-app: define new constants
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Aug 21, 2024
1 parent 76765f7 commit 74b8ede
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkgs/by-name/ne/nexusmods-app/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ buildDotnetModule rec {
'';

postPatch = ''
# We still need this for the tests, even though we build with NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR
# See https://github.com/Nexus-Mods/NexusMods.App/issues/1836
ln --force --symbolic "${lib.getExe _7zz}" src/ArchiveManagement/NexusMods.FileExtractor/runtimes/linux-x64/native/7zz
# for some reason these tests fail (intermittently?) with a zero timestamp
Expand All @@ -60,6 +62,8 @@ buildDotnetModule rec {

buildInputs = [ desktop-file-utils ];

propagatedBuildInputs = [ _7zz ];

runtimeDeps = [
fontconfig
libICE
Expand All @@ -69,6 +73,25 @@ buildDotnetModule rec {

executables = [ meta.mainProgram ];

dotnetBuildFlags =
let
# From https://nexus-mods.github.io/NexusMods.App/developers/Contributing/#for-package-maintainers
# TODO: add DefineConstants support to buildDotnetModule
constants = [
# Tell the app it is a distro package; affects wording in update prompts
"INSTALLATION_METHOD_PACKAGE_MANAGER"

# Don't include upstream's 7zz binary; we use the nixpkgs version
"NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR"
];
in
[
# From https://github.com/Nexus-Mods/NexusMods.App/blob/v0.5.3/src/NexusMods.App/app.pupnet.conf#L38
"--property:Version=${version}"
"--property:TieredCompilation=true"
"--property:DefineConstants=${lib.strings.concatStringsSep "%3B" constants}"
];

doCheck = true;

dotnetTestFlags = [
Expand Down

0 comments on commit 74b8ede

Please sign in to comment.