mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
try to fix windows wine
This commit is contained in:
+4
-2
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) binutils gnutar lib mktemp stdenv zip;
|
||||
inherit (pkgs) binutils gnutar lib mktemp stdenv wine zip;
|
||||
inherit (crossPkgs) buildPlatform hostPlatform;
|
||||
|
||||
mkToolchain = import ./rust-toolchain.nix { inherit lib fenix; };
|
||||
@@ -54,8 +54,10 @@ himalaya.overrideAttrs (drv: {
|
||||
propagatedBuildInputs = (drv.propagatedBuildInputs or [ ])
|
||||
++ lib.optional hostPlatform.isWindows empty-libgcc_eh;
|
||||
|
||||
# NOTE: manual wineprefix update is somehow needed:
|
||||
# <https://github.com/NixOS/nixpkgs/issues/321332>
|
||||
postInstall = (drv.postInstall or "") + lib.optionalString hostPlatform.isWindows ''
|
||||
export WINEPREFIX="$(${lib.getExe' mktemp "mktemp"} -d)"
|
||||
${lib.getExe' wine "wineboot"} -u
|
||||
'' + ''
|
||||
mkdir -p $out/bin/share/{applications,completions,man,services}
|
||||
cp assets/himalaya.desktop $out/bin/share/applications/
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
];
|
||||
};
|
||||
|
||||
withGitEnvs = package: package.overrideAttrs (drv: {
|
||||
GIT_REV = drv.GIT_REV or self.rev or self.dirtyRev or "unknown";
|
||||
GIT_DESCRIBE = drv.GIT_DESCRIBE or "nix-flake-" + self.lastModifiedDate;
|
||||
});
|
||||
|
||||
# Dev shells
|
||||
|
||||
mkDevShell = system: {
|
||||
@@ -52,11 +57,6 @@
|
||||
}));
|
||||
};
|
||||
|
||||
withGitEnvs = package: package.overrideAttrs (drv: {
|
||||
GIT_REV = drv.GIT_REV or self.rev or self.dirtyRev or "dirty";
|
||||
GIT_DESCRIBE = drv.GIT_DESCRIBE or "flake-" + self.shortRev or self.dirtyShortRev or "dirty";
|
||||
});
|
||||
|
||||
mkCrossPackages = system:
|
||||
lib.attrsets.mergeAttrsList (map (mkCrossPackage system) crossSystems.${system});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user