This is a fork of flake-compat which uses fetchers from nixpkgs
to create fixed-output derivations.
This flake compat fork therefore only works if you have access to a copy of nixpkgs.
To use, add the following to your flake.nix
:
inputs.flake-compat = {
flake = false;
url = "github.com:hraban/flake-compat/fixed-output";
};
Afterwards, create a default.nix
file containing the following:
# Alternatively, you could lock nixpkgs in your flake.lock and fetch that, if you preferred
{ pkgs ? import <nixpkgs> {} }:
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
sourceInfo = lock.nodes.flake-compat.locked;
flake-compat = fetchTarball {
url = "https://github.com/${sourceInfo.owner}/${sourceInfo.repo}/archive/${sourceInfo.rev}.tar.gz";
sha256 = sourceInfo.narHash;
};
flake = pkgs.callPackage flake-compat { src = ./.; }
in
flake.defaultNix
If you would like a shell.nix
file, create one containing the above, replacing defaultNix
with shellNix
.
This fork was created for cl-nix-lite
, because of the large amount of inputs, most of them being unnecessary for actual end users of the scope.
See: