Compare commits
No commits in common. "18982bc69fd807680030bc083db3428a6d79b048" and "d03b91004407cf40358b74796c6ebb58b69d8c58" have entirely different histories.
18982bc69f
...
d03b910044
13
flake.lock
13
flake.lock
|
@ -2,17 +2,18 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716509168,
|
"lastModified": 1716293225,
|
||||||
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
|
"narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
|
"rev": "3eaeaeb6b1e08a016380c279f8846e0bd8808916",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
|
|
91
flake.nix
91
flake.nix
|
@ -1,73 +1,48 @@
|
||||||
{
|
{
|
||||||
description = "CI, devshell and package definition for learningpulse";
|
description = "Learning Pulse";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, ... }:
|
|
||||||
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, maven
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
|
javaVersion = 22;
|
||||||
# TODO add more systems
|
overlays = [
|
||||||
system = "x86_64-linux";
|
(final: prev: rec {
|
||||||
pkgs = import nixpkgs { inherit system; };
|
jdk = prev."jdk${toString javaVersion}";
|
||||||
|
gradle = prev.gradle.override { java = jdk; };
|
||||||
buildPackages = with pkgs; [
|
maven = prev.maven.override { inherit jdk; };
|
||||||
jdk22
|
})
|
||||||
makeWrapper
|
|
||||||
];
|
];
|
||||||
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||||
|
pkgs = import nixpkgs { inherit overlays system; };
|
||||||
|
});
|
||||||
|
|
||||||
in
|
in
|
||||||
rec {
|
|
||||||
packages.${system} =
|
|
||||||
{
|
{
|
||||||
learningpulse-gateway = pkgs.maven.buildMavenPackage rec {
|
|
||||||
pname = "gateway";
|
|
||||||
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}-${version}
|
|
||||||
|
|
||||||
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";
|
|
||||||
|
|
||||||
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}-${version}
|
|
||||||
|
|
||||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
|
||||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
inherit (self)
|
gateway = maven.buildMavenPackage rec {
|
||||||
packages;
|
pname = "learningpulse-gateway";
|
||||||
|
version = "1.2.1";
|
||||||
|
#
|
||||||
|
# hello i wrote something here to test pulling
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells."${system}".default = pkgs.mkShell {
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||||
buildInputs = with pkgs; [
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
jdk
|
||||||
maven
|
maven
|
||||||
jdk22
|
|
||||||
jre8
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<groupId>com.learningpulse</groupId>
|
<groupId>com.learningpulse</groupId>
|
||||||
<artifactId>server</artifactId>
|
<artifactId>server</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.1</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>gateway</artifactId>
|
<artifactId>gateway</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.1</version>
|
||||||
|
|
Reference in a new issue