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
2016-07-11 12:00:14 +00:00
let rev = "a1ea85e92b067a0a42354a28355c633eac7be65c"; in
2013-09-17 09:24:41 +00:00
2014-12-14 04:29:32 +00:00
stdenv.mkDerivation {
2016-07-11 12:00:14 +00:00
name = "nix-repl-${lib.getVersion nix}-2016-02-28";
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;
2016-07-11 12:00:14 +00:00
sha256 = "0rf9711day64lgg6g6yqc5709x4sgj137zpqyn019k764i7m2xs8";
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 \
2016-08-29 18:30:52 +00:00
-I${nix.dev}/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;
};
}