Compare commits

...

3 commits

Author SHA1 Message Date
2005 64305b10dd flake done? 2024-05-28 23:42:05 +02:00
2005 024312776a hydra config 2024-05-27 20:39:00 +02:00
2005 3e80c6a896 added dummy to flake 2024-05-27 20:26:32 +02:00
4 changed files with 51 additions and 6 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
result/*
result

View file

@ -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
View 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
```

2
result
View file

@ -1 +1 @@
/nix/store/v6lrgj18jgvwli3irsdabgj5nc712gfc-gateway-0.0.1
/nix/store/zmnh05nkqyynsmshiqfhq28bj9iiww0i-gateway-0.0.1