flake: remove flake-compat as an input

Keep the dependency tree short so users don't have to override.
This commit is contained in:
zimbatm 2023-02-27 11:57:00 +01:00
parent f2e0c6fc4e
commit 5be7cdf5d8
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7
4 changed files with 11 additions and 34 deletions

View File

@ -1,14 +1,11 @@
# This file provides backward compatibility to nix < 2.4 clients
{ system ? builtins.currentSystem }:
let
flake =
import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; };
flake-compat = builtins.fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9.tar.gz";
sha256 = "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=";
};
flake = import flake-compat { src = ./.; inherit system; };
in
flake.defaultNix
flake.defaultNix

View File

@ -1,21 +1,5 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -54,7 +38,6 @@
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}

View File

@ -7,10 +7,6 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = inputs@{ flake-parts, ... }:

View File

@ -1,2 +1,3 @@
(import ./default.nix {}).devShells.${builtins.currentSystem}.default
or throw "dev-shell not defined. Cannot find flake attribute devShell.${builtins.currentSystem}.default"
{ system ? builtins.currentSystem }:
(import ./default.nix { inherit system; }).devShells.${system}.default
or throw "dev-shell not defined. Cannot find flake attribute devShells.${system}.default"