1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
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:
bors[bot] 2022-10-11 18:11:04 +00:00 committed by GitHub
commit 96dc4e696b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 11 deletions

View file

@ -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,

View file

@ -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"
}
}
},

View file

@ -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;

View file

@ -2,7 +2,6 @@
description = "Description for the project";
inputs = {
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

View file

@ -2,7 +2,6 @@
description = "Description for the project";
inputs = {
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};