mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-24 20:10:23 +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
|
os: ubuntu-latest
|
||||||
- target: x86_64-darwin
|
- target: x86_64-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
- target: aarch64-darwin
|
||||||
|
os: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -35,4 +37,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
nix run -L .#${{ matrix.target }} -- --version
|
nix run -L .#${{ matrix.target }} -- --version
|
||||||
ls result/bin -al
|
ls result/bin -al
|
||||||
|
ls result/share -al
|
||||||
ls result/share/applications -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; } {
|
mkPackage' { inherit pkgs; system = buildSystem; } {
|
||||||
name = "himalaya";
|
name = "himalaya";
|
||||||
src = gitignoreSource ./.;
|
src = gitignoreSource ./.;
|
||||||
overrideMain = _: {
|
strictDeps = true;
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
auditable = false;
|
auditable = false;
|
||||||
strictDeps = true;
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||||
CARGO_BUILD_TARGET = targetConfig.rustTarget;
|
CARGO_BUILD_TARGET = targetConfig.rustTarget;
|
||||||
CARGO_BUILD_RUSTFLAGS = staticRustFlags;
|
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:
|
buildPackage = targetSystem: targetConfig:
|
||||||
|
|
Loading…
Reference in a new issue