build-idris-package: includePreludeBase -> noPrelude, noBase
Resembles idris --noprelude and --nobasepkgs arguments
This commit is contained in:
parent
ef0073410d
commit
5f620d0e22
@ -10,7 +10,8 @@ build-idris-package {
|
|||||||
inherit name version;
|
inherit name version;
|
||||||
inherit (idris) src;
|
inherit (idris) src;
|
||||||
|
|
||||||
includePreludeBase = false;
|
noPrelude = true;
|
||||||
|
noBase = true;
|
||||||
|
|
||||||
idrisDeps = deps;
|
idrisDeps = deps;
|
||||||
|
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
# Build an idris package
|
# Build an idris package
|
||||||
{ stdenv, lib, idrisPackages, gmp }:
|
{ stdenv, lib, idrisPackages, gmp }:
|
||||||
{ idrisDeps ? []
|
{ idrisDeps ? []
|
||||||
, includePreludeBase ? true
|
, noPrelude ? false
|
||||||
|
, noBase ? false
|
||||||
, name
|
, name
|
||||||
, version
|
, version
|
||||||
, extraBuildInputs ? []
|
, extraBuildInputs ? []
|
||||||
, ...
|
, ...
|
||||||
}@attrs:
|
}@attrs:
|
||||||
let
|
let
|
||||||
idrisDeps' = idrisDeps ++ lib.optionals includePreludeBase (with idrisPackages; [ prelude base ]);
|
allIdrisDeps = idrisDeps
|
||||||
idris-with-packages = idrisPackages.with-packages idrisDeps';
|
++ lib.optional (!noPrelude) idrisPackages.prelude
|
||||||
|
++ lib.optional (!noBase) idrisPackages.base;
|
||||||
|
idris-with-packages = idrisPackages.with-packages allIdrisDeps;
|
||||||
newAttrs = builtins.removeAttrs attrs [ "idrisDeps" "extraBuildInputs" "name" "version" ] // {
|
newAttrs = builtins.removeAttrs attrs [ "idrisDeps" "extraBuildInputs" "name" "version" ] // {
|
||||||
meta = attrs.meta // {
|
meta = attrs.meta // {
|
||||||
platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms;
|
platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms;
|
||||||
@ -20,7 +23,7 @@ stdenv.mkDerivation ({
|
|||||||
name = "${name}-${version}";
|
name = "${name}-${version}";
|
||||||
|
|
||||||
buildInputs = [ idris-with-packages gmp ] ++ extraBuildInputs;
|
buildInputs = [ idris-with-packages gmp ] ++ extraBuildInputs;
|
||||||
propagatedBuildInputs = idrisDeps';
|
propagatedBuildInputs = allIdrisDeps;
|
||||||
|
|
||||||
# Some packages use the style
|
# Some packages use the style
|
||||||
# opts = -i ../../path/to/package
|
# opts = -i ../../path/to/package
|
||||||
|
Loading…
Reference in New Issue
Block a user