mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
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 (idris) src;
|
||||
|
||||
includePreludeBase = false;
|
||||
noPrelude = true;
|
||||
noBase = true;
|
||||
|
||||
idrisDeps = deps;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user