summary refs log tree commit diff
path: root/pkgs/tools/networking/openapi-generator-cli/unstable.nix
diff options
context:
space:
mode:
authorMalte Brandy <malte.brandy@maralorn.de>2021-05-07 15:03:54 +0200
committerMalte Brandy <malte.brandy@maralorn.de>2021-05-07 15:03:54 +0200
commit2a11f1f5cc1c4680b49240203db18ecbb19b9cc5 (patch)
treedf44c5fcd797c97297ab663b63167e9b4bc06a72 /pkgs/tools/networking/openapi-generator-cli/unstable.nix
parentf73c2278d07e674233040422b71d965a0587756f (diff)
parentae1c8ede09b53007ba9b3c32f926c9c03547ae8b (diff)
downloadnixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar.gz
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar.bz2
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar.lz
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar.xz
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.tar.zst
nixpkgs-2a11f1f5cc1c4680b49240203db18ecbb19b9cc5.zip
Merge branch 'master' into haskell-updates
Diffstat (limited to 'pkgs/tools/networking/openapi-generator-cli/unstable.nix')
-rw-r--r--pkgs/tools/networking/openapi-generator-cli/unstable.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/tools/networking/openapi-generator-cli/unstable.nix b/pkgs/tools/networking/openapi-generator-cli/unstable.nix
index 1384f35a3f2..306654f05d9 100644
--- a/pkgs/tools/networking/openapi-generator-cli/unstable.nix
+++ b/pkgs/tools/networking/openapi-generator-cli/unstable.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, fetchurl, jre, makeWrapper }:
+{ callPackage, lib, stdenv, fetchurl, jre, makeWrapper }:
 
-stdenv.mkDerivation rec {
+let this = stdenv.mkDerivation rec {
   version = "6.0.0-2021-01-18";  # Also update the fetchurl link
   pname = "openapi-generator-cli";
 
@@ -18,10 +18,14 @@ stdenv.mkDerivation rec {
   phases = [ "installPhase" ];
 
   installPhase = ''
+    runHook preInstall
+
     install -D "$src" "$out/share/java/${jarfilename}"
 
     makeWrapper ${jre}/bin/java $out/bin/${pname} \
       --add-flags "-jar $out/share/java/${jarfilename}"
+
+    runHook postInstall
   '';
 
   meta = with lib; {
@@ -30,5 +34,9 @@ stdenv.mkDerivation rec {
     license = licenses.asl20;
     maintainers = [ maintainers.shou ];
   };
-}
 
+  passthru.tests.example = callPackage ./example.nix {
+    openapi-generator-cli = this;
+  };
+};
+in this