From 0266996a8db7cc41c7951fda993fe8eb7c386695 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 8 Nov 2018 17:53:29 +0100 Subject: [PATCH 1/2] agda: use writeShellScriptbin instead of writeScriptBin This adds the shell shebang to the wrapper script. Without this, emacs and in particular agda2-mode (but probably other applications as well) return a format error when trying to execute agda. --- pkgs/build-support/agda/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 8a871cfeb51..356fd058cac 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -3,7 +3,7 @@ # Contact: stdenv.lib.maintainers.fuuzetsu { stdenv, Agda, glibcLocales -, writeScriptBin +, writeShellScriptBin , extension ? (self: super: {}) }: @@ -77,7 +77,7 @@ let buildInputs = let # Makes a wrapper available to the user. Very useful in # nix-shell where all dependencies are -i'd. - agdaWrapper = writeScriptBin "agda" '' + agdaWrapper = writeShellScriptBin "agda" '' ${self.agdaWithArgs} "$@" ''; in [agdaWrapper] ++ self.buildDepends; From 3b6de728362bb9047d19ca418a9ecd48b7e5f534 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 7 Dec 2018 21:37:19 -0500 Subject: [PATCH 2/2] agda: use exec in agdaWrapper --- pkgs/build-support/agda/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 356fd058cac..16fe748c3e5 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -78,7 +78,7 @@ let # Makes a wrapper available to the user. Very useful in # nix-shell where all dependencies are -i'd. agdaWrapper = writeShellScriptBin "agda" '' - ${self.agdaWithArgs} "$@" + exec ${self.agdaWithArgs} "$@" ''; in [agdaWrapper] ++ self.buildDepends; };