From 57f4d12ba823d9f56a37b09e51d7238cbd59e0d5 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 29 May 2023 13:43:45 -0400 Subject: [PATCH 1/2] switch to nixpkgs.lib --- flake.lock | 17 +++++++---------- flake.nix | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 46c8d319..4e556c18 100644 --- a/flake.lock +++ b/flake.lock @@ -2,19 +2,16 @@ "nodes": { "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1682879489, - "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "lastModified": 1681001314, + "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", "type": "github" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "nix-community", + "repo": "nixpkgs.lib", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 5d1447b7..be4f42bd 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake basics described using the module system"; inputs = { - nixpkgs-lib.url = "github:NixOS/nixpkgs/nixos-unstable?dir=lib"; + nixpkgs-lib.url = "github:nix-community/nixpkgs.lib"; }; outputs = { self, nixpkgs-lib, ... }: { From 904937e5f4058f1a760b975e1983af8d5786056d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 31 May 2023 14:11:00 +0200 Subject: [PATCH 2/2] Add comment to nixpkgs-lib dependency --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index be4f42bd..20a3f1b0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,15 @@ description = "Flake basics described using the module system"; inputs = { + # nix-community/nixpkgs.lib is equivalent to nixpkgs?dir=lib, except it is + # decoupled from its parent directory. + # + # You may use nixpkgs?dir=lib or even nixpkgs as an input instead, using follows. + # See https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-inputs + # + # Ideally fetching a subtree would be an builtins.fetchTree (aka flake inputs) + # feature, but that has not been implemented yet, and while take a while to + # be widely available. nixpkgs-lib.url = "github:nix-community/nixpkgs.lib"; };