nixpkgs/pkgs/development/interpreters/rakudo/zef.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-12-11 21:40:52 +00:00
{ lib
, stdenv
, fetchFromGitHub
, rakudo
, makeBinaryWrapper
}:
2023-12-11 21:40:52 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "zef";
2023-12-10 11:08:51 +00:00
version = "0.21.1";
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=";
};
2023-12-11 21:40:52 +00:00
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
rakudo
];
installPhase = ''
2023-12-11 21:40:52 +00:00
runHook preInstall
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
'';
postFixup =''
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
'';
2023-12-11 21:40:52 +00:00
meta = {
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;
};
2023-12-11 21:40:52 +00:00
})