diff --git a/flake.nix b/flake.nix index 5cc269c..6ab820e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,19 +4,30 @@ 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-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) + (self: super: + let jvm = super.jdk11_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/flake.nix b/flake.nix index 5cc269c..6ab820e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,19 +4,30 @@ 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-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) + (self: super: + let jvm = super.jdk11_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/shell.nix b/shell.nix index bc59c53..fa2a56c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,6 @@ -{ pkgs ? import { - overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) - ]; -} }: - -with pkgs; -mkShell { buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; } +(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.nix b/flake.nix index 5cc269c..6ab820e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,19 +4,30 @@ 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-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) + (self: super: + let jvm = super.jdk11_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/shell.nix b/shell.nix index bc59c53..fa2a56c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,6 @@ -{ pkgs ? import { - overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) - ]; -} }: - -with pkgs; -mkShell { buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; } +(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/src/main/g8/flake.nix b/src/main/g8/flake.nix index 469660f..d965203 100644 --- a/src/main/g8/flake.nix +++ b/src/main/g8/flake.nix @@ -1,5 +1,5 @@ { - description = "Posuzovani shody"; + description = "IW project"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -12,11 +12,17 @@ pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.jdk$java_version$_headless; - jdk = jre; - }) + (self: super: + let jvm = super.jdk$java_version$_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/flake.nix b/flake.nix index 5cc269c..6ab820e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,19 +4,30 @@ 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-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) + (self: super: + let jvm = super.jdk11_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { + devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/shell.nix b/shell.nix index bc59c53..fa2a56c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,6 @@ -{ pkgs ? import { - overlays = [ - (final: prev: rec { - jre = prev.adoptopenjdk-hotspot-bin-11; - jdk = jre; - }) - ]; -} }: - -with pkgs; -mkShell { buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; } +(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/src/main/g8/flake.nix b/src/main/g8/flake.nix index 469660f..d965203 100644 --- a/src/main/g8/flake.nix +++ b/src/main/g8/flake.nix @@ -1,5 +1,5 @@ { - description = "Posuzovani shody"; + description = "IW project"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -12,11 +12,17 @@ pkgs = import nixpkgs { inherit system; overlays = [ - (final: prev: rec { - jre = prev.jdk$java_version$_headless; - jdk = jre; - }) + (self: super: + let jvm = super.jdk$java_version$_headless; + in { + jre = jvm; + jdk = jvm; + }) ]; }; - in { devShell = import ./shell.nix { inherit pkgs; }; }); + in { devShell = with pkgs; + mkShell { + buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; + }; + }); } diff --git a/src/main/g8/shell.nix b/src/main/g8/shell.nix index a599aac..fa2a56c 100644 --- a/src/main/g8/shell.nix +++ b/src/main/g8/shell.nix @@ -1,11 +1,6 @@ -{ pkgs ? import { - overlays = [ - (final: prev: rec { - jre = prev.jdk$java_version$_headless; - jdk = jre; - }) - ]; -} }: - -with pkgs; -mkShell { buildInputs = [ jre ammonite coursier bloop sbt scalafmt ]; } +(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