Skip to content

Instantly share code, notes, and snippets.

@icetan
Created February 3, 2025 15:59
Show Gist options
  • Save icetan/13b633835008696de29cebccd607151d to your computer and use it in GitHub Desktop.
Save icetan/13b633835008696de29cebccd607151d to your computer and use it in GitHub Desktop.
import
(
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url = lock.nodes.${nodeName}.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
)
{
src = builtins.path {
name = "unflake-src";
path = ./.;
filter = path: type:
builtins.elem (builtins.baseNameOf path) [
"flake.nix"
"flake.lock"
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment