diff --git a/flake.lock b/flake.lock index ba4170a..e7682e9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,28 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -17,11 +33,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1646939531, - "narHash": "sha256-bxOjVqcsccCNm+jSmEh/bm0tqfE3SdjwS+p+FZja3ho=", + "lastModified": 1666869603, + "narHash": "sha256-3V53or4Vpu4+LrGfGSh3T2V8+qf5RP6nRuex9GywkwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fcd48a5a0693f016a5c370460d0c2a8243b882dc", + "rev": "2001e2b31c565bcdf7bc13062b8d7cfccaca05b8", "type": "github" }, "original": { @@ -33,6 +49,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.lock b/flake.lock index ba4170a..e7682e9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,28 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -17,11 +33,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1646939531, - "narHash": "sha256-bxOjVqcsccCNm+jSmEh/bm0tqfE3SdjwS+p+FZja3ho=", + "lastModified": 1666869603, + "narHash": "sha256-3V53or4Vpu4+LrGfGSh3T2V8+qf5RP6nRuex9GywkwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fcd48a5a0693f016a5c370460d0c2a8243b882dc", + "rev": "2001e2b31c565bcdf7bc13062b8d7cfccaca05b8", "type": "github" }, "original": { @@ -33,6 +49,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 3db1ac9..fb6e5b7 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, flake-compat }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { @@ -18,5 +22,11 @@ }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in + { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt nodejs-16_x ]; + }; + }); } diff --git a/flake.lock b/flake.lock index ba4170a..e7682e9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,28 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -17,11 +33,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1646939531, - "narHash": "sha256-bxOjVqcsccCNm+jSmEh/bm0tqfE3SdjwS+p+FZja3ho=", + "lastModified": 1666869603, + "narHash": "sha256-3V53or4Vpu4+LrGfGSh3T2V8+qf5RP6nRuex9GywkwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fcd48a5a0693f016a5c370460d0c2a8243b882dc", + "rev": "2001e2b31c565bcdf7bc13062b8d7cfccaca05b8", "type": "github" }, "original": { @@ -33,6 +49,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 3db1ac9..fb6e5b7 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, flake-compat }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { @@ -18,5 +22,11 @@ }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in + { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt nodejs-16_x ]; + }; + }); } diff --git a/shell.nix b/shell.nix index 2582231..a34aaa6 100644 --- a/shell.nix +++ b/shell.nix @@ -1,13 +1,6 @@ -{ pkgs ? import { - overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) - ]; -} }: - -with pkgs; -mkShell { - buildInputs = [ jre ammonite coursier bloop mill sbt scalafmt nodejs-16_x ]; -} +(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