mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
build-support/agda: expose mkLibraryFile
This commit is contained in:
parent
00d80d1381
commit
4ef7bf78bb
|
@ -19,14 +19,17 @@ let
|
|||
optionalString
|
||||
;
|
||||
|
||||
mkLibraryFile = pkgs: let
|
||||
pkgs' = if isList pkgs then pkgs else pkgs self;
|
||||
in writeText "libraries" ''
|
||||
${(concatMapStringsSep "\n" (p: "${p}/${p.libraryFile}") pkgs')}
|
||||
'';
|
||||
|
||||
withPackages' = {
|
||||
pkgs,
|
||||
ghc ? ghcWithPackages (p: with p; [ ieee754 ])
|
||||
}: let
|
||||
pkgs' = if isList pkgs then pkgs else pkgs self;
|
||||
library-file = writeText "libraries" ''
|
||||
${(concatMapStringsSep "\n" (p: "${p}/${p.libraryFile}") pkgs')}
|
||||
'';
|
||||
library-file = mkLibraryFile pkgs;
|
||||
pname = "agdaWithPackages";
|
||||
version = Agda.version;
|
||||
in runCommand "${pname}-${version}" {
|
||||
|
@ -118,5 +121,5 @@ in
|
|||
{
|
||||
mkDerivation = args: stdenv.mkDerivation (args // defaults args);
|
||||
|
||||
inherit withPackages withPackages';
|
||||
inherit mkLibraryFile withPackages withPackages';
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ let
|
|||
inherit (callPackage ../build-support/agda {
|
||||
inherit Agda self;
|
||||
inherit (pkgs.haskellPackages) ghcWithPackages;
|
||||
}) withPackages mkDerivation;
|
||||
}) withPackages mkLibraryFile mkDerivation;
|
||||
in {
|
||||
inherit mkDerivation;
|
||||
inherit mkLibraryFile mkDerivation;
|
||||
|
||||
lib = lib.extend (final: prev: import ../build-support/agda/lib.nix { lib = prev; });
|
||||
|
||||
|
|
Loading…
Reference in a new issue