git.iko.soy/typeable/nixpkgs
on master help sign in
agda: Provide a `.env` like Haskell instead of `.extras`
commitc1f5748983ab0e71af4421030a40ac424e666b45 authorJohn Ericson <Ericson2314@Yahoo.com> dateSat 30 May 2015, 15:10 (12 years ago) parent52a6589
1 file changed+13−19
pkgs/build-support/agda/default.nix+13−19
pkgs/build-support/agda/default.nix+13−19
@@ -22,9 +22,6 @@ in
2222 propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
2323 propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
2424 everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
25−
26− passthru = { inherit (x) extras; };
27− extras = null;
2825 };
2926
3027 defaults = self : {
@@ -81,22 +78,19 @@ in
8178 runHook postInstall
8279 '';
8380
84− # Optionally-built conveniences
85− extras = {
86− # Makes a wrapper available to the user. Very useful in
87− # nix-shell where all dependencies are -i'd.
88− agdaWrapper = writeScriptBin "agda" ''
89− ${self.agdaWithArgs} "$@"
90− '';
91−
92− # Use this to stick `agdaWrapper` at the front of the PATH:
93− #
94− # agda.mkDerivation (self: { PATH = self.extras.agdaWrapperPATH; })
95− #
96− # Not sure this is the best way to handle conflicts....
97− agdaWrapperPATH = "${self.extras.agdaWrapper}/bin:$PATH";
98−
99− AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDependsAgdaShareAgda;
81+ passthru = {
82+ env = stdenv.mkDerivation {
83+ name = "interactive-${self.name}";
84+ inherit (self) LANG LOCALE_ARCHIVE;
85+ AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDependsAgdaShareAgda;
86+ buildInputs = let
87+ # Makes a wrapper available to the user. Very useful in
88+ # nix-shell where all dependencies are -i'd.
89+ agdaWrapper = writeScriptBin "agda" ''
90+ ${self.agdaWithArgs} "$@"
91+ '';
92+ in [agdaWrapper] ++ self.buildDepends;
93+ };
10094 };
10195 };
10296 in stdenv.mkDerivation