flake: add nix-community/flake-compat
This commit is contained in:
parent
ab99be2fa7
commit
0b727ee65d
3 changed files with 33 additions and 0 deletions
16
default.nix
Normal file
16
default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# This file provides backward compatibility to nix < 2.4 clients
|
||||||
|
{ system ? builtins.currentSystem }:
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
|
||||||
|
root = lock.nodes.${lock.root};
|
||||||
|
inherit (lock.nodes.${root.inputs.flake-compat}.locked) owner repo rev narHash;
|
||||||
|
|
||||||
|
flake-compat = fetchTarball {
|
||||||
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake = import flake-compat { inherit system; src = ./.; };
|
||||||
|
in
|
||||||
|
flake.defaultNix
|
16
flake.lock
generated
16
flake.lock
generated
|
@ -110,6 +110,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688025799,
|
||||||
|
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
|
@ -248,6 +263,7 @@
|
||||||
"comin": "comin",
|
"comin": "comin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"empty": "empty",
|
"empty": "empty",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
empty.url = "github:nix-systems/empty";
|
empty.url = "github:nix-systems/empty";
|
||||||
|
flake-compat.url = "github:nix-community/flake-compat";
|
||||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue