2021-01-23 13:15:07 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rakudo, makeWrapper }:
|
2019-12-29 03:10:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zef";
|
2023-04-05 20:49:00 +00:00
|
|
|
version = "0.18.2";
|
2019-12-29 03:10:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ugexe";
|
|
|
|
repo = "zef";
|
|
|
|
rev = "v${version}";
|
2023-04-05 20:49:00 +00:00
|
|
|
sha256 = "sha256-0EWajziWoxWLGaj54FfvEMNPPTc2Wb6O050o2qWGJ9c=";
|
2019-12-29 03:10:33 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ rakudo ];
|
2019-12-29 03:10:33 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"
|
|
|
|
# TODO: Find better solution. zef stores cache stuff in $HOME with the
|
|
|
|
# default config.
|
|
|
|
env HOME=$TMPDIR ${rakudo}/bin/raku -I. ./bin/zef --/depends --/test-depends --/build-depends --install-to=$out install .
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup =''
|
|
|
|
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
|
|
|
|
'';
|
|
|
|
|
2021-01-23 13:15:07 +00:00
|
|
|
meta = with lib; {
|
2019-12-29 03:10:33 +00:00
|
|
|
description = "Raku / Perl6 Module Management";
|
|
|
|
homepage = "https://github.com/ugexe/zef";
|
|
|
|
license = licenses.artistic2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ sgo ];
|
|
|
|
};
|
|
|
|
}
|