mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-21 18:40:19 +00:00
fix post install
This commit is contained in:
parent
4590348bf2
commit
5003abe1e1
2 changed files with 27 additions and 19 deletions
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
@ -18,6 +18,8 @@ jobs:
|
|||
os: ubuntu-latest
|
||||
- target: x86_64-darwin
|
||||
os: macos-latest
|
||||
- target: aarch64-darwin
|
||||
os: macos-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
@ -35,4 +37,7 @@ jobs:
|
|||
run: |
|
||||
nix run -L .#${{ matrix.target }} -- --version
|
||||
ls result/bin -al
|
||||
ls result/share -al
|
||||
ls result/share/applications -al
|
||||
ls result/share/man -al
|
||||
ls result/share/completions -al
|
||||
|
|
41
flake.nix
41
flake.nix
|
@ -163,29 +163,32 @@
|
|||
mkPackage' { inherit pkgs; system = buildSystem; } {
|
||||
name = "himalaya";
|
||||
src = gitignoreSource ./.;
|
||||
overrideMain = _: {
|
||||
postInstall = ''
|
||||
export WINEPREFIX="$(mktemp -d)"
|
||||
mkdir -p $out/share/applications/
|
||||
cp assets/himalaya.desktop $out/share/applications/
|
||||
cd $out/bin
|
||||
mkdir -p {man,completions}
|
||||
${runner} man ./man
|
||||
${runner} completion bash > ./completions/himalaya.bash
|
||||
${runner} completion elvish > ./completions/himalaya.elvish
|
||||
${runner} completion fish > ./completions/himalaya.fish
|
||||
${runner} completion powershell > ./completions/himalaya.powershell
|
||||
${runner} completion zsh > ./completions/himalaya.zsh
|
||||
tar -czf himalaya.tgz himalaya* man completions
|
||||
${pkgs.zip}/bin/zip -r himalaya.zip himalaya* man completions
|
||||
'';
|
||||
};
|
||||
strictDeps = true;
|
||||
doCheck = false;
|
||||
auditable = false;
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
CARGO_BUILD_TARGET = targetConfig.rustTarget;
|
||||
CARGO_BUILD_RUSTFLAGS = staticRustFlags;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
postInstall = ''
|
||||
export WINEPREFIX="$(mktemp -d)"
|
||||
|
||||
mkdir -p $out/bin/share/{applications,completions,man,services}
|
||||
cp assets/himalaya.desktop $out/bin/share/applications/
|
||||
cp assets/himalaya-watch@.service $out/bin/share/services/
|
||||
|
||||
cd $out/bin
|
||||
${runner} man ./share/man
|
||||
${runner} completion bash > ./share/completions/himalaya.bash
|
||||
${runner} completion elvish > ./share/completions/himalaya.elvish
|
||||
${runner} completion fish > ./share/completions/himalaya.fish
|
||||
${runner} completion powershell > ./share/completions/himalaya.powershell
|
||||
${runner} completion zsh > ./share/completions/himalaya.zsh
|
||||
tar -czf himalaya.tgz himalaya* share
|
||||
${pkgs.zip}/bin/zip -r himalaya.zip himalaya* share
|
||||
|
||||
mv share ../
|
||||
mv himalaya.tgz himalaya.zip ../
|
||||
'';
|
||||
};
|
||||
|
||||
buildPackage = targetSystem: targetConfig:
|
||||
|
|
Loading…
Reference in a new issue