mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
flake/dev: rename nixpkgs
input to avoid shadowing
Rename `inputs.nixpkgs` to `inputs.dev-nixpkgs` to avoid shadowing the root flake's `inputs.nixpkgs`. Having the dev flake shadow an input can be confusing, since overriding the root flake's input will have no effect when evaluating outputs that depend on the dev partition. The only reason we specify a `nixpkgs` input at all here, is so the other inputs can follow it. Once nix 2.26 is more prevalent, we can follow the root flake's inputs using a `"path:../.."` input.
This commit is contained in:
parent
1c0dd320d9
commit
8e732cfac1
2 changed files with 10 additions and 7 deletions
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
|
@ -126,7 +126,7 @@ jobs:
|
||||||
root_nixpkgs=$(nix eval --raw --file . 'inputs.nixpkgs.rev')
|
root_nixpkgs=$(nix eval --raw --file . 'inputs.nixpkgs.rev')
|
||||||
old=$(git show --no-patch --format=%h)
|
old=$(git show --no-patch --format=%h)
|
||||||
nix flake update --commit-lock-file \
|
nix flake update --commit-lock-file \
|
||||||
--override-input nixpkgs "github:NixOS/nixpkgs/$root_nixpkgs" \
|
--override-input 'dev-nixpkgs' "github:NixOS/nixpkgs/$root_nixpkgs" \
|
||||||
--flake './flake/dev'
|
--flake './flake/dev'
|
||||||
new=$(git show --no-patch --format=%h)
|
new=$(git show --no-patch --format=%h)
|
||||||
if [ "$old" != "$new" ]; then
|
if [ "$old" != "$new" ]; then
|
||||||
|
|
|
@ -2,33 +2,36 @@
|
||||||
description = "Private inputs for development purposes. These are used by the top level flake in the `dev` partition, but do not appear in consumers' lock files.";
|
description = "Private inputs for development purposes. These are used by the top level flake in the `dev` partition, but do not appear in consumers' lock files.";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
# NOTE: Use a different name to the root flake's inputs.nixpkgs to avoid shadowing it.
|
||||||
|
# NOTE: The only reason we specify a nixpkgs input at all here, is so the other inputs can follow it.
|
||||||
|
# TODO: Once nix 2.26 is more prevalent, follow the root flake's inputs using a "path:../.." input.
|
||||||
|
dev-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-darwin = {
|
nix-darwin = {
|
||||||
url = "github:lnl7/nix-darwin";
|
url = "github:lnl7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
devshell = {
|
devshell = {
|
||||||
url = "github:numtide/devshell";
|
url = "github:numtide/devshell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
||||||
|
|
||||||
git-hooks = {
|
git-hooks = {
|
||||||
url = "github:cachix/git-hooks.nix";
|
url = "github:cachix/git-hooks.nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||||
inputs.flake-compat.follows = "flake-compat";
|
inputs.flake-compat.follows = "flake-compat";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue