mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-18 22:17:54 +08:00
build(nix): fix windows build
This commit is contained in:
+14
-8
@@ -12,6 +12,7 @@ pimalaya.mkDefault (
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildPackages,
|
||||
rustPlatform,
|
||||
defaultFeatures,
|
||||
features,
|
||||
@@ -21,23 +22,28 @@ pimalaya.mkDefault (
|
||||
buildNoDefaultFeatures = !defaultFeatures;
|
||||
buildFeatures = lib.splitString "," features;
|
||||
})
|
||||
# HACK: needed until new derivation available on nixpkgs
|
||||
# HACK: needed until new derivation available on nixpkgs's
|
||||
# master branch
|
||||
.overrideAttrs
|
||||
{
|
||||
postInstall =
|
||||
let
|
||||
inherit (pkgs) stdenv buildPackages;
|
||||
inherit (pkgs) stdenv;
|
||||
emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||
exe = stdenv.hostPlatform.extensions.executable;
|
||||
in
|
||||
lib.optionalString (lib.hasInfix "wine" emulator) ''
|
||||
wineboot --init
|
||||
''
|
||||
+ ''
|
||||
mkdir -p $out/share/{applications,completions,man}
|
||||
cp assets/himalaya.desktop "$out"/share/applications/
|
||||
${emulator} "$out"/bin/himalaya man "$out"/share/man
|
||||
${emulator} "$out"/bin/himalaya completion bash > "$out"/share/completions/himalaya.bash
|
||||
${emulator} "$out"/bin/himalaya completion elvish > "$out"/share/completions/himalaya.elvish
|
||||
${emulator} "$out"/bin/himalaya completion fish > "$out"/share/completions/himalaya.fish
|
||||
${emulator} "$out"/bin/himalaya completion powershell > "$out"/share/completions/himalaya.powershell
|
||||
${emulator} "$out"/bin/himalaya completion zsh > "$out"/share/completions/himalaya.zsh
|
||||
${emulator} "$out"/bin/himalaya${exe} man "$out"/share/man
|
||||
${emulator} "$out"/bin/himalaya${exe} completion bash > "$out"/share/completions/himalaya.bash
|
||||
${emulator} "$out"/bin/himalaya${exe} completion elvish > "$out"/share/completions/himalaya.elvish
|
||||
${emulator} "$out"/bin/himalaya${exe} completion fish > "$out"/share/completions/himalaya.fish
|
||||
${emulator} "$out"/bin/himalaya${exe} completion powershell > "$out"/share/completions/himalaya.powershell
|
||||
${emulator} "$out"/bin/himalaya${exe} completion zsh > "$out"/share/completions/himalaya.zsh
|
||||
''
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installManPage "$out"/share/man/*
|
||||
|
||||
Generated
+6
-6
@@ -8,11 +8,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759301100,
|
||||
"narHash": "sha256-hmiTEoVAqLnn80UkreCNunnRKPucKvcg5T4/CELEtbw=",
|
||||
"lastModified": 1767250179,
|
||||
"narHash": "sha256-PnQdWvPZqHp+7yaHWDFX3NYSKaOy0fjkwpR+rIQC7AY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "0956bc5d1df2ea800010172c6bc4470d9a22cb81",
|
||||
"rev": "a3eaf682db8800962943a77ab77c0aae966f9825",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -41,11 +41,11 @@
|
||||
"pimalaya": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767900157,
|
||||
"narHash": "sha256-odSDfA4npCXhO/PimEbRe15KY+NPkCtTKLeiIBX1alc=",
|
||||
"lastModified": 1768259669,
|
||||
"narHash": "sha256-JAxHFfetosj3kXhVYsACdcNuZ/pzKrZgMMRrBGm8E/k=",
|
||||
"owner": "pimalaya",
|
||||
"repo": "nix",
|
||||
"rev": "a6ca8acb17d2dcd9312c53f8e07fb510769c28e1",
|
||||
"rev": "5c219b3ea00eac8b1a833d24d2ce61a801345c32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
Reference in New Issue
Block a user