2023-12-11 21:40:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rakudo
|
|
|
|
, makeBinaryWrapper
|
|
|
|
}:
|
2019-12-29 03:10:33 +00:00
|
|
|
|
2023-12-11 21:40:52 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-12-29 03:10:33 +00:00
|
|
|
pname = "zef";
|
2023-12-10 11:08:51 +00:00
|
|
|
version = "0.21.1";
|
2019-12-29 03:10:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ugexe";
|
|
|
|
repo = "zef";
|
2023-12-11 21:40:52 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-ji+KTxAOPZhuGryK0+svsVkU+HC1egKZWOboSBUON+s=";
|
2019-12-29 03:10:33 +00:00
|
|
|
};
|
|
|
|
|
2023-12-11 21:40:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
rakudo
|
|
|
|
];
|
2019-12-29 03:10:33 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2023-12-11 21:40:52 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-12-29 03:10:33 +00:00
|
|
|
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 .
|
2023-12-11 21:40:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-12-29 03:10:33 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup =''
|
|
|
|
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
|
|
|
|
'';
|
|
|
|
|
2023-12-11 21:40:52 +00:00
|
|
|
meta = {
|
2019-12-29 03:10:33 +00:00
|
|
|
description = "Raku / Perl6 Module Management";
|
|
|
|
homepage = "https://github.com/ugexe/zef";
|
2023-12-11 21:40:52 +00:00
|
|
|
license = lib.licenses.artistic2;
|
|
|
|
mainProgram = "zef";
|
|
|
|
maintainers = with lib.maintainers; [ sgo ];
|
|
|
|
platforms = lib.platforms.unix;
|
2019-12-29 03:10:33 +00:00
|
|
|
};
|
2023-12-11 21:40:52 +00:00
|
|
|
})
|