From 4e42f92438b7e68aa1f536639c00f1bfc8162c42 Mon Sep 17 00:00:00 2001 From: hellodword <46193371+hellodword@users.noreply.github.com> Date: Thu, 30 May 2024 12:15:52 +0000 Subject: [PATCH] shim shell.nix for legacy nix-shell --- flake.lock | 16 ++++++++++++++++ flake.nix | 3 ++- shell.nix | 10 ++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 shell.nix diff --git a/flake.lock b/flake.lock index 3b6748c..dd015ec 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -36,6 +51,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" diff --git a/flake.nix b/flake.nix index 6703da9..03f7f3d 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,10 @@ flake-utils.follows = "flake-utils"; }; }; + flake-compat.url = "github:edolstra/flake-compat"; }; - outputs = { self, nixpkgs, rust-overlay, flake-utils }: + outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..942ce01 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).shellNix