{ stdenv, fetchurl }: assert stdenv.is64bit; assert stdenv.isLinux || stdenv.isDarwin; let osdir = if stdenv.isDarwin then "osx-64" else "linux-64"; sha256 = if stdenv.isDarwin then "e50e84a017a585f9459302ce2670c04385e1f59adcacc3ecdecad79edce6ed07" else "6c4b776e85fe04d8efb178ccc9278bd5ee31d57b11e23886226564cdc8677d06"; in stdenv.mkDerivation rec { name = "k"; version = "2019.03.21-1047_g7948682"; src = fetchurl { inherit sha256; url = "https://anaconda.org/shaktidb/shakti/${builtins.substring 0 10 version}/download/${osdir}/shakti-${version}.tar.bz2"; }; phases = [ "installPhase" ]; installPhase = '' mkdir -p "$out" tar -xf "${src}" -C "$out" "bin/${name}" chmod +x "$out/bin/${name}" ''; meta = with stdenv.lib; { description = "An interpreter for the k7 language."; license = { fullName = "Evaluation Agreement"; url = https://shakti.com/license; free = false; }; homepage = https://shakti.com/; platforms = with platforms; linux ++ darwin; }; }