mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Conditionally create symlink to agda-mode if present
This commit is contained in:
parent
3c390383bc
commit
55ac814fa9
3 changed files with 9 additions and 1 deletions
|
|
@ -24,6 +24,10 @@ in
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
# agda and agda-mode are in path
|
||||
machine.succeed("agda --version")
|
||||
machine.succeed("agda-mode")
|
||||
|
||||
# Minimal script that typechecks
|
||||
machine.succeed("touch TestEmpty.agda")
|
||||
machine.succeed("agda TestEmpty.agda")
|
||||
|
|
|
|||
|
|
@ -47,8 +47,9 @@ in
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
# agda executable is not present
|
||||
# agda and agda-mode are not in path
|
||||
machine.fail("agda --version")
|
||||
machine.fail("agda-mode")
|
||||
# backend is present
|
||||
text = machine.succeed("${mainProgram} --help")
|
||||
assert "${mainProgram}" in text
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ let
|
|||
makeWrapper ${lib.getExe Agda} $out/bin/${Agda.meta.mainProgram} \
|
||||
${lib.optionalString (ghc != null) ''--add-flags "--with-compiler=${ghc}/bin/ghc"''} \
|
||||
--add-flags "--library-file=${libraryFile}"
|
||||
if [ -e ${lib.getExe' Agda "agda-mode"} ]; then
|
||||
ln -s ${lib.getExe' Agda "agda-mode"} $out/bin/agda-mode
|
||||
fi
|
||||
'';
|
||||
|
||||
withPackages = arg: if isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue