zef: use finalAttrs
pattern
This commit is contained in:
parent
b18e4eaa2a
commit
507902558c
1 changed files with 26 additions and 11 deletions
|
@ -1,35 +1,50 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, rakudo, makeWrapper }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rakudo
|
||||||
|
, makeBinaryWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "zef";
|
pname = "zef";
|
||||||
version = "0.21.1";
|
version = "0.21.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ugexe";
|
owner = "ugexe";
|
||||||
repo = "zef";
|
repo = "zef";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = "sha256-ji+KTxAOPZhuGryK0+svsVkU+HC1egKZWOboSBUON+s=";
|
hash = "sha256-ji+KTxAOPZhuGryK0+svsVkU+HC1egKZWOboSBUON+s=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [
|
||||||
buildInputs = [ rakudo ];
|
makeBinaryWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
rakudo
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
# TODO: Find better solution. zef stores cache stuff in $HOME with the
|
# TODO: Find better solution. zef stores cache stuff in $HOME with the
|
||||||
# default config.
|
# default config.
|
||||||
env HOME=$TMPDIR ${rakudo}/bin/raku -I. ./bin/zef --/depends --/test-depends --/build-depends --install-to=$out install .
|
env HOME=$TMPDIR ${rakudo}/bin/raku -I. ./bin/zef --/depends --/test-depends --/build-depends --install-to=$out install .
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup =''
|
postFixup =''
|
||||||
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
|
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Raku / Perl6 Module Management";
|
description = "Raku / Perl6 Module Management";
|
||||||
homepage = "https://github.com/ugexe/zef";
|
homepage = "https://github.com/ugexe/zef";
|
||||||
license = licenses.artistic2;
|
license = lib.licenses.artistic2;
|
||||||
platforms = platforms.unix;
|
mainProgram = "zef";
|
||||||
maintainers = with maintainers; [ sgo ];
|
maintainers = with lib.maintainers; [ sgo ];
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue