From e3efb20e98bfeeb7e688a334f92db2698ec79958 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 20 Oct 2020 21:45:46 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.safepass:=202.0=20=E2=86=92=203.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 4b3e97daa4869541938b4dad6448dc660625fa21) --- .../ocaml-modules/safepass/default.nix | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/pkgs/development/ocaml-modules/safepass/default.nix b/pkgs/development/ocaml-modules/safepass/default.nix index 884bcdebba4f..04c494403be2 100644 --- a/pkgs/development/ocaml-modules/safepass/default.nix +++ b/pkgs/development/ocaml-modules/safepass/default.nix @@ -1,33 +1,21 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: +{ lib, fetchFromGitHub, buildDunePackage }: -let param = - if stdenv.lib.versionAtLeast ocaml.version "4.02" - then { - version = "2.0"; - url = "http://forge.ocamlcore.org/frs/download.php/1615/ocaml-safepass-2.0.tgz"; - sha256 = "1zxx3wcyzhxxvm5w9c21y7hpa11h67paaaz9mfsyiqk6fs6hcvmw"; - } else { - version = "1.3"; - url = "http://forge.ocamlcore.org/frs/download.php/1432/ocaml-safepass-1.3.tgz"; - sha256 = "0lb8xbpyc5d1zml7s7mmcr6y2ipwdp7qz73lkv9asy7dyi6cj15g"; +buildDunePackage rec { + pname = "safepass"; + version = "3.0"; + + src = fetchFromGitHub { + owner = "darioteixeira"; + repo = "ocaml-safepass"; + rev = "v${version}"; + sha256 = "0i127gs9x23wzwa1q3dxa2j6hby07hvxdg1c98fc3j09rg6vy2bs"; }; -in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-safepass-${param.version}"; - src = fetchurl { - inherit (param) url sha256; - }; - - buildInputs = [ ocaml findlib ocamlbuild ]; - - createFindlibDestdir = true; meta = { - homepage = "http://ocaml-safepass.forge.ocamlcore.org/"; + inherit (src.meta) homepage; description = "An OCaml library offering facilities for the safe storage of user passwords"; - license = stdenv.lib.licenses.lgpl21; - platforms = ocaml.meta.platforms or []; - maintainers = with stdenv.lib.maintainers; [ vbgl ]; + license = lib.licenses.lgpl21; + maintainers = with lib.maintainers; [ vbgl ]; }; + }