mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
25 lines
744 B
Nix
25 lines
744 B
Nix
|
{stdenv, makeWrapper, python, toposort, rpm}:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
name = "nix-template-rpm-${version}";
|
||
|
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 = [];
|
||
|
};
|
||
|
}
|