znur/k/default.nix
2019-07-11 22:59:04 -04:00

34 lines
1.1 KiB
Nix

{ 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 "6757b2fcabed467c1ecda3f3b316a797c9ab320cd9d3b57c5de3263b4c27adad"
else "54c44f891c05dd4df68be83f756d8317c903a9c67c19937bfb4d201119ba0f2c";
in stdenv.mkDerivation rec {
name = "k";
version = "2019.07.07-1207_ga0a263c";
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;
};
}