Find a file
Siddharth d15b535f38
Link to wiki to explain flake-compat
It's confusing as a newbie to arrive at this repo and have no context whatsoever. Instead, we link to the nix wiki instead to point people to an explanation.
2022-01-03 22:28:56 +05:30
COPYING Add MIT license 2021-08-01 14:10:57 +02:00
default.nix Revert "Revert unlicensed contribution" 2021-08-02 13:43:28 +02:00
README.md Link to wiki to explain flake-compat 2022-01-03 22:28:56 +05:30

flake-compat

Introduction

Nix Flakes: Using flakes project from a legacy Nix.

Usage

To use, add the following to your flake.nix:

inputs.flake-compat = {
  url = github:edolstra/flake-compat;
  flake = false;
};

Afterwards, create a default.nix file containing the following:

(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 = ./.; }
).defaultNix

If you would like a shell.nix file, create one containing the above, replacing defaultNix with shellNix.