From a7f9d336b7fa7c0a14f056e5acdadae9d7b3c58e Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 9 Sep 2020 19:29:57 +0200 Subject: [PATCH 1/2] mlton: fix build --- pkgs/development/compilers/mlton/default.nix | 6 +++--- pkgs/development/compilers/mlton/from-git-source.nix | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix index aaf58885140..67dfd3d2689 100644 --- a/pkgs/development/compilers/mlton/default.nix +++ b/pkgs/development/compilers/mlton/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchgit, patchelf, gmp }: +{ stdenv, fetchurl, fetchgit, patchelf, gmp, which }: rec { mlton20130715 = import ./20130715.nix { inherit stdenv fetchurl patchelf gmp; @@ -13,7 +13,7 @@ rec { version = "20180207"; rev = "on-20180207-release"; sha256 = "00rdd2di5x1dzac64il9z05m3fdzicjd3226wwjyynv631jj3q2a"; - inherit stdenv fetchgit gmp; + inherit stdenv fetchgit gmp which; }; mltonHEAD = import ./from-git-source.nix { @@ -21,6 +21,6 @@ rec { version = "HEAD"; rev = "e149c9917cfbfe6aba5c986a958ed76d5cc6cfde"; sha256 = "0a0j1i0f0fxw2my1309srq5j3vz0kawrrln01gxms2m5hy5dl50d"; - inherit stdenv fetchgit gmp; + inherit stdenv fetchgit gmp which; }; } diff --git a/pkgs/development/compilers/mlton/from-git-source.nix b/pkgs/development/compilers/mlton/from-git-source.nix index 2585b599caf..dc5862e6e3d 100644 --- a/pkgs/development/compilers/mlton/from-git-source.nix +++ b/pkgs/development/compilers/mlton/from-git-source.nix @@ -6,6 +6,7 @@ , sha256 , stdenv , version +, which }: stdenv.mkDerivation { @@ -16,6 +17,8 @@ stdenv.mkDerivation { inherit url rev sha256; }; + nativeBuildInputs = [ which ]; + buildInputs = [mltonBootstrap gmp]; preBuild = '' From ad0d43e1a714e7fcc10aef96c61a726d6254217b Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 9 Sep 2020 20:16:18 +0200 Subject: [PATCH 2/2] mlton: use callPackage --- pkgs/development/compilers/mlton/default.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix index 67dfd3d2689..e4381774781 100644 --- a/pkgs/development/compilers/mlton/default.nix +++ b/pkgs/development/compilers/mlton/default.nix @@ -1,26 +1,21 @@ -{ stdenv, fetchurl, fetchgit, patchelf, gmp, which }: +{ callPackage }: + rec { - mlton20130715 = import ./20130715.nix { - inherit stdenv fetchurl patchelf gmp; - }; + mlton20130715 = callPackage ./20130715.nix {}; - mlton20180207Binary = import ./20180207-binary.nix { - inherit stdenv fetchurl patchelf gmp; - }; + mlton20180207Binary = callPackage ./20180207-binary.nix {}; - mlton20180207 = import ./from-git-source.nix { + mlton20180207 = callPackage ./from-git-source.nix { mltonBootstrap = mlton20180207Binary; version = "20180207"; rev = "on-20180207-release"; sha256 = "00rdd2di5x1dzac64il9z05m3fdzicjd3226wwjyynv631jj3q2a"; - inherit stdenv fetchgit gmp which; }; - mltonHEAD = import ./from-git-source.nix { + mltonHEAD = callPackage ./from-git-source.nix { mltonBootstrap = mlton20180207Binary; version = "HEAD"; rev = "e149c9917cfbfe6aba5c986a958ed76d5cc6cfde"; sha256 = "0a0j1i0f0fxw2my1309srq5j3vz0kawrrln01gxms2m5hy5dl50d"; - inherit stdenv fetchgit gmp which; }; }