From 5f620d0e221d09e9ea6da6bd46794f91c7db7e2d Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 3 Jul 2018 21:19:28 +0200 Subject: [PATCH] build-idris-package: includePreludeBase -> noPrelude, noBase Resembles idris --noprelude and --nobasepkgs arguments --- .../idris-modules/build-builtin-package.nix | 3 ++- .../development/idris-modules/build-idris-package.nix | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/idris-modules/build-builtin-package.nix b/pkgs/development/idris-modules/build-builtin-package.nix index a90bb8c11b63..1cd687058b3a 100644 --- a/pkgs/development/idris-modules/build-builtin-package.nix +++ b/pkgs/development/idris-modules/build-builtin-package.nix @@ -10,7 +10,8 @@ build-idris-package { inherit name version; inherit (idris) src; - includePreludeBase = false; + noPrelude = true; + noBase = true; idrisDeps = deps; diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix index 47e1e22c5db0..7168eb2c956f 100644 --- a/pkgs/development/idris-modules/build-idris-package.nix +++ b/pkgs/development/idris-modules/build-idris-package.nix @@ -1,15 +1,18 @@ # Build an idris package { stdenv, lib, idrisPackages, gmp }: { idrisDeps ? [] - , includePreludeBase ? true + , noPrelude ? false + , noBase ? false , name , version , extraBuildInputs ? [] , ... }@attrs: let - idrisDeps' = idrisDeps ++ lib.optionals includePreludeBase (with idrisPackages; [ prelude base ]); - idris-with-packages = idrisPackages.with-packages idrisDeps'; + allIdrisDeps = 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" ] // { meta = attrs.meta // { platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms; @@ -20,7 +23,7 @@ stdenv.mkDerivation ({ name = "${name}-${version}"; buildInputs = [ idris-with-packages gmp ] ++ extraBuildInputs; - propagatedBuildInputs = idrisDeps'; + propagatedBuildInputs = allIdrisDeps; # Some packages use the style # opts = -i ../../path/to/package