agda: Provide a `.env` like Haskell instead of `.extras`
This commit is contained in:
parent
52a6589559
commit
c1f5748983
|
@ -22,9 +22,6 @@ in
|
||||||
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
|
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
|
||||||
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
|
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
|
||||||
everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
|
everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
|
||||||
|
|
||||||
passthru = { inherit (x) extras; };
|
|
||||||
extras = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = self : {
|
defaults = self : {
|
||||||
|
@ -81,22 +78,19 @@ in
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Optionally-built conveniences
|
passthru = {
|
||||||
extras = {
|
env = stdenv.mkDerivation {
|
||||||
|
name = "interactive-${self.name}";
|
||||||
|
inherit (self) LANG LOCALE_ARCHIVE;
|
||||||
|
AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDependsAgdaShareAgda;
|
||||||
|
buildInputs = let
|
||||||
# Makes a wrapper available to the user. Very useful in
|
# Makes a wrapper available to the user. Very useful in
|
||||||
# nix-shell where all dependencies are -i'd.
|
# nix-shell where all dependencies are -i'd.
|
||||||
agdaWrapper = writeScriptBin "agda" ''
|
agdaWrapper = writeScriptBin "agda" ''
|
||||||
${self.agdaWithArgs} "$@"
|
${self.agdaWithArgs} "$@"
|
||||||
'';
|
'';
|
||||||
|
in [agdaWrapper] ++ self.buildDepends;
|
||||||
# Use this to stick `agdaWrapper` at the front of the PATH:
|
};
|
||||||
#
|
|
||||||
# agda.mkDerivation (self: { PATH = self.extras.agdaWrapperPATH; })
|
|
||||||
#
|
|
||||||
# Not sure this is the best way to handle conflicts....
|
|
||||||
agdaWrapperPATH = "${self.extras.agdaWrapper}/bin:$PATH";
|
|
||||||
|
|
||||||
AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDependsAgdaShareAgda;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in stdenv.mkDerivation
|
in stdenv.mkDerivation
|
||||||
|
|
Loading…
Reference in New Issue