nix fmt
This commit is contained in:
parent
ea6ac8389b
commit
9c0f4a922a
12
closure.nix
12
closure.nix
|
@ -7,11 +7,7 @@
|
||||||
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins) genericClosure hasAttr map;
|
||||||
genericClosure
|
|
||||||
hasAttr
|
|
||||||
map
|
|
||||||
;
|
|
||||||
inherit (pkgs.lib)
|
inherit (pkgs.lib)
|
||||||
concatLists
|
concatLists
|
||||||
concatMap
|
concatMap
|
||||||
|
@ -22,12 +18,14 @@ let
|
||||||
;
|
;
|
||||||
|
|
||||||
# Map a drv or list of drvs to a list of output drvs
|
# Map a drv or list of drvs to a list of output drvs
|
||||||
drvOutputs = drv:
|
drvOutputs =
|
||||||
|
drv:
|
||||||
if isList drv then
|
if isList drv then
|
||||||
concatMap drvOutputs drv
|
concatMap drvOutputs drv
|
||||||
else if hasAttr "outputs" drv then
|
else if hasAttr "outputs" drv then
|
||||||
map (out: drv.${out}) drv.outputs
|
map (out: drv.${out}) drv.outputs
|
||||||
else [ drv ];
|
else
|
||||||
|
[ drv ];
|
||||||
|
|
||||||
# Map a drv or list of drvs to the outputs of referenced derivations
|
# Map a drv or list of drvs to the outputs of referenced derivations
|
||||||
drvDeps =
|
drvDeps =
|
||||||
|
|
|
@ -5,11 +5,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
lib = import ./lib.nix { inherit pkgs; };
|
lib = import ./lib.nix { inherit pkgs; };
|
||||||
inherit (lib)
|
inherit (lib) allMaintainers expandInput noMaintainers;
|
||||||
allMaintainers
|
|
||||||
expandInput
|
|
||||||
noMaintainers
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
bundlers."x86_64-linux" = rec {
|
bundlers."x86_64-linux" = rec {
|
||||||
|
|
3
lib.nix
3
lib.nix
|
@ -27,7 +27,8 @@ rec {
|
||||||
drvMaintainers = drv: if maintainable drv then drv.meta.maintainers else [ ];
|
drvMaintainers = drv: if maintainable drv then drv.meta.maintainers else [ ];
|
||||||
|
|
||||||
# Construct a link to a derivation's source in github:NixOS/nixpkgs
|
# Construct a link to a derivation's source in github:NixOS/nixpkgs
|
||||||
drvSource = drv:
|
drvSource =
|
||||||
|
drv:
|
||||||
let
|
let
|
||||||
parts = match "/nix/store/[^/]+/(.*):([0-9]*)" drv.meta.position;
|
parts = match "/nix/store/[^/]+/(.*):([0-9]*)" drv.meta.position;
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in New Issue