infra/nix/overlay.nix

105 lines
3.2 KiB
Nix

self: super:
let
nixpkgs-master = import <nixpkgs-master> {};
# one application requires php5
nixpkgsWithPhp5 = super.fetchFromGitHub {
owner = "nixos";
repo = "nixpkgs-channels";
rev = "846d8f8305192dcc3a63139102698b4ac6b9ef9f";
sha256 = "1qifgc1q2i4g0ivpfjnxp4jl2cc82gfjws08dsllgw7q7kw4b4rb";
};
in {
# alacritty = nixpkgs-master.alacritty;
alacritty = super.stdenv.mkDerivation {
name = "alacritty-custom";
buildInputs = [ super.makeWrapper ];
phases = "installPhase";
installPhase = ''
makeWrapper ${nixpkgs-master.alacritty}/bin/alacritty $out/bin/alacritty \
--set-default WINIT_HIDPI_FACTOR 1.0
'';
};
duplicacy = super.callPackage ./pkgs/duplicacy {};
just = super.callPackage ./pkgs/just.nix {};
mfcl3770cdw = super.callPackage ./pkgs/mfcl3770cdw.nix {};
staruml = super.callPackage ./pkgs/staruml.nix { inherit (super.gnome2) GConf; libgcrypt = super.libgcrypt_1_5; };
roxterm = super.stdenv.mkDerivation {
name = "roxterm-custom";
buildInputs = [ super.makeWrapper ];
phases = "installPhase";
installPhase = ''
makeWrapper ${super.roxterm}/bin/roxterm $out/bin/roxterm \
--add-flags "--separate"
'';
};
busyboxStatic = super.busybox.override {
enableStatic = true;
extraConfig = ''
CONFIG_STATIC y
CONFIG_INSTALL_APPLET_DONT y
CONFIG_INSTALL_APPLET_SYMLINKS n
'';
};
dropbearStatic = super.dropbear.override {
enableStatic = true;
};
php56 = (super.callPackages
"${nixpkgsWithPhp5}/pkgs/development/interpreters/php/default.nix" {})
.php56.overrideAttrs(drv: rec {
# See https://secure.php.net/ChangeLog-5.php
version = "5.6.40";
name = "php-${version}";
sha256 = "005s7w167dypl41wlrf51niryvwy1hfv53zxyyr3lm938v9jbl7z";
src = super.fetchurl {
url = "http://www.php.net/distributions/php-${version}.tar.bz2";
inherit sha256;
};
});
rdedup = super.callPackages ./pkgs/rdedup {};
# TODO: facetimehd is currfently broken (https://github.com/NixOS/nixpkgs/pull/72804)
facetimehd-firmware = super.hello;
qtile = nixpkgs-master.qtile;
inherit (nixpkgs-master) podman conmon slirp4netns;
# posh makes use of podman to run an encapsulated shell session
posh = { image, pull ? "always", global_args ? "", run_args ? "" }:
(super.writeScriptBin "posh" ''
#! ${super.bash}/bin/bash
source /etc/profile
test -S "$SSH_AUTH_SOCK" && ssh="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK"
tty -s && tty="-t" || quiet="-q"
# define these as variables so we can override them at runtime
POSH_IMAGE=${image}
POSH_PULL=${pull}
if [ "$1" == "-c" ]; then
# We've most likely been spawned by sshd and are interested in $2 whitch contains the command string
shift
# TODO parse the beginning of the command for POSH_* overrides
fi
exec ${self.podman}/bin/podman \
${global_args} run --rm -i $tty $ssh -v ~/:/root -w /root --network host --pull=''${POSH_PULL} \
${run_args} ''${POSH_IMAGE} $@
'')
.overrideAttrs(attrs: attrs // {
passthru = {
shellPath = "/bin/posh";
};
});
}