flake: basic hydra job
doesn't work but who cares am i right?
This commit is contained in:
parent
9bc2af66d1
commit
529e34cba9
12
flake.lock
12
flake.lock
|
@ -2,16 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716218643,
|
"lastModified": 1716293225,
|
||||||
"narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=",
|
"narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee",
|
"rev": "3eaeaeb6b1e08a016380c279f8846e0bd8808916",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
37
flake.nix
37
flake.nix
|
@ -2,10 +2,15 @@
|
||||||
description = "Learning Pulse";
|
description = "Learning Pulse";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, maven
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
javaVersion = 22;
|
javaVersion = 22;
|
||||||
overlays = [
|
overlays = [
|
||||||
|
@ -19,8 +24,36 @@
|
||||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||||
pkgs = import nixpkgs { inherit overlays system; };
|
pkgs = import nixpkgs { inherit overlays system; };
|
||||||
});
|
});
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
hydraJobs = {
|
||||||
|
gateway = maven.buildMavenPackage rec {
|
||||||
|
pname = "learningpulse-gateway";
|
||||||
|
version = "1.2.1";
|
||||||
|
|
||||||
|
src = ./gateway;
|
||||||
|
|
||||||
|
mvnHash = "sha256-kLpjMj05uC94/5vGMwMlFzLKNFOKeyNvq/vmB6pHTAo=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin $out/share/jd-cli
|
||||||
|
install -Dm644 jd-cli/target/jd-cli.jar $out/share/jd-cli
|
||||||
|
|
||||||
|
makeWrapper ${nixpkgs.pkgs.jre8}/bin/java $out/bin/jd-cli \
|
||||||
|
--add-flags "-jar $out/share/jd-cli/jd-cli.jar"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "The api gateway for learningpulse";
|
||||||
|
homepage = "https://git.4o1x5.dev/learningpulse/server";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
Reference in a new issue