From 9ffd16b3850536094ca36bc31520bb15a6d5a9ef Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Fri, 28 Aug 2020 23:05:46 +0200 Subject: coqPackages: refactor --- pkgs/development/ocaml-modules/elpi/default.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index 865c5448c5bd..6f0d355fed5b 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -1,15 +1,19 @@ -{ lib, fetchzip, buildDunePackage, camlp5 +{ stdenv, lib, fetchzip, buildDunePackage, camlp5 , ppxlib, ppx_deriving, re, perl, ncurses +, version ? "1.12.0" }: - +with lib; +let fetched = import ../../../build-support/coq/meta-fetch/default.nix + {inherit stdenv fetchzip; } ({ + release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is"; + release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5"; + releaseRev = v: "v${v}"; + location = { domain = "github.com"; owner = "LPCIC"; repo = "elpi"; }; + }) version; +in buildDunePackage rec { pname = "elpi"; - version = "1.11.4"; - - src = fetchzip { - url = "https://github.com/LPCIC/elpi/releases/download/v${version}/elpi-v${version}.tbz"; - sha256 = "1hmjp2z52j17vwhhdkj45n9jx11jxkdg2dwa0n04yyw0qqy4m7c1"; - }; + inherit (fetched) version src; minimumOCamlVersion = "4.04"; @@ -19,8 +23,8 @@ buildDunePackage rec { meta = { description = "Embeddable λProlog Interpreter"; - license = lib.licenses.lgpl21Plus; - maintainers = [ lib.maintainers.vbgl ]; + license = licenses.lgpl21Plus; + maintainers = [ maintainers.vbgl ]; homepage = "https://github.com/LPCIC/elpi"; }; -- cgit 1.4.1