summary refs log tree commit diff
path: root/pkgs/build-support/templaterpm
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-01-27 12:59:00 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-01-27 13:08:40 +0700
commit36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb (patch)
tree761d7e466aaa3ccba9175ee7ff969e1252626757 /pkgs/build-support/templaterpm
parent02ee14b9d54d31351689084c47f9a048a41f27b4 (diff)
downloadnixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar.gz
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar.bz2
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar.lz
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar.xz
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.tar.zst
nixpkgs-36c91cea1dbe396b92b20bdab3d0d7ad2f294eeb.zip
treewide: stdenv.lib -> lib
Diffstat (limited to 'pkgs/build-support/templaterpm')
-rwxr-xr-xpkgs/build-support/templaterpm/nix-template-rpm.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/templaterpm/nix-template-rpm.py b/pkgs/build-support/templaterpm/nix-template-rpm.py
index f39595f8977..db8c0f2064c 100755
--- a/pkgs/build-support/templaterpm/nix-template-rpm.py
+++ b/pkgs/build-support/templaterpm/nix-template-rpm.py
@@ -229,26 +229,26 @@ class SPECTemplate(object):
 
   @property
   def meta(self):
-    out = '  meta = {\n'
+    out = '  meta = with lib; {\n'
     out += '    homepage = ' + self.spec.sourceHeader['url'] + ';\n'
     out += '    description = "' + self.spec.sourceHeader['summary'] + '";\n'
-    out += '    license = stdenv.lib.licenses.' + self.spec.sourceHeader['license'] + ';\n'
+    out += '    license = lib.licenses.' + self.spec.sourceHeader['license'] + ';\n'
     out += '    platforms = [ "i686-linux" "x86_64-linux" ];\n'
-    out += '    maintainers = with stdenv.lib.maintainers; [ ' + self.maintainer + ' ];\n'
+    out += '    maintainers = with lib.maintainers; [ ' + self.maintainer + ' ];\n'
     out += '  };\n'
     out += '}\n'
     return out
 
 
   def __str__(self):
-    head = '{stdenv, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
+    head = '{lib, stdenv, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
     head += 'stdenv.mkDerivation {\n'
     body = [ self.name, self.src, self.patch, self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
     return head + '\n'.join(body)
 
 
   def getTemplate(self):
-    head = '{stdenv, buildRoot, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
+    head = '{lib, stdenv, buildRoot, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
     head += 'let\n'
     head += '  buildRootInput = (import "${buildRoot}/usr/share/buildroot/buildRootInput.nix") { fetchurl=fetchurl; buildRoot=buildRoot; };\n'
     head += 'in\n\n'