From eab6c543d19f7546f1151cca32663035006af702 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 10 Apr 2021 17:38:33 +0530 Subject: add backwards compat to legacy nix commands --- default.nix | 13 +++++++++++++ flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ shell.nix | 13 +++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..9eb132a --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +(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 = ./.; + }).shellNix diff --git a/flake.lock b/flake.lock index 1feb05e..7e8f2f6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "gitignore": { "flake": false, "locked": { @@ -80,6 +96,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "gitignore": "gitignore", "mozillapkgs": "mozillapkgs", "naersk": "naersk", diff --git a/flake.nix b/flake.nix index b067ee0..07a9a06 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,10 @@ url = "github:hercules-ci/gitignore"; flake=false; }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; outputs = { self, nixpkgs, utils, naersk, mozillapkgs, gitignore, ... }: diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9eb132a --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +(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 = ./.; + }).shellNix -- cgit v1.2.3