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

43 lines
1,003 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-06-09 22:40:49 +02:00
version = "0.7.4";
src = fetchFromGitHub {
owner = "nim-lang";
repo = "nimble";
rev = "v${version}";
sha256 = "1l477f1zlqpc738jg47pz599cwjasgy9jqdsplj3ywd12xfqpc96";
};
2016-01-21 09:51:21 +01:00
buildInputs = [ nim ];
2016-06-09 22:40:49 +02:00
patchPhase = ''
substituteInPlace src/nimble.nim.cfg --replace "./vendor/nim" "${nim}/share"
2016-01-21 09:51:21 +01:00
'';
2016-06-09 22:40:49 +02:00
buildPhase = ''
2016-01-21 09:51:21 +01:00
nim c src/nimble
'';
2016-06-09 22:40:49 +02:00
installPhase = ''
mkdir -p $out/bin
cp src/nimble $out/bin
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [stdenv.cc.libc openssl]}" \
--add-needed libcrypto.so \
"$out/bin/nimble"
'';
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;
};
}