about summary refs log tree commit diff
path: root/pkgs/servers/samba/4.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/samba/4.x.nix')
-rw-r--r--pkgs/servers/samba/4.x.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index 4874f45d96241..f305158e601ce 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -50,23 +50,24 @@
 , enablePam ? (!stdenv.isDarwin), pam
 }:
 
-with lib;
-
 let
   # samba-tool requires libxcrypt-legacy algorithms
   python = python3Packages.python.override {
+    self = python;
     libxcrypt = libxcrypt-legacy;
   };
   wrapPython = python3Packages.wrapPython.override {
     inherit python;
   };
+
+  inherit (lib) optional optionals;
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "samba";
   version = "4.20.1";
 
   src = fetchurl {
-    url = "mirror://samba/pub/samba/stable/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    url = "mirror://samba/pub/samba/stable/samba-${finalAttrs.version}.tar.gz";
     hash = "sha256-+Tw69SlTQNCBBsfA3PuF5PhQV9/RRYeqiBe+sxr/iPc=";
   };
 
@@ -199,7 +200,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   # Save asn1_compile and compile_et so they are available to run on the build
   # platform when cross-compiling
-  postInstall = optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+  postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
     mkdir -p "$dev/bin"
     cp bin/asn1_compile bin/compile_et "$dev/bin"
   '';