nixpkgs/pkgs/development/tools/nimble/default.nix

41 lines
926 B
Nix
Raw Normal View History

2016-06-09 22:40:49 +02:00
{ stdenv, fetchFromGitHub, nim, openssl }:
2016-01-21 09:51:21 +01:00
stdenv.mkDerivation rec {
name = "nimble-${version}";
2016-10-24 21:08:24 +02:00
version = "0.7.10";
2016-06-09 22:40:49 +02:00
src = fetchFromGitHub {
owner = "nim-lang";
repo = "nimble";
rev = "v${version}";
2016-10-24 21:08:24 +02:00
sha256 = "1bcv8chir73nn6x7q8n3sw2scf3m0x2w9gkkzx162ryivza1nm1r";
2016-06-09 22:40:49 +02:00
};
2016-01-21 09:51:21 +01:00
2016-10-07 01:02:57 +02:00
buildInputs = [ nim openssl ];
2016-01-21 09:51:21 +01:00
2016-06-09 22:40:49 +02:00
patchPhase = ''
substituteInPlace src/nimble.nim.cfg --replace "./vendor/nim" "${nim}/share"
2016-10-07 01:02:57 +02:00
echo "--clib:crypto" >> src/nimble.nim.cfg
2016-01-21 09:51:21 +01:00
'';
2016-06-09 22:40:49 +02:00
buildPhase = ''
2016-10-07 01:02:57 +02:00
cd src && nim c -d:release nimble
2016-01-21 09:51:21 +01:00
'';
2016-06-09 22:40:49 +02:00
installPhase = ''
mkdir -p $out/bin
2016-10-07 01:02:57 +02:00
cp nimble $out/bin
2016-06-09 22:40:49 +02:00
'';
dontStrip = true;
2016-01-21 09:51:21 +01:00
meta = with stdenv.lib; {
description = "Package manager for the Nim programming language";
homepage = https://github.com/nim-lang/nimble;
license = licenses.bsd2;
maintainers = with maintainers; [ kamilchm ];
platforms = platforms.linux ++ platforms.darwin;
};
}