1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 01:51:24 +00:00
nixpkgs/pkgs/tools/package-management/nix-repl/default.nix

37 lines
1 KiB
Nix
Raw Normal View History

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
dontBuild = true;
2013-09-17 10:24:41 +01: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 19:30:52 +01:00
-I${nix.dev}/include/nix \
-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;
};
}