initial backend nix build - get jar
This commit is contained in:
parent
ba625d738e
commit
d4eae63166
|
@ -30,3 +30,4 @@ target
|
||||||
.metals
|
.metals
|
||||||
project/project
|
project/project
|
||||||
project/metals.sbt
|
project/metals.sbt
|
||||||
|
/result
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import org.scalajs.linker.interface.ModuleSplitStyle
|
import org.scalajs.linker.interface.ModuleSplitStyle
|
||||||
|
|
||||||
lazy val commonSettings = Seq(
|
lazy val commonSettings = Seq(
|
||||||
|
version := "0.1.1",
|
||||||
scalaVersion := "3.2.0"
|
scalaVersion := "3.2.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
40
flake.lock
40
flake.lock
|
@ -18,6 +18,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682080641,
|
"lastModified": 1682080641,
|
||||||
|
@ -36,7 +51,30 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"sbt-derivation": "sbt-derivation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sbt-derivation": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675083208,
|
||||||
|
"narHash": "sha256-+sSFhSpV2jckr1qYlX/SaxQ6IdpagD6o4rru/3HAl0I=",
|
||||||
|
"owner": "zaninime",
|
||||||
|
"repo": "sbt-derivation",
|
||||||
|
"rev": "92d6d6d825e3f6ae5642d1cce8ff571c3368aaf7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zaninime",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "sbt-derivation",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
27
flake.nix
27
flake.nix
|
@ -2,12 +2,17 @@
|
||||||
description = "Planning Poker web app. Trying to build something and learn new things";
|
description = "Planning Poker web app. Trying to build something and learn new things";
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
inputs.sbt-derivation.url = "github:zaninime/sbt-derivation/master";
|
||||||
|
inputs.sbt-derivation.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils, sbt-derivation }:
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
let
|
||||||
{
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
packageName = "blanning-poker-grargh";
|
||||||
|
version = "0.1.1";
|
||||||
|
in {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.nodejs
|
pkgs.nodejs
|
||||||
|
@ -21,6 +26,22 @@
|
||||||
echo "dev env for planning poker BWARGH started"
|
echo "dev env for planning poker BWARGH started"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
packages.backend = sbt-derivation.lib.mkSbtDerivation rec {
|
||||||
|
inherit pkgs version;
|
||||||
|
|
||||||
|
# ...and the rest of the arguments
|
||||||
|
pname = "${packageName}-backend";
|
||||||
|
depsSha256 = "sha256-UOEq6KFS4rh4eaKxnRcVOh4SQWn3hnfpzcyRqPnFvco=";
|
||||||
|
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
|
||||||
|
buildPhase = ''
|
||||||
|
sbt backend/assembly
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp backend/target/scala-*/backend-assembly-*.jar $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
# see https://serokell.io/blog/practical-nix-flakes
|
# see https://serokell.io/blog/practical-nix-flakes
|
||||||
|
|
Loading…
Reference in New Issue