forked from nix-community/nixpkgs-wayland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
25 lines (21 loc) · 773 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This file provides backward compatibility to nix < 2.4 clients
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
inherit (lock.nodes.flake-compat.locked)
owner
repo
rev
narHash
;
flake-compat = fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
sha256 = narHash;
};
flake = import flake-compat { src = ./.; };
warn = msg: builtins.trace "[1;31mwarning: ${msg}[0m";
example = ''
nixpkgs.overlays=[(import "''${builtins.fetchurl "https://github.com/nix-community/nixpkgs-wayland/archive/master.tar.gz"}/overlay.nix")];
'';
warning = "change your 'nixpkgs-wayland' import statement to import 'overlay.nix' directly. example:\n ${example}";
in
warn warning flake.defaultNix