commit
435192e36f
9
ci.nix
9
ci.nix
|
@ -9,12 +9,10 @@
|
|||
# then your CI will be able to build and cache only those packages for
|
||||
# which this is possible.
|
||||
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with builtins;
|
||||
|
||||
let
|
||||
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
isDerivation = p: isAttrs p && p ? type && p.type == "derivation";
|
||||
isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true;
|
||||
|
@ -29,8 +27,8 @@ let
|
|||
let
|
||||
f = p:
|
||||
if shouldRecurseForDerivations p then flattenPkgs p
|
||||
else if isDerivation p then [p]
|
||||
else [];
|
||||
else if isDerivation p then [ p ]
|
||||
else [ ];
|
||||
in
|
||||
concatMap f (attrValues s);
|
||||
|
||||
|
@ -46,7 +44,6 @@ let
|
|||
(attrNames nurAttrs))));
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
buildPkgs = filter isBuildable nurPkgs;
|
||||
cachePkgs = filter isCacheable buildPkgs;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# commands such as:
|
||||
# nix-build -A mypackage
|
||||
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
{
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
|
@ -18,4 +18,3 @@
|
|||
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
|
||||
# ...
|
||||
}
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@ with pkgs.lib; {
|
|||
#
|
||||
# hexint = x: hexvals.${toLower x};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,3 @@
|
|||
#
|
||||
# my-module = ./my-module;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,16 +3,13 @@
|
|||
# configuration.
|
||||
|
||||
self: super:
|
||||
|
||||
let
|
||||
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
nameValuePair = n: v: { name = n; value = v; };
|
||||
nurAttrs = import ./default.nix { pkgs = super; };
|
||||
|
||||
in
|
||||
|
||||
builtins.listToAttrs
|
||||
builtins.listToAttrs
|
||||
(map (n: nameValuePair n nurAttrs.${n})
|
||||
(builtins.filter (n: !isReserved n)
|
||||
(builtins.attrNames nurAttrs)))
|
||||
|
|
|
@ -3,4 +3,3 @@
|
|||
#
|
||||
# my-overlay = import ./my-overlay;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ stdenv.mkDerivation rec {
|
|||
buildPhase = "echo echo Hello World > example";
|
||||
installPhase = "install -Dm755 example $out";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue