refactor(nix): pin flake-compat in default.nix

Avoids polluting downstream flake.locks

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-03-30 16:43:49 -04:00
parent 99852c972c
commit c367f48ec9
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86
4 changed files with 4 additions and 52 deletions

View File

@ -1,9 +1,4 @@
(import ( (import (fetchTarball {
let url = "https://github.com/edolstra/flake-compat/archive/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec.tar.gz";
lock = builtins.fromJSON (builtins.readFile ./flake.lock); sha256 = "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=";
in }) { src = ./.; }).defaultNix
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 = ./.; }).defaultNix

17
flake.lock generated
View File

@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"libnbtplusplus": { "libnbtplusplus": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -50,7 +34,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"libnbtplusplus": "libnbtplusplus", "libnbtplusplus": "libnbtplusplus",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }

View File

@ -15,26 +15,6 @@
url = "github:PrismLauncher/libnbtplusplus"; url = "github:PrismLauncher/libnbtplusplus";
flake = false; flake = false;
}; };
/*
Inputs below this are optional and can be removed
```
{
inputs.prismlauncher = {
url = "github:PrismLauncher/PrismLauncher";
inputs = {
flake-compat.follows = "";
};
};
}
```
*/
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
}; };
outputs = outputs =

View File

@ -44,9 +44,6 @@ Example:
# Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache # Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache
# #
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
# This is not required for Flakes
inputs.flake-compat.follows = "";
}; };
}; };
@ -92,9 +89,6 @@ Example:
# Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache # Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache
# #
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
# This is not required for Flakes
inputs.flake-compat.follows = "";
}; };
}; };