diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..12b229e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix" +} \ No newline at end of file diff --git a/flake.lock b/flake.lock index 6d50d98..36b08f6 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" + } + }, "flake-utils": { "locked": { "lastModified": 1617631617, @@ -63,6 +79,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" @@ -74,11 +91,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1617740844, - "narHash": "sha256-ymJIGNI8/KVozGP4I0Kbt8UTNP+Pkv6lk3W+ABhLeFg=", + "lastModified": 1617762447, + "narHash": "sha256-bv1e5VRZnSswnVtBH2Nc1omInZSRgASsS8xO+Fg9whc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "8d3bb1034727d9a2084764230a1802131899a585", + "rev": "08263e3fa955acbcb6612c00d920d45e517b242d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6993615..906bfc8 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,13 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; rust-overlay.url = "github:oxalica/rust-overlay"; flake-utils.url = "github:numtide/flake-utils"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils, rust-overlay }: + outputs = { self, nixpkgs, flake-utils, rust-overlay, flake-compat }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9c43e06 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +(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 \ No newline at end of file