From d29fd527ea311b6c009719f43708b1a06f9b6ae4 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:22:16 +0200 Subject: [PATCH] heptagon: refactor --- .../compilers/heptagon/default.nix | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/heptagon/default.nix b/pkgs/development/compilers/heptagon/default.nix index e7a9360a6467..7f9c1c849f4a 100644 --- a/pkgs/development/compilers/heptagon/default.nix +++ b/pkgs/development/compilers/heptagon/default.nix @@ -5,31 +5,34 @@ , ocamlPackages }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "heptagon"; version = "1.05.00"; src = fetchFromGitLab { domain = "gitlab.inria.fr"; owner = "synchrone"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE="; + repo = "heptagon"; + rev = "v${finalAttrs.version}"; + hash = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE="; }; - nativeBuildInputs = [ + strictDeps = true; + + nativeBuildInputs = with ocamlPackages; [ + camlp4 + findlib makeWrapper + menhir + ocaml + ocamlbuild ]; buildInputs = with ocamlPackages; [ - ocaml - findlib - menhir + camlp4 + lablgtk menhirLib ocamlgraph - camlp4 - ocamlbuild - lablgtk ]; # the heptagon library in lib/heptagon is not executable @@ -48,5 +51,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ wegank ]; mainProgram = "heptc"; + platforms = platforms.unix; }; -} +})