mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-11 23:19:05 +03:00
nexusmods-app: refactor "unfree" variant
Use `override` to pass a `_7zz` with RAR support to the package, instead of having an `enableUnfree` package argument. Use a different `pname` on the unfree package. Use `_7zz.meta.unfree` internally.
This commit is contained in:
parent
e54e9fac95
commit
1148136d36
@ -12,13 +12,10 @@
|
||||
libX11,
|
||||
nexusmods-app,
|
||||
runCommand,
|
||||
enableUnfree ? false, # Set to true to support RAR format mods
|
||||
pname ? "nexusmods-app",
|
||||
}:
|
||||
let
|
||||
_7zzWithOptionalUnfreeRarSupport = _7zz.override { inherit enableUnfree; };
|
||||
in
|
||||
buildDotnetModule rec {
|
||||
pname = "nexusmods-app";
|
||||
inherit pname;
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -50,7 +47,7 @@ buildDotnetModule rec {
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
ln --force --symbolic "${lib.getExe _7zzWithOptionalUnfreeRarSupport}" src/ArchiveManagement/NexusMods.FileExtractor/runtimes/linux-x64/native/7zz
|
||||
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
|
||||
touch tests/NexusMods.UI.Tests/WorkspaceSystem/*.verified.png
|
||||
@ -84,7 +81,7 @@ buildDotnetModule rec {
|
||||
"FullyQualifiedName!=NexusMods.UI.Tests.ImageCacheTests.Test_LoadAndCache_RemoteImage"
|
||||
"FullyQualifiedName!=NexusMods.UI.Tests.ImageCacheTests.Test_LoadAndCache_ImageStoredFile"
|
||||
]
|
||||
++ lib.optionals (!enableUnfree) [
|
||||
++ lib.optionals (!_7zz.meta.unfree) [
|
||||
"FullyQualifiedName!=NexusMods.Games.FOMOD.Tests.FomodXmlInstallerTests.InstallsFilesSimple_UsingRar"
|
||||
]
|
||||
)
|
||||
|
@ -18792,8 +18792,9 @@ with pkgs;
|
||||
|
||||
nix-build-uncached = callPackage ../development/tools/misc/nix-build-uncached { };
|
||||
|
||||
nexusmods-app-unfree = callPackage ../by-name/ne/nexusmods-app/package.nix {
|
||||
enableUnfree = true;
|
||||
nexusmods-app-unfree = nexusmods-app.override {
|
||||
pname = "nexusmods-app-unfree";
|
||||
_7zz = _7zz-rar;
|
||||
};
|
||||
|
||||
nmrpflash = callPackage ../development/embedded/nmrpflash { };
|
||||
|
Loading…
Reference in New Issue
Block a user