about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@disroot.org>2022-04-21 18:58:31 +0300
committerNikolay Korotkiy <sikmir@disroot.org>2022-04-23 10:08:22 +0300
commit15427feaeb182675adaada5e8af21a24ef80d292 (patch)
treeba12dae4a50a7a4caef335bc6d60e4cfd89444ad
parentda727b72c93b358edc9b80d66971af7fef6ab3d4 (diff)
oksh: fix cross-compilation
-rw-r--r--pkgs/shells/oksh/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/shells/oksh/default.nix b/pkgs/shells/oksh/default.nix
index 9ea851adbbf6a..418a453d9e9a7 100644
--- a/pkgs/shells/oksh/default.nix
+++ b/pkgs/shells/oksh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub }:
+{ stdenv, lib, fetchFromGitHub, buildPackages }:
 
 stdenv.mkDerivation rec {
   pname = "oksh";
@@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-076nD0aPps6n5qkR3LQJ6Kn2g3mkov+/M0qSvxNLZ6o=";
   };
 
+  postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    substituteInPlace configure --replace "./conftest" "echo"
+  '';
+
+  configureFlags = [ "--no-strip" ];
+
   meta = with lib; {
     description = "Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)";
     homepage = "https://github.com/ibara/oksh";