mirror of
https://github.com/soywod/himalaya.git
synced 2025-04-19 15:53:39 +00:00
adjust postInstall hook
This commit is contained in:
parent
cb077131b2
commit
b6a062d8bd
2 changed files with 8 additions and 12 deletions
|
@ -34,6 +34,8 @@ let
|
|||
stdenv = crossPkgs.stdenv;
|
||||
apple-sdk = if hostPlatform.isx86_64 then crossPkgs.apple-sdk_13 else crossPkgs.apple-sdk_14;
|
||||
installShellFiles = crossPkgs.installShellFiles;
|
||||
installShellCompletions = false;
|
||||
installManPages = false;
|
||||
notmuch = crossPkgs.notmuch;
|
||||
gpgme = crossPkgs.gpgme;
|
||||
pkg-config = crossPkgs.pkg-config;
|
||||
|
@ -48,8 +50,6 @@ himalaya.overrideAttrs (drv: {
|
|||
propagatedBuildInputs = (drv.propagatedBuildInputs or [ ])
|
||||
++ lib.optional hostPlatform.isWindows empty-libgcc_eh;
|
||||
|
||||
postInstall = null;
|
||||
|
||||
src = crossPkgs.nix-gitignore.gitignoreSource [ ] ./.;
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
|
|
16
package.nix
16
package.nix
|
@ -42,23 +42,19 @@ rustPlatform.buildRustPackage rec {
|
|||
# unit tests only
|
||||
cargoTestFlags = [ "--lib" ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/applications
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/{applications,completions,man}
|
||||
cp assets/himalaya.desktop "$out"/share/applications/
|
||||
'' + lib.optionalString installManPages ''
|
||||
mkdir -p "$out"/share/man
|
||||
'' + lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform ''
|
||||
"$out"/bin/himalaya man "$out"/share/man
|
||||
'' + lib.optionalString installShellCompletions ''
|
||||
mkdir -p "$out"/share/completions
|
||||
'' + lib.optionalString installManPages ''
|
||||
installManPage "$out"/share/man/*
|
||||
'' + lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform ''
|
||||
"$out"/bin/himalaya completion bash > "$out"/share/completions/himalaya.bash
|
||||
"$out"/bin/himalaya completion elvish > "$out"/share/completions/himalaya.elvish
|
||||
"$out"/bin/himalaya completion fish > "$out"/share/completions/himalaya.fish
|
||||
"$out"/bin/himalaya completion powershell > "$out"/share/completions/himalaya.powershell
|
||||
"$out"/bin/himalaya completion zsh > "$out"/share/completions/himalaya.zsh
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString installManPages ''
|
||||
installManPage "$out"/share/man/*
|
||||
'' + lib.optionalString installShellCompletions ''
|
||||
installShellCompletion "$out"/share/completions/himalaya.{bash,fish,zsh}
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue