mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Merge #60
60: Only depend on nixpkgs/lib. r=roberth a=shlevy This reflects the actual requirements of the core flake-parts functionality and removes any possible confusion about where lib comes from (always flake-parts's input) vs where pkgs comes from (always the flake's nixpkgs input). Flakes which use flake-parts should only ever have to override its input in the very unlikely event of a bug in lib. Hopefully lib will be separated into its own flake some day, which will also make this a much smaller footprint. Co-authored-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
commit
96dc4e696b
5 changed files with 10 additions and 11 deletions
|
@ -31,7 +31,6 @@ Otherwise, add the input,
|
|||
|
||||
```
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
||||
```
|
||||
|
||||
then slide `mkFlake` between your outputs function head and body,
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -1,15 +1,17 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1653581809,
|
||||
"narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=",
|
||||
"dir": "lib",
|
||||
"lastModified": 1665349835,
|
||||
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "83658b28fe638a170a19b8933aa008b30640fbd1",
|
||||
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
|
@ -18,7 +20,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
description = "Flake basics described using the module system";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-lib.url = "github:NixOS/nixpkgs/nixos-unstable?dir=lib";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }: {
|
||||
lib = import ./lib.nix { inherit (nixpkgs) lib; };
|
||||
outputs = { self, nixpkgs-lib, ... }: {
|
||||
lib = import ./lib.nix { inherit (nixpkgs-lib) lib; };
|
||||
templates = {
|
||||
default = {
|
||||
path = ./template/default;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
description = "Description for the project";
|
||||
|
||||
inputs = {
|
||||
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
description = "Description for the project";
|
||||
|
||||
inputs = {
|
||||
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue