Compare commits
3 commits
3534dee0f4
...
64305b10dd
Author | SHA1 | Date | |
---|---|---|---|
2005 | 64305b10dd | ||
2005 | 024312776a | ||
2005 | 3e80c6a896 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
result/*
|
||||
result
|
30
flake.nix
30
flake.nix
|
@ -5,7 +5,6 @@
|
|||
};
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
|
||||
# TODO add more systems
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
@ -30,12 +29,13 @@
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
};
|
||||
|
||||
learningpulse-eureka = pkgs.maven.buildMavenPackage rec {
|
||||
pname = "eureka";
|
||||
version = "0.0.1";
|
||||
|
@ -48,14 +48,34 @@
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
};
|
||||
|
||||
learningpulse-dummy = pkgs.maven.buildMavenPackage rec {
|
||||
pname = "dummy";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
# todo get automatically
|
||||
mvnHash = "sha256-YCK1Qujgx73cZdEx2mRip+y+66px5TxL247fBIMyoy4=";
|
||||
|
||||
nativeBuildInputs = buildPackages;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self)
|
||||
packages;
|
||||
|
|
23
readme.md
Normal file
23
readme.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# LearningPulse server
|
||||
|
||||
## CI/CD
|
||||
|
||||
To check up on builds head to [the hydra server](https://hydra.4o1x5.dev/project/learningpulse)
|
||||
|
||||
### Enter developer shell
|
||||
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
### Build services
|
||||
|
||||
```bash
|
||||
nix build .#learningpulse-dummy
|
||||
```
|
||||
|
||||
### Run service
|
||||
|
||||
```bash
|
||||
nix develop && cd dummy && mvn run spring-boot:run
|
||||
```
|
Reference in a new issue