switched to mkderivation

This commit is contained in:
2005 2024-05-25 16:33:17 +02:00
parent d811c86345
commit 9b23cd16c2

View file

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