2015-01-02 13:16:44 +01:00
|
|
|
{stdenv, makeWrapper, python, toposort, rpm}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "nix-template-rpm";
|
2015-01-02 13:16:44 +01:00
|
|
|
version = "0.1";
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper python toposort rpm ];
|
|
|
|
|
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ${./nix-template-rpm.py} $out/bin/nix-template-rpm
|
|
|
|
wrapProgram $out/bin/nix-template-rpm \
|
|
|
|
--set PYTHONPATH "${rpm}/lib/${python.libPrefix}/site-packages":"${toposort}/lib/${python.libPrefix}/site-packages"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Create templates of nix expressions from RPM .spec files";
|
|
|
|
maintainers = with maintainers; [ tstrobel ];
|
|
|
|
platforms = with stdenv.lib.platforms; unix;
|
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|