2014-12-14 04:29:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, nix, readline, boehmgc }:
|
2013-09-17 10:24:41 +01:00
|
|
|
|
2016-07-11 13:00:14 +01:00
|
|
|
let rev = "a1ea85e92b067a0a42354a28355c633eac7be65c"; in
|
2013-09-17 10:24:41 +01:00
|
|
|
|
2014-12-14 04:29:32 +00:00
|
|
|
stdenv.mkDerivation {
|
2016-07-11 13:00:14 +01:00
|
|
|
name = "nix-repl-${lib.getVersion nix}-2016-02-28";
|
2013-09-17 10:24:41 +01:00
|
|
|
|
2014-12-14 04:29:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edolstra";
|
|
|
|
repo = "nix-repl";
|
|
|
|
inherit rev;
|
2016-07-11 13:00:14 +01:00
|
|
|
sha256 = "0rf9711day64lgg6g6yqc5709x4sgj137zpqyn019k764i7m2xs8";
|
2013-09-17 10:24:41 +01:00
|
|
|
};
|
|
|
|
|
2014-12-14 04:29:32 +00:00
|
|
|
buildInputs = [ nix readline ];
|
2013-09-17 10:24:41 +01:00
|
|
|
|
2016-05-04 11:08:35 +01:00
|
|
|
dontBuild = true;
|
2013-09-17 10:24:41 +01:00
|
|
|
|
|
|
|
# FIXME: unfortunate cut&paste.
|
2016-05-04 11:08:35 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
$CXX -O3 -Wall -std=c++0x \
|
|
|
|
-o $out/bin/nix-repl nix-repl.cc \
|
2016-08-29 19:30:52 +01:00
|
|
|
-I${nix.dev}/include/nix \
|
2016-05-04 11:08:35 +01:00
|
|
|
-lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \
|
|
|
|
-DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\"
|
|
|
|
'';
|
2013-09-17 10:24:41 +01: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 10:24:41 +01:00
|
|
|
platforms = nix.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|