diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2015-05-30 15:10:30 +0000 |
---|---|---|
committer | John Ericson <Ericson2314@Yahoo.com> | 2015-05-30 15:10:30 +0000 |
commit | c1f5748983ab0e71af4421030a40ac424e666b45 (patch) | |
tree | 9164e4591d00bea465b30824cb95282eeb9e1f6f /pkgs/build-support/agda/default.nix | |
parent | 52a6589559ea424857b30b531f766c3c783b60a8 (diff) | |
download | nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar.gz nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar.bz2 nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar.lz nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar.xz nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.tar.zst nixpkgs-c1f5748983ab0e71af4421030a40ac424e666b45.zip |
agda: Provide a `.env` like Haskell instead of `.extras`
Diffstat (limited to 'pkgs/build-support/agda/default.nix')
-rw-r--r-- | pkgs/build-support/agda/default.nix | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 69c4897d1a4..a404bbcf634 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -22,9 +22,6 @@ in propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs; propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs; everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile; - - passthru = { inherit (x) extras; }; - extras = null; }; defaults = self : { @@ -81,22 +78,19 @@ in runHook postInstall ''; - # Optionally-built conveniences - extras = { - # Makes a wrapper available to the user. Very useful in - # nix-shell where all dependencies are -i'd. - agdaWrapper = writeScriptBin "agda" '' - ${self.agdaWithArgs} "$@" - ''; - - # 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; + passthru = { + 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 + # nix-shell where all dependencies are -i'd. + agdaWrapper = writeScriptBin "agda" '' + ${self.agdaWithArgs} "$@" + ''; + in [agdaWrapper] ++ self.buildDepends; + }; }; }; in stdenv.mkDerivation |