From 80e0b54a265d8c02f12023c16992b27b49ca8b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sun, 24 Nov 2024 01:25:00 +0100 Subject: [PATCH] Revert "fix binary ext in derivation alt" This reverts commit af1cd2b8958122f91dfb1603965392ca2a085a8b. --- default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/default.nix b/default.nix index 47d94f37..d82be7f9 100644 --- a/default.nix +++ b/default.nix @@ -22,6 +22,10 @@ let cargo = rustToolchain; }; + himalayaExe = + let ext = lib.optionalString hostPlatform.isWindows ".exe"; + in "${hostPlatform.emulator pkgs.buildPackages} ./himalaya${ext}"; + himalaya = import ./package.nix { inherit lib hostPlatform rustPlatform; fetchFromGitHub = pkgs.fetchFromGitHub; @@ -33,6 +37,7 @@ let notmuch = pkgs.notmuch; gpgme = pkgs.gpgme; }; + in himalaya.overrideAttrs (drv: { @@ -46,12 +51,12 @@ himalaya.overrideAttrs (drv: { cp assets/himalaya-watch@.service $out/bin/share/services/ cd $out/bin - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya man ./share/man - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya completion bash > ./share/completions/himalaya.bash - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya completion elvish > ./share/completions/himalaya.elvish - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya completion fish > ./share/completions/himalaya.fish - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya completion powershell > ./share/completions/himalaya.powershell - ${hostPlatform.emulator pkgs.buildPackages} ./himalaya completion zsh > ./share/completions/himalaya.zsh + ${himalayaExe} man ./share/man + ${himalayaExe} completion bash > ./share/completions/himalaya.bash + ${himalayaExe} completion elvish > ./share/completions/himalaya.elvish + ${himalayaExe} completion fish > ./share/completions/himalaya.fish + ${himalayaExe} completion powershell > ./share/completions/himalaya.powershell + ${himalayaExe} completion zsh > ./share/completions/himalaya.zsh ${lib.getExe pkgs.buildPackages.gnutar} -czf himalaya.tgz himalaya* share mv himalaya.tgz ../