From b78f03a5856068362bb0256e364edf74acbeeb75 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 21 Apr 2018 16:29:50 +0200 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ymir.nix | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/ymir.nix b/ymir.nix index 00fe6efb..47355c3b 100644 --- a/ymir.nix +++ b/ymir.nix @@ -60,11 +60,11 @@ in rec { nixpkgs.config.allowUnfree = true; - nixpkgs.config.packageOverrides = pkgs: - rec { - vsftpd = pkgs.vsftpd.override { sslEnable = true; }; - prosody = pkgs.callPackage ./customized/prosody.nix ({ - inherit (pkgs.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luazlib luasec; + nixpkgs.config.overlays = [ + (self: super: { + vsftpd = super.vsftpd.override { sslEnable = true; }; + prosody = self.callPackage ./customized/prosody.nix ({ + inherit (self.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luazlib luasec; lua5 = pkgs.lua5_1; withCommunityModules = ["mod_carbons" "mod_reload_modules" "mod_csi" "mod_cloud_notify" "mod_csi_pump" "mod_smacks" "mod_track_muc_joins" "mod_watchuntrusted"]; extraModules = [prosodyAuth]; @@ -85,30 +85,30 @@ in rec { # }; # plugins = []; # }; - cgit = pkgs.stdenv.lib.overrideDerivation pkgs.cgit (oldAttrs : { + cgit = super.stdenv.lib.overrideDerivation super.cgit (oldAttrs : { buildInputs = oldAttrs.buildInputs ++ [ - pkgs.perl - pkgs.python3 - pkgs.makeWrapper + self.perl + self.python3 + self.makeWrapper ]; postInstall = let - pythonEnv = pkgs.python3.buildEnv.override { extraLibs = with pkgs.python3Packages; [ pygments markdown ]; }; + pythonEnv = self.python3.buildEnv.override { extraLibs = with self.python3Packages; [ pygments markdown ]; }; in '' wrapProgram $out/lib/cgit/filters/syntax-highlighting.py --prefix PYTHONPATH ':' ${pythonEnv}/lib/*/site-packages - wrapProgram $out/lib/cgit/filters/about-formatting.sh --prefix PATH ':' ${pkgs.coreutils}/bin + wrapProgram $out/lib/cgit/filters/about-formatting.sh --prefix PATH ':' ${self.coreutils}/bin tmpFile=$(mktemp) chmod +x $tmpFile echo "#!${pythonEnv}/bin/python3" >$tmpFile tail -n +2 $out/lib/cgit/filters/html-converters/md2html >>$tmpFile mv -v $tmpFile $out/lib/cgit/filters/html-converters/md2html wrapProgram $out/lib/cgit/filters/html-converters/md2html --prefix PYTHONPATH ':' ${pythonEnv}/lib/*/site-packages - wrapProgram $out/lib/cgit/filters/html-converters/man2html --prefix PATH ':' ${pkgs.groff}/bin + wrapProgram $out/lib/cgit/filters/html-converters/man2html --prefix PATH ':' ${self.groff}/bin ''; }); - push2bin = pkgs.writeScriptBin "push2bin" '' - #!${pkgs.zsh}/bin/zsh + push2bin = super.writeScriptBin "push2bin" '' + #!${self.zsh}/bin/zsh - PATH=${pkgs.coreutils}/bin:${pkgs.gawk}/bin + PATH=${self.coreutils}/bin:${self.gawk}/bin baseDir=/srv/www/files baseUrl="https://f.141.li" @@ -132,21 +132,22 @@ in rec { printf "%s/%s/%s" "''${baseUrl}" "''${prefix}" "''${filename}" ''; - pam_pwdfile = pkgs.stdenv.mkDerivation rec { + pam_pwdfile = super.stdenv.mkDerivation rec { name = "pam-pwdfile-${version}"; version = "1.0"; - src = pkgs.fetchFromGitHub { + src = super.fetchFromGitHub { owner = "tiwe-de"; repo = "libpam-pwdfile"; rev = "v${version}"; sha256 = "0sjzwsnlf1g0xbingmjvb9gh8lnwzkkfzw10194ibnppdn4gy0zy"; }; - buildInputs = with pkgs; [ pam ]; + buildInputs = with self; [ pam ]; installFlags = [ "DESTDIR=$(out)" ]; }; - }; + }) + ]; environment.systemPackages = with pkgs; [ git -- cgit v1.2.3