2021-01-11 07:54:33 +00:00
|
|
|
{lib, stdenv, makeWrapper, python, toposort, rpm}:
|
2015-01-02 12:16:44 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nix-template-rpm";
|
2015-01-02 12:16:44 +00:00
|
|
|
version = "0.1";
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python toposort rpm ];
|
2015-01-02 12:16:44 +00:00
|
|
|
|
2021-08-17 10:04:49 +01:00
|
|
|
dontUnpack = true;
|
2015-01-02 12:16:44 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-01-02 12:16:44 +00:00
|
|
|
description = "Create templates of nix expressions from RPM .spec files";
|
|
|
|
maintainers = with maintainers; [ tstrobel ];
|
2021-01-24 00:40:18 +00:00
|
|
|
platforms = platforms.unix;
|
2015-01-02 12:16:44 +00:00
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|