mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
refact: Add let binding to flake.nix
This commit is contained in:
parent
8471fe90ad
commit
3ea6893659
1 changed files with 47 additions and 43 deletions
90
flake.nix
90
flake.nix
|
@ -5,49 +5,53 @@
|
|||
nixpkgs-lib.url = "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"; # 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58 /lib from nixos-unstable
|
||||
};
|
||||
|
||||
outputs = { nixpkgs-lib, ... }: {
|
||||
lib = import ./lib.nix {
|
||||
inherit (nixpkgs-lib) lib;
|
||||
# Extra info for version check message
|
||||
revInfo =
|
||||
if nixpkgs-lib?rev
|
||||
then " (nixpkgs-lib.rev: ${nixpkgs-lib.rev})"
|
||||
else "";
|
||||
outputs = { nixpkgs-lib, ... }:
|
||||
let
|
||||
lib = import ./lib.nix {
|
||||
inherit (nixpkgs-lib) lib;
|
||||
# Extra info for version check message
|
||||
revInfo =
|
||||
if nixpkgs-lib?rev
|
||||
then " (nixpkgs-lib.rev: ${nixpkgs-lib.rev})"
|
||||
else "";
|
||||
};
|
||||
templates = {
|
||||
default = {
|
||||
path = ./template/default;
|
||||
description = ''
|
||||
A minimal flake using flake-parts.
|
||||
'';
|
||||
};
|
||||
multi-module = {
|
||||
path = ./template/multi-module;
|
||||
description = ''
|
||||
A minimal flake using flake-parts.
|
||||
'';
|
||||
};
|
||||
unfree = {
|
||||
path = ./template/unfree;
|
||||
description = ''
|
||||
A minimal flake using flake-parts importing nixpkgs with the unfree option.
|
||||
'';
|
||||
};
|
||||
package = {
|
||||
path = ./template/package;
|
||||
description = ''
|
||||
A flake with a simple package:
|
||||
- Nixpkgs
|
||||
- callPackage
|
||||
- src with fileset
|
||||
- a check with runCommand
|
||||
'';
|
||||
};
|
||||
};
|
||||
flakeModules = {
|
||||
easyOverlay = ./extras/easyOverlay.nix;
|
||||
flakeModules = ./extras/flakeModules.nix;
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit lib templates flakeModules;
|
||||
};
|
||||
templates = {
|
||||
default = {
|
||||
path = ./template/default;
|
||||
description = ''
|
||||
A minimal flake using flake-parts.
|
||||
'';
|
||||
};
|
||||
multi-module = {
|
||||
path = ./template/multi-module;
|
||||
description = ''
|
||||
A minimal flake using flake-parts.
|
||||
'';
|
||||
};
|
||||
unfree = {
|
||||
path = ./template/unfree;
|
||||
description = ''
|
||||
A minimal flake using flake-parts importing nixpkgs with the unfree option.
|
||||
'';
|
||||
};
|
||||
package = {
|
||||
path = ./template/package;
|
||||
description = ''
|
||||
A flake with a simple package:
|
||||
- Nixpkgs
|
||||
- callPackage
|
||||
- src with fileset
|
||||
- a check with runCommand
|
||||
'';
|
||||
};
|
||||
};
|
||||
flakeModules = {
|
||||
easyOverlay = ./extras/easyOverlay.nix;
|
||||
flakeModules = ./extras/flakeModules.nix;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue