Compare commits

..

3 commits

Author SHA1 Message Date
2005 9b23cd16c2 switched to mkderivation 2024-05-25 16:33:17 +02:00
2005 d811c86345 Merge branch 'master' of https://git.4o1x5.dev/LearningPulse/server into flake 2024-05-25 16:30:15 +02:00
2005 571578dca0 Merge pull request 'pullme' (#3) from pullme into master
Reviewed-on: #3
Reviewed-by: hirst <hirsting@gmail.com>
Reviewed-by: Seiwy <bmate20050911@gmail.com>
2024-05-23 11:28:20 +02:00

View file

@ -10,6 +10,7 @@
, nixpkgs
, maven
, makeWrapper
, stdenv
, ...
}:
let
@ -32,25 +33,21 @@
in
{
packages = {
learningpulse-discovery = stdenv.mkDerivation rec {
pname = "gateway";
version = "1.0";
learningpulse-discovery = with lib; maven.buildMavenPackage {
pname = "learningpulse-discovery";
version = "1.1.1";
src = ./.;
buildInputs = [ maven ];
src = ./eurika;
# todo get hash from package
mvnHash = lib.fakeSha256;
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
mvn --offline -Dmaven.repo.local=gateway package;
'';
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"
install -Dm644 target/${pname}-${version}.jar $out/share/java
'';
};
};
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
@ -60,4 +57,5 @@
};
});
};
};
}