nixpkgs/pkgs/tools/package-management/nix-repl/default.nix

37 lines
1.0 KiB
Nix
Raw Normal View History

2014-12-14 04:29:32 +00:00
{ lib, stdenv, fetchFromGitHub, nix, readline, boehmgc }:
2013-09-17 09:24:41 +00:00
2015-09-08 08:41:13 +00:00
let rev = "8a2f5f0607540ffe56b56d52db544373e1efb980"; in
2013-09-17 09:24:41 +00:00
2014-12-14 04:29:32 +00:00
stdenv.mkDerivation {
name = "nix-repl-${lib.getVersion nix}-${lib.substring 0 7 rev}";
2013-09-17 09:24:41 +00:00
2014-12-14 04:29:32 +00:00
src = fetchFromGitHub {
owner = "edolstra";
repo = "nix-repl";
inherit rev;
2015-09-08 08:41:13 +00:00
sha256 = "0cjablz01i0g9smnavhf86imwx1f9mnh5flax75i615ml71gsr88";
2013-09-17 09:24:41 +00:00
};
2014-12-14 04:29:32 +00:00
buildInputs = [ nix readline ];
2013-09-17 09:24:41 +00:00
dontBuild = true;
2013-09-17 09:24:41 +00:00
# FIXME: unfortunate cut&paste.
installPhase = ''
mkdir -p $out/bin
$CXX -O3 -Wall -std=c++0x \
-o $out/bin/nix-repl nix-repl.cc \
-I${nix}/include/nix \
-lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \
-DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\"
'';
2013-09-17 09:24:41 +00:00
meta = {
homepage = https://github.com/edolstra/nix-repl;
description = "An interactive environment for evaluating and building Nix expressions";
2014-12-14 04:29:32 +00:00
maintainers = [ lib.maintainers.eelco ];
license = lib.licenses.gpl3;
2013-09-17 09:24:41 +00:00
platforms = nix.meta.platforms;
};
}