Unverified Commit 83daec3e authored by Ramses's avatar Ramses Committed by GitHub
Browse files

jo: cleaning (#408071)

parents 78ecdee2 e533a48e
Loading
Loading
Loading
Loading
+25 −7
Original line number Diff line number Diff line
@@ -5,16 +5,18 @@
  autoreconfHook,
  pandoc,
  pkg-config,
  versionCheckHook,
  nix-update-script,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "jo";
  version = "1.9";

  src = fetchFromGitHub {
    owner = "jpmens";
    repo = "jo";
    rev = version;
    tag = finalAttrs.version;
    sha256 = "sha256-1q4/RpxfoAdtY3m8bBuj7bhD17V+4dYo3Vb8zMbI1YU=";
  };

@@ -26,12 +28,28 @@ stdenv.mkDerivation rec {
    pkg-config
  ];

  meta = with lib; {
  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  versionCheckProgramArg = "-v";
  postInstallCheck = ''
    $out/bin/jo -V > /dev/null
    seq 1 10 | $out/bin/jo -a | grep '^\[1,2,3,4,5,6,7,8,9,10\]$' > /dev/null
  '';
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Small utility to create JSON objects";
    homepage = "https://github.com/jpmens/jo";
    changelog = "https://github.com/jpmens/jo/blob/${finalAttrs.version}/ChangeLog";
    mainProgram = "jo";
    license = licenses.gpl2Plus;
    maintainers = [ maintainers.markus1189 ];
    platforms = platforms.all;
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [
      xiaoxiangmoe
      markus1189
    ];
    platforms = lib.platforms.all;
  };
}
})