Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 690f986c0fc4
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a9435c8db818
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Oct 12, 2019

  1. Copy the full SHA
    a9435c8 View commit details
Showing with 25 additions and 13 deletions.
  1. +25 −13 pkgs/development/ocaml-modules/labltk/default.nix
38 changes: 25 additions & 13 deletions pkgs/development/ocaml-modules/labltk/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
{ stdenv, fetchurl, ocaml, findlib, tcl, tk }:
{ stdenv, fetchurl, fetchzip, ocaml, findlib, tcl, tk }:

if !stdenv.lib.versionAtLeast ocaml.version "4.04"
let OCamlVersionAtLeast = stdenv.lib.versionAtLeast ocaml.version; in

if !OCamlVersionAtLeast "4.04"
then throw "labltk is not available for OCaml ${ocaml.version}"
else

let param = {
"4.04" = {
let param =
if OCamlVersionAtLeast "4.08" then rec {
version = "8.06.7";
src = fetchzip {
url = "https://github.com/garrigue/labltk/archive/${version}.tar.gz";
sha256 = "1cqnxjv2dvw9csiz4iqqyx6rck04jgylpglk8f69kgybf7k7xk2h";
};
} else
let mkOldParam = { version, key, sha256 }: {
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/${key}/labltk-${version}.tar.gz";
inherit sha256;
};
inherit version;
}; in
{
"4.04" = mkOldParam {
version = "8.06.2";
key = "1628";
sha256 = "1p97j9s33axkb4yyl0byhmhlyczqarb886ajpyggizy2br3a0bmk";
};
"4.05" = {
"4.05" = mkOldParam {
version = "8.06.3";
key = "1701";
sha256 = "1rka9jpg3kxqn7dmgfsa7pmsdwm16x7cn4sh15ijyyrad9phgdxn";
};
"4.06" = {
"4.06" = mkOldParam {
version = "8.06.4";
key = "1727";
sha256 = "0j3rz0zz4r993wa3ssnk5s416b1jhj58l6z2jk8238a86y7xqcii";
};
"4.07" = {
"4.07" = mkOldParam {
version = "8.06.5";
key = "1764";
sha256 = "0wgx65y1wkgf22ihpqmspqfp95fqbj3pldhp1p3b1mi8rmc37zwj";
@@ -29,14 +46,9 @@ let param = {
in

stdenv.mkDerivation rec {
inherit (param) version;
inherit (param) version src;
name = "ocaml${ocaml.version}-labltk-${version}";

src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/${param.key}/labltk-${param.version}.tar.gz";
inherit (param) sha256;
};

buildInputs = [ ocaml findlib tcl tk ];

configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ];