From 888c923880ed08352a5cadc4e2476c6d1032e1e2 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 26 Mar 2020 02:54:23 +0100 Subject: [PATCH] pkgs: Add pkgs-lib structure --- pkgs/pkgs-lib/default.nix | 7 +++++++ pkgs/pkgs-lib/tests/default.nix | 5 +++++ pkgs/top-level/all-packages.nix | 3 +++ pkgs/top-level/release.nix | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 pkgs/pkgs-lib/default.nix create mode 100644 pkgs/pkgs-lib/tests/default.nix diff --git a/pkgs/pkgs-lib/default.nix b/pkgs/pkgs-lib/default.nix new file mode 100644 index 00000000000..1f74747d311 --- /dev/null +++ b/pkgs/pkgs-lib/default.nix @@ -0,0 +1,7 @@ +# pkgs-lib is for functions and values that can't be in lib because +# they depend on some packages. This notably is *not* for supporting package +# building, instead pkgs/build-support is the place for that. +{ lib, pkgs }: { + +} + diff --git a/pkgs/pkgs-lib/tests/default.nix b/pkgs/pkgs-lib/tests/default.nix new file mode 100644 index 00000000000..ee71596a145 --- /dev/null +++ b/pkgs/pkgs-lib/tests/default.nix @@ -0,0 +1,5 @@ +# Call nix-build on this file to run all tests in this directory +{ pkgs ? import ../../.. {} }: +let +in pkgs.linkFarm "nixpkgs-pkgs-lib-tests" [ +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6427bb4bbc2..4fca1254bcd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -523,6 +523,9 @@ in #package writers writers = callPackage ../build-support/writers {}; + # lib functions depending on pkgs + inherit (import ../pkgs-lib { inherit lib pkgs; }); + ### TOOLS _0x0 = callPackage ../tools/misc/0x0 { }; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index c11858f09c8..5fc6e91b311 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -34,6 +34,7 @@ let manual = import ../../doc { inherit pkgs nixpkgs; }; lib-tests = import ../../lib/tests/release.nix { inherit pkgs; }; + pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; }; darwin-tested = if supportDarwin then pkgs.releaseTools.aggregate { name = "nixpkgs-darwin-${jobs.tarball.version}"; @@ -91,6 +92,7 @@ let [ jobs.tarball jobs.manual jobs.lib-tests + jobs.pkgs-lib-tests jobs.stdenv.x86_64-linux jobs.linux.x86_64-linux jobs.pandoc.x86_64-linux